Buggy code:
public class ResourceAdapterParser extends CommonIronJacamarParser { private static CommonBundle bundle = Messages . getBundle ( CommonBundle . class ) ; public void parse ( final XMLExtendedStreamReader reader , final List < ModelNode > list , ModelNode parentAddress ) throws Exception { } private void parseResourceAdapters ( final XMLExtendedStreamReader reader , final List < ModelNode > list , ModelNode parentAddress ) throws XMLStreamException , ParserException , ValidateException { } private void parseResourceAdapter ( final XMLExtendedStreamReader reader , final List < ModelNode > list , ModelNode parentAddress ) throws XMLStreamException , ParserException , ValidateException { final ModelNode raAddress = parentAddress . clone ( ) ; final ModelNode operation = new ModelNode ( ) ; operation . get ( OP ) . set ( ADD ) ; String archiveName = null ; HashMap < String , ModelNode > configPropertiesOperations = new HashMap < String , ModelNode > ( ) ; HashMap < String , ModelNode > connectionDefinitionsOperations = new HashMap < String , ModelNode > ( ) ; HashMap < String , HashMap < String , ModelNode > > cfConfigPropertiesOperations = new HashMap < String , HashMap < String , ModelNode > > ( ) ; HashMap < String , ModelNode > adminObjectsOperations = new HashMap < String , ModelNode > ( ) ; HashMap < String , HashMap < String , ModelNode > > aoConfigPropertiesOperations = new HashMap < String , HashMap < String , ModelNode > > ( ) ; while ( reader . hasNext ( ) ) { switch ( reader . nextTag ( ) ) { case XMLStreamConstants . END_ELEMENT : { if ( ( ResourceAdapters . Tag . forName ( reader . getLocalName ( ) ) ) == ( ResourceAdapters . Tag . RESOURCE_ADAPTER ) ) { if ( archiveName != null ) { Integer identifier = ConnectorServices . getResourceIdentifier ( archiveName ) ; if ( ( identifier != null ) && ( identifier != 0 ) ) { <START_BUG> archiveName = ( archiveName + "#" ) + identifier ; <END_BUG> } raAddress . add ( Constants . RESOURCEADAPTER_NAME , archiveName ) ; raAddress . protect ( ) ; operation . get ( OP_ADDR ) . set ( raAddress ) ; list . add ( operation ) ; for ( Map . Entry < String , ModelNode > entry : configPropertiesOperations . entrySet ( ) ) { final ModelNode env = raAddress . clone ( ) ; env . add ( Constants . CONFIG_PROPERTIES . getName ( ) , entry . getKey ( ) ) ; env . protect ( ) ; entry . getValue ( ) . get ( OP_ADDR ) . set ( env ) ; list . add ( entry . getValue ( ) ) ; } for ( Map . Entry < String , ModelNode > entry : connectionDefinitionsOperations . entrySet ( ) ) { final ModelNode env = raAddress . clone ( ) ; env . add ( Constants . CONNECTIONDEFINITIONS_NAME , entry . getKey ( ) ) ; env . protect ( ) ; entry . getValue ( ) . get ( OP_ADDR ) . set ( env ) ; list . add ( entry . getValue ( ) ) ; final HashMap < String , ModelNode > properties = cfConfigPropertiesOperations . get ( entry . getKey ( ) ) ; if ( properties != null ) { for ( Map . Entry < String , ModelNode > configEntry : properties . entrySet ( ) ) { final ModelNode configEnv = env . clone ( ) ; configEnv . add ( Constants . CONFIG_PROPERTIES . getName ( ) , configEntry . getKey ( ) ) ; configEnv . protect ( ) ; configEntry . getValue ( ) . get ( OP_ADDR ) . set ( configEnv ) ; list . add ( configEntry . getValue ( ) ) ; } } } for ( Map . Entry < String , ModelNode > entry : adminObjectsOperations . entrySet ( ) ) { final ModelNode env = raAddress . clone ( ) ; env . add ( Constants . ADMIN_OBJECTS_NAME , entry . getKey ( ) ) ; env . protect ( ) ; entry . getValue ( ) . get ( OP_ADDR ) . set ( env ) ; list . add ( entry . getValue ( ) ) ; final HashMap < String , ModelNode > aoProperties = aoConfigPropertiesOperations . get ( entry . getKey ( ) ) ; if ( aoProperties != null ) { for ( Map . Entry < String , ModelNode > configEntry : aoProperties . entrySet ( ) ) { final ModelNode configEnv = env . clone ( ) ; configEnv . add ( Constants . CONFIG_PROPERTIES . getName ( ) , configEntry . getKey ( ) ) ; configEnv . protect ( ) ; configEntry . getValue ( ) . get ( OP_ADDR ) . set ( configEnv ) ; list . add ( configEntry . getValue ( ) ) ; } } } return ; } else { throw new ParserException ( ResourceAdapterParser . bundle . requiredElementMissing ( Constants . ARCHIVE . getName ( ) , Constants . RESOURCEADAPTER_NAME ) ) ; } } else { if ( ( ResourceAdapter . Tag . forName ( reader . getLocalName ( ) ) ) == ( ResourceAdapter . Tag . UNKNOWN ) ) { throw new ParserException ( ResourceAdapterParser . bundle . unexpectedEndTag ( reader . getLocalName ( ) ) ) ; } } break ; } case XMLStreamConstants . START_ELEMENT : { switch ( ResourceAdapter . Tag . forName ( reader . getLocalName ( ) ) ) { case ADMIN_OBJECTS : case CONNECTION_DEFINITIONS : case BEAN_VALIDATION_GROUPS : { break ; } case ADMIN_OBJECT : { parseAdminObjects ( reader , adminObjectsOperations , aoConfigPropertiesOperations ) ; break ; } case CONNECTION_DEFINITION : { parseConnectionDefinitions ( reader , connectionDefinitionsOperations , cfConfigPropertiesOperations ) ; break ; } case BEAN_VALIDATION_GROUP : { String value = rawElementText ( reader ) ;

Fix:
archiveName = ( archiveName + ( ConnectorServices . RA_SERVICE_NAME_SEPARATOR ) ) + identifier ;