[jboss-jira] [JBoss JIRA] (WFLY-9925) Transaction manager definition race condition when setup after recovery service alread started
Ondra Chaloupka (JIRA)
issues at jboss.org
Tue Feb 27 09:35:00 EST 2018
Ondra Chaloupka created WFLY-9925:
-------------------------------------
Summary: Transaction manager definition race condition when setup after recovery service alread started
Key: WFLY-9925
URL: https://issues.jboss.org/browse/WFLY-9925
Project: WildFly
Issue Type: Bug
Components: Transactions
Affects Versions: 12.0.0.CR1
Reporter: Ondra Chaloupka
Assignee: Ondra Chaloupka
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.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
More information about the jboss-jira
mailing list