private void writeNewConfigProperties(XMLExtendedStreamWriter streamWriter, ModelNode ra) throws XMLStreamException { if (ra.hasDefined(CONFIG_PROPERTIES.getName())) { for (Property connectionProperty : ra.get(CONFIG_PROPERTIES.getName()).asPropertyList()) { writeProperty(streamWriter, ra, connectionProperty.getName(), connectionProperty .getValue().get("value").asString(), Activation.Tag.CONFIG_PROPERTY.getLocalName()); } } }
streamWriter.writeStartElement(Activation.Tag.BEAN_VALIDATION_GROUPS.getLocalName()); for (ModelNode bvg : ra.get(BEANVALIDATION_GROUPS.getName()).asList()) { streamWriter.writeStartElement(BEANVALIDATION_GROUPS.getXmlName()); streamWriter.writeStartElement(Activation.Tag.WORKMANAGER.getLocalName()); streamWriter.writeStartElement(WorkManager.Tag.SECURITY.getLocalName()); WM_SECURITY_MAPPING_REQUIRED.marshallAsElement(ra, streamWriter); streamWriter.writeStartElement(Activation.Tag.CONNECTION_DEFINITIONS.getLocalName()); for (Property conDef : ra.get(CONNECTIONDEFINITIONS_NAME).asPropertyList()) { writeConDef(streamWriter, conDef.getValue(), conDef.getName(), isXa); streamWriter.writeStartElement(Activation.Tag.ADMIN_OBJECTS.getLocalName()); for (Property adminObject : ra.get(ADMIN_OBJECTS_NAME).asPropertyList()) { writeAdminObject(streamWriter, adminObject.getValue(), adminObject.getName());
private void writeConDef(XMLExtendedStreamWriter streamWriter, ModelNode conDef, final String poolName, final boolean isXa) throws XMLStreamException { streamWriter.writeStartElement(Activation.Tag.CONNECTION_DEFINITION.getLocalName()); CLASS_NAME.marshallAsAttribute(conDef, streamWriter); JNDINAME.marshallAsAttribute(conDef, streamWriter);
private void writeConDef(XMLExtendedStreamWriter streamWriter, ModelNode conDef, final String poolName, final boolean isXa) throws XMLStreamException { streamWriter.writeStartElement(Activation.Tag.CONNECTION_DEFINITION.getLocalName()); CLASS_NAME.marshallAsAttribute(conDef, streamWriter); JNDINAME.marshallAsAttribute(conDef, streamWriter);
streamWriter.writeStartElement(Activation.Tag.BEAN_VALIDATION_GROUPS.getLocalName()); for (ModelNode bvg : ra.get(BEANVALIDATION_GROUPS.getName()).asList()) { streamWriter.writeStartElement(BEANVALIDATION_GROUPS.getXmlName()); streamWriter.writeStartElement(Activation.Tag.WORKMANAGER.getLocalName()); streamWriter.writeStartElement(WorkManager.Tag.SECURITY.getLocalName()); WM_SECURITY_MAPPING_REQUIRED.marshallAsElement(ra, streamWriter); streamWriter.writeStartElement(Activation.Tag.CONNECTION_DEFINITIONS.getLocalName()); for (Property conDef : ra.get(CONNECTIONDEFINITIONS_NAME).asPropertyList()) { writeConDef(streamWriter, conDef.getValue(), conDef.getName(), isXa); streamWriter.writeStartElement(Activation.Tag.ADMIN_OBJECTS.getLocalName()); for (Property adminObject : ra.get(ADMIN_OBJECTS_NAME).asPropertyList()) { writeAdminObject(streamWriter, adminObject.getValue(), adminObject.getName());
private void writeAdminObject(XMLExtendedStreamWriter streamWriter, ModelNode adminObject, final String poolName) throws XMLStreamException { streamWriter.writeStartElement(Activation.Tag.ADMIN_OBJECT.getLocalName()); CLASS_NAME.marshallAsAttribute(adminObject, streamWriter); JNDINAME.marshallAsAttribute(adminObject, streamWriter); ENABLED.marshallAsAttribute(adminObject, streamWriter); USE_JAVA_CONTEXT.marshallAsAttribute(adminObject, streamWriter); streamWriter.writeAttribute("pool-name", poolName); writeNewConfigProperties(streamWriter, adminObject); streamWriter.writeEndElement(); }
private void writeNewConfigProperties(XMLExtendedStreamWriter streamWriter, ModelNode ra) throws XMLStreamException { if (ra.hasDefined(CONFIG_PROPERTIES.getName())) { for (Property connectionProperty : ra.get(CONFIG_PROPERTIES.getName()).asPropertyList()) { writeProperty(streamWriter, ra, connectionProperty.getName(), connectionProperty .getValue().get("value").asString(), Activation.Tag.CONFIG_PROPERTY.getLocalName()); } } }
private void writeAdminObject(XMLExtendedStreamWriter streamWriter, ModelNode adminObject, final String poolName) throws XMLStreamException { streamWriter.writeStartElement(Activation.Tag.ADMIN_OBJECT.getLocalName()); CLASS_NAME.marshallAsAttribute(adminObject, streamWriter); JNDINAME.marshallAsAttribute(adminObject, streamWriter); ENABLED.marshallAsAttribute(adminObject, streamWriter); USE_JAVA_CONTEXT.marshallAsAttribute(adminObject, streamWriter); streamWriter.writeAttribute("pool-name", poolName); writeNewConfigProperties(streamWriter, adminObject); streamWriter.writeEndElement(); }