-
Bug
-
Resolution: Done
-
Major
-
12.0.0.CR1
-
None
By hanging RTS tests (JBTM-2995) we found there is a race condition happening in definition of JTS vs. JTA transaction manager implementation for the JTAEnvironmentBean.
It could happen that
- transaction manager imple class is pushed to the JTAEnvironmentBean from narayana-jts-idlj by descriptor jbossts-properties.xml as JTS implementation
- recovery process is started and takes info about used JTS implementation for the manager and thus runs XAImporter in jts version
- JTAEnvironmentBean is changed to report JTA is in use
- recovery fails as ORB was not initialized
Some more details:
When the failure happens the jts version is in serve (com.arjuna.ats.internal.jta.transaction.jts.jca.TransactionImporterImple). That's because of race condition of transaction manager instance being used. The SubordinationManager decides based on the transaction manager implementation is setup in JTAEnvironmentBean (https://github.com/jbosstm/narayana/blob/master/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/transaction/arjunacore/jca/SubordinationManager.java#L144). At time the JTAEnvironmentBeanService is started (https://github.com/wildfly/wildfly/blob/master/transactions/src/main/java/org/jboss/as/txn/service/JTAEnvironmentBeanService.java#L60) the content of the transactionManagerClassName is setup (https://github.com/jbosstm/narayana/blob/master/ArjunaJTA/jta/classes/com/arjuna/ats/jta/common/JTAEnvironmentBean.java#L54) based on the jbossts-properties.xml from https://github.com/jbosstm/narayana/blob/master/ArjunaJTS/narayana-jts-idlj/src/main/resources/jbossts-properties.xml#L149 where jts transaction manager is configured. Then recovery manager service is started and before the setup to the JTA transaction manager, by definition taken from standalone.xml in WFLY, is done (https://github.com/wildfly/wildfly/blob/master/transactions/src/main/java/org/jboss/as/txn/service/ArjunaTransactionManagerService.java#L102) the recovery already starts (https://github.com/wildfly/wildfly/blob/master/transactions/src/main/java/org/jboss/as/txn/subsystem/TransactionSubsystemAdd.java#L243) and uses jts importer which fails of not having ORB configured.
- blocks
-
JBTM-2995 RTS InboundBridgeRecoveryTestCase hanging
- Closed