public void readElement(final XMLExtendedStreamReader reader, final List<ModelNode> list) throws XMLStreamException {
ModelNode subsystem = createAddSubsystemOperation();
list.add(subsystem);
ResourceAdapters ras = null;
try {
String localName = null;
switch (Namespace.forUri(reader.getNamespaceURI())) {
case RESOURCEADAPTERS_1_0: {
localName = reader.getLocalName();
final Element element = Element.forName(reader.getLocalName());
log.tracef("%s -> %s", localName, element);
switch (element) {
case SUBSYSTEM: {
ResourceAdapterParser parser = new ResourceAdapterParser();
ras = parser.parse(reader);
break;
}
}
}
}
} catch (Exception e) {
throw new XMLStreamException(e);
}
if (ras != null) {
ModelNode rasNode = subsystem.get(RESOURCEADAPTERS);
for (ResourceAdapter ra : ras.getResourceAdapters()) {
ModelNode raModel = new ModelNode();
for (Entry<String, String> entry : ra.getConfigProperties().entrySet()) {
raModel.get(CONFIG_PROPERTIES, entry.getKey()).set(entry.getValue());
}
raModel.get(ARCHIVE).set(ra.getArchive());