ejb3/src/main/java/org/jboss/as/ejb3/subsystem/EJB3SubsystemXMLPersister.java
private void writeEntityBean(final XMLExtendedStreamWriter writer, final ModelNode entityModelNode) throws XMLStreamException {
        if (entityModelNode.hasDefined(EJB3SubsystemModel.DEFAULT_ENTITY_BEAN_INSTANCE_POOL)) {
            // <bean-instance-pool-ref>
            writer.writeStartElement(EJB3SubsystemXMLElement.BEAN_INSTANCE_POOL_REF.getLocalName());
            final String poolRefName = entityModelNode.get(EJB3SubsystemModel.DEFAULT_ENTITY_BEAN_INSTANCE_POOL).asString();
            // write the value
            writer.writeAttribute(EJB3SubsystemXMLAttribute.POOL_NAME.getLocalName(), poolRefName);
            // </bean-instance-pool-ref>
            writer.writeEndElement();
        }
        if (entityModelNode.hasDefined(EJB3SubsystemModel.DEFAULT_ENTITY_BEAN_OPTIMISTIC_LOCKING)) {
            // <optimistic-locking>
            writer.writeStartElement(EJB3SubsystemXMLElement.OPTIMISTIC_LOCKING.getLocalName());
            final Boolean locking = entityModelNode.get(EJB3SubsystemModel.DEFAULT_ENTITY_BEAN_OPTIMISTIC_LOCKING).asBoolean();
            // write the value
            writer.writeAttribute(EJB3SubsystemXMLAttribute.ENABLED.getLocalName(), locking.toString());
            // <optimistic-locking>
            writer.writeEndElement();
        }
    }
private void writeEntityBean(final XMLExtendedStreamWriter writer, final ModelNode entityModelNode) throws XMLStreamException {
        if (entityModelNode.hasDefined(EJB3SubsystemModel.DEFAULT_ENTITY_BEAN_INSTANCE_POOL)) {
            // <bean-instance-pool-ref>
            writer.writeStartElement(EJB3SubsystemXMLElement.BEAN_INSTANCE_POOL_REF.getLocalName());
            final String poolRefName = entityModelNode.get(EJB3SubsystemModel.DEFAULT_ENTITY_BEAN_INSTANCE_POOL).asString();
            // write the value
            writer.writeAttribute(EJB3SubsystemXMLAttribute.POOL_NAME.getLocalName(), poolRefName);
            // </bean-instance-pool-ref>
            writer.writeEndElement();
        }
        if (entityModelNode.hasDefined(EJB3SubsystemModel.DEFAULT_ENTITY_BEAN_OPTIMISTIC_LOCKING)) {
            // <optimistic-locking>
            writer.writeStartElement(EJB3SubsystemXMLElement.OPTIMISTIC_LOCKING.getLocalName());
            final Boolean locking = entityModelNode.get(EJB3SubsystemModel.DEFAULT_ENTITY_BEAN_OPTIMISTIC_LOCKING).asBoolean();
            // write the value
            writer.writeAttribute(EJB3SubsystemXMLAttribute.ENABLED.getLocalName(), locking.toString());
            // <optimistic-locking>
            writer.writeEndElement();
        }
    }
private void writeEntityBean ( final XMLExtendedStreamWriter writer , final ModelNode entityModelNode ) throws XMLStreamException { if ( entityModelNode . hasDefined ( EJB3SubsystemModel . DEFAULT_ENTITY_BEAN_INSTANCE_POOL ) ) { // <bean-instance-pool-ref> writer . writeStartElement ( EJB3SubsystemXMLElement . BEAN_INSTANCE_POOL_REF . getLocalName ( ) ) ; final String poolRefName = entityModelNode . get ( EJB3SubsystemModel . DEFAULT_ENTITY_BEAN_INSTANCE_POOL ) . asString ( ) ; // write the value writer . writeAttribute ( EJB3SubsystemXMLAttribute . POOL_NAME . getLocalName ( ) , poolRefName ) ; // </bean-instance-pool-ref> writer . writeEndElement ( ) ; } if ( entityModelNode . hasDefined ( EJB3SubsystemModel . DEFAULT_ENTITY_BEAN_OPTIMISTIC_LOCKING ) ) { // <optimistic-locking> writer . writeStartElement ( EJB3SubsystemXMLElement . OPTIMISTIC_LOCKING . getLocalName ( ) ) ; final Boolean locking = entityModelNode . get ( EJB3SubsystemModel . DEFAULT_ENTITY_BEAN_OPTIMISTIC_LOCKING ) . asBoolean ( ) ; // write the value writer . writeAttribute ( EJB3SubsystemXMLAttribute . ENABLED . getLocalName ( ) , locking . toString ( ) ) ; // <optimistic-locking> writer . writeEndElement ( ) ; } }
Writes out the <entity-bean> element and its nested elements

@param writer          XML writer
@param entityModelNode The <mdb> element {@link org.jboss.dmr.ModelNode}
@throws javax.xml.stream.XMLStreamException
Writes out the <entity - bean > element and its nested elements