Buggy code:
subModel . get ( CommonAttributes . RECOVERY_ENVIRONMENT , CommonAttributes . RECOVERY_LISTENER ) . set ( operation . get ( CommonAttributes . RECOVERY_ENVIRONMENT , CommonAttributes . RECOVERY_LISTENER ) ) ; subModel . get ( CommonAttributes . COORDINATOR_ENVIRONMENT , CommonAttributes . ENABLE_STATISTICS ) . set ( operation . get ( CommonAttributes . COORDINATOR_ENVIRONMENT , CommonAttributes . ENABLE_STATISTICS ) ) ; subModel . get ( CommonAttributes . COORDINATOR_ENVIRONMENT , CommonAttributes . ENABLE_TSM_STATUS ) . set ( operation . get ( CommonAttributes . COORDINATOR_ENVIRONMENT , CommonAttributes . ENABLE_TSM_STATUS ) ) ; subModel . get ( CommonAttributes . COORDINATOR_ENVIRONMENT , CommonAttributes . DEFAULT_TIMEOUT ) . set ( operation . get ( CommonAttributes . COORDINATOR_ENVIRONMENT , CommonAttributes . DEFAULT_TIMEOUT ) ) ; subModel . get ( CommonAttributes . OBJECT_STORE , RELATIVE_TO ) . set ( operation . get ( CommonAttributes . OBJECT_STORE , RELATIVE_TO ) ) ; subModel . get ( CommonAttributes . OBJECT_STORE , PATH ) . set ( operation . get ( CommonAttributes . OBJECT_STORE , PATH ) ) ; if ( ( context . getType ( ) ) == ( Type . SERVER ) ) { context . addStep ( new NewStepHandler ( ) { public void execute ( NewOperationContext context , ModelNode operation ) { final List < ServiceController < ? > > controllers = new ArrayList < ServiceController < ? > > ( ) ; final ServiceVerificationHandler verificationHandler = new ServiceVerificationHandler ( ) ; final ServiceTarget target = context . getServiceTarget ( ) ; String socketBindingName = null ; final CoreEnvironmentService coreEnvironmentService = new CoreEnvironmentService ( nodeIdentifier , varDirPath ) ; if ( processId . hasDefined ( UUID . getName ( ) ) ) { UuidProcessId id = new UuidProcessId ( ) ; coreEnvironmentService . setProcessImplementation ( id ) ; } else if ( processId . hasDefined ( SOCKET . getName ( ) ) ) { coreEnvironmentService . setProcessImplementationClassName ( SOCKET . getClazz ( ) ) ; ModelNode socket = processId . get ( SOCKET . getName ( ) ) ; socketBindingName = socket . require ( CommonAttributes . BINDING ) . asString ( ) ; if ( socket . hasDefined ( CommonAttributes . SOCKET_PROCESS_ID_MAX_PORTS ) ) { int ports = socket . get ( CommonAttributes . SOCKET_PROCESS_ID_MAX_PORTS ) . asInt ( maxPorts ) ; coreEnvironmentService . setSocketProcessIdMaxPorts ( ports ) ; } } else { UuidProcessId id = new UuidProcessId ( ) ; coreEnvironmentService . setProcessImplementation ( id ) ; } ServiceBuilder < ? > coreEnvBuilder = target . addService ( JBOSS_TXN_CORE_ENVIRONMENT , coreEnvironmentService ) ; if ( socketBindingName != null ) { ServiceName bindingName = JBOSS_BINDING_NAME . append ( socketBindingName ) ; coreEnvBuilder . addDependency ( bindingName , SocketBinding . class , coreEnvironmentService . getSocketProcessBindingInjector ( ) ) ; } ServiceController < String > varDirRPS = RelativePathService . addService ( TransactionSubsystemAdd . INTERNAL_CORE_ENV_VAR_PATH , varDirPath , varDirPathRef , target ) ; coreEnvBuilder . addDependency ( varDirRPS . getName ( ) , String . class , coreEnvironmentService . getPathInjector ( ) ) . setInitialMode ( ACTIVE ) . install ( ) ; final XATerminatorService xaTerminatorService = new XATerminatorService ( ) ; target . addService ( JBOSS_TXN_XA_TERMINATOR , xaTerminatorService ) . setInitialMode ( ACTIVE ) . install ( ) ; ServiceController < String > objectStoreRPS = RelativePathService . addService ( TransactionSubsystemAdd . INTERNAL_OBJECTSTORE_PATH , objectStorePath , objectStorePathRef , target ) ; final ArjunaObjectStoreEnvironmentService objStoreEnvironmentService = new ArjunaObjectStoreEnvironmentService ( ) ; controllers . add ( target . addService ( JBOSS_TXN_ARJUNA_OBJECTSTORE_ENVIRONMENT , objStoreEnvironmentService ) . addDependency ( objectStoreRPS . getName ( ) , String . class , objStoreEnvironmentService . getPathInjector ( ) ) . addDependency ( JBOSS_TXN_CORE_ENVIRONMENT ) . addListener ( verificationHandler ) . setInitialMode ( ACTIVE ) . install ( ) ) ; final ArjunaRecoveryManagerService recoveryManagerService = new ArjunaRecoveryManagerService ( recoveryListener ) ; controllers . add ( target . addService ( JBOSS_TXN_ARJUNA_RECOVERY_MANAGER , recoveryManagerService ) . addDependency ( OPTIONAL , JBOSS . append ( "iiop" , "orb" ) , ORB . class , recoveryManagerService . getOrbInjector ( ) ) . addDependency ( JBOSS_BINDING_NAME . append ( recoveryBindingName ) , SocketBinding . class , recoveryManagerService . getRecoveryBindingInjector ( ) ) . addDependency ( JBOSS_BINDING_NAME . append ( recoveryStatusBindingName ) , SocketBinding . class , recoveryManagerService . getStatusBindingInjector ( ) ) . addDependency ( JBOSS_TXN_CORE_ENVIRONMENT ) . addDependency ( JBOSS_TXN_ARJUNA_OBJECTSTORE_ENVIRONMENT ) . addListener ( verificationHandler ) . setInitialMode ( ACTIVE ) . install ( ) ) ; final ArjunaTransactionManagerService transactionManagerService = new ArjunaTransactionManagerService ( coordinatorEnableStatistics , coordinatorDefaultTimeout , transactionStatusManagerEnable ) ; controllers . add ( target . addService ( JBOSS_TXN_ARJUNA_TRANSACTION_MANAGER , transactionManagerService ) . addDependency ( OPTIONAL , JBOSS . append ( "iiop" , "orb" ) , ORB . class , transactionManagerService . getOrbInjector ( ) ) . addDependency ( JBOSS_TXN_XA_TERMINATOR , JBossXATerminator . class , transactionManagerService . getXaTerminatorInjector ( ) ) . addDependency ( JBOSS_TXN_CORE_ENVIRONMENT ) . addDependency ( JBOSS_TXN_ARJUNA_OBJECTSTORE_ENVIRONMENT ) . addDependency ( JBOSS_TXN_ARJUNA_RECOVERY_MANAGER ) . addListener ( verificationHandler ) . setInitialMode ( ACTIVE ) . install ( ) ) ; TransactionManagerService . addService ( target ) ; UserTransactionService . addService ( target ) ; controllers . add ( target . addService ( JBOSS_TXN_USER_TRANSACTION_REGISTRY , new UserTransactionRegistryService ( ) ) . addListener ( verificationHandler ) . setInitialMode ( ACTIVE ) . install ( ) ) ; TransactionSynchronizationRegistryService . addService ( target ) ; try { Class . forName ( "com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple" , true , getClass ( ) . getClassLoader ( ) ) ; } catch ( ClassNotFoundException e ) { TransactionSubsystemAdd . log . warn ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>load<seq2seq4repair_space>com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple" , e ) ; } context . addStep ( verificationHandler , VERIFY ) ; if ( ( context . completeStep ( ) ) == ( ResultAction . ROLLBACK ) ) { for ( ServiceController < ? > controller : controllers ) { <START_BUG> context . removeService ( controller ) ; <END_BUG> } } } } , RUNTIME ) ; } context . completeStep ( ) ; } }

Fix:
context . removeService ( controller . getName ( ) ) ;