Buggy code:
final class ArjunaTransactionManagerService implements Service < TransactionManagerService > { public static final ServiceName SERVICE_NAME = TxnServices . JBOSS_TXN_ARJUNA_TRANSACTION_MANAGER ; private final InjectedValue < JBossXATerminator > xaTerminatorInjector = new InjectedValue < JBossXATerminator > ( ) ; private final InjectedValue < ORB > orbInjector = new InjectedValue < ORB > ( ) ; private final InjectedValue < SocketBinding > socketProcessBindingInjector = new InjectedValue < SocketBinding > ( ) ; private TransactionManagerService value ; private ObjStoreBrowser objStoreBrowser ; private String coreNodeIdentifier ; private int coreSocketProcessIdMaxPorts ; private boolean coordinatorEnableStatistics ; private int coordinatorDefaultTimeout ; ArjunaTransactionManagerService ( final String coreNodeIdentifier , final int coreSocketProcessIdMaxPorts , final boolean coordinatorEnableStatistics , final int coordinatorDefaultTimeout ) { } @ Override public synchronized void start ( final StartContext context ) throws StartException { SecurityActions . setContextLoader ( ArjunaTransactionManagerService . class . getClassLoader ( ) ) ; try { final CoreEnvironmentBean coreEnvironmentBean = arjPropertyManager . getCoreEnvironmentBean ( ) ; coreEnvironmentBean . setSocketProcessIdPort ( socketProcessBindingInjector . getValue ( ) . getSocketAddress ( ) . getPort ( ) ) ; coreEnvironmentBean . setNodeIdentifier ( coreNodeIdentifier ) ; coreEnvironmentBean . setSocketProcessIdMaxPorts ( coreSocketProcessIdMaxPorts ) ; final JTAEnvironmentBean jtaEnvironmentBean = jtaPropertyManager . getJTAEnvironmentBean ( ) ; <START_BUG> jtaEnvironmentBean . setLastResourceOptimisationInterface ( LastResource . class . getName ( ) ) ; <END_BUG> jtaEnvironmentBean . setXaRecoveryNodes ( Collections . singletonList ( "1" ) ) ; jtaEnvironmentBean . setXaResourceOrphanFilterClassNames ( Arrays . asList ( JTATransactionLogXAResourceOrphanFilter . class . getName ( ) , JTANodeNameXAResourceOrphanFilter . class . getName ( ) ) ) ; final CoordinatorEnvironmentBean coordinatorEnvironmentBean = arjPropertyManager . getCoordinatorEnvironmentBean ( ) ; coordinatorEnvironmentBean . setEnableStatistics ( coordinatorEnableStatistics ) ; coordinatorEnvironmentBean . setDefaultTimeout ( coordinatorDefaultTimeout ) ; Map < String , String > objStoreBrowserTypes = new HashMap < String , String > ( ) ; objStoreBrowser = new ObjStoreBrowser ( ) ; objStoreBrowserTypes . put ( "StateManager//BasicAction//TwoPhaseCoordinator//AtomicAction" , "com.arjuna.ats.internal.jta.tools.osb.mbean.jta.JTAActionBean" ) ; final ORB orb = orbInjector . getValue ( ) ; if ( orb == null ) { final TransactionManagerService service = new TransactionManagerService ( ) ; service . setJbossXATerminator ( xaTerminatorInjector . getValue ( ) ) ; service . setTransactionSynchronizationRegistry ( new TransactionSynchronizationRegistryImple ( ) ) ; jtaEnvironmentBean . setTransactionManagerClassName ( TransactionManagerDelegate . class . getName ( ) ) ; jtaEnvironmentBean . setUserTransactionClassName ( UserTransactionImple . class . getName ( ) ) ; jtaEnvironmentBean . setTransactionSynchronizationRegistryClassName ( TransactionSynchronizationRegistryImple . class . getName ( ) ) ; try { service . create ( ) ; } catch ( Exception e ) { throw new StartException ( "Transaction<seq2seq4repair_space>manager<seq2seq4repair_space>create<seq2seq4repair_space>failed" , e ) ; } service . start ( ) ; value = service ; } else { final com . arjuna . ats . jbossatx . jts . TransactionManagerService service = new com . arjuna . ats . jbossatx . jts . TransactionManagerService ( ) ; service . setJbossXATerminator ( xaTerminatorInjector . getValue ( ) ) ; service . setTransactionSynchronizationRegistry ( new com . arjuna . ats . internal . jta . transaction . jts . TransactionSynchronizationRegistryImple ( ) ) ; jtaEnvironmentBean . setTransactionManagerClassName ( com . arjuna . ats . jbossatx . jts . TransactionManagerDelegate . class . getName ( ) ) ; jtaEnvironmentBean . setUserTransactionClassName ( com . arjuna . ats . internal . jta . transaction . jts . UserTransactionImple . class . getName ( ) ) ; jtaEnvironmentBean . setTransactionSynchronizationRegistryClassName ( TransactionSynchronizationRegistryImple . class . getName ( ) ) ; objStoreBrowserTypes . put ( "StateManager//BasicAction//TwoPhaseCoordinator//ArjunaTransactionImple" , "com.arjuna.ats.arjuna.tools.osb.mbean.ActionBean" ) ; try { service . create ( ) ; } catch ( Exception e ) { throw new StartException ( "Create<seq2seq4repair_space>failed" , e ) ; } try { service . start ( orb ) ; } catch ( Exception e ) { throw new StartException ( "Start<seq2seq4repair_space>failed" , e ) ; } value = service ; } try { objStoreBrowser . setTypes ( objStoreBrowserTypes ) ; objStoreBrowser . start ( ) ; } catch ( Exception e ) { throw new StartException ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>configure<seq2seq4repair_space>object<seq2seq4repair_space>store<seq2seq4repair_space>browser<seq2seq4repair_space>bean" , e ) ; } } finally { SecurityActions . setContextLoader ( null ) ; } } @ Override public synchronized void stop ( final StopContext context ) { } @ Override public synchronized TransactionManagerService getValue ( ) throws IllegalStateException { } Injector < JBossXATerminator > getXaTerminatorInjector ( ) { } Injector < ORB > getOrbInjector ( ) { } Injector < SocketBinding > getSocketProcessBindingInjector ( ) { } }

Fix:
jtaEnvironmentBean . setLastResourceOptimisationInterfaceClassName ( LastResource . class . getName ( ) ) ;