We are currently migrating our application technical base from
- JBOSS AS 4.0.3 SP1 to JBOSS AS 4.2.3 GA.
- JRules 6.5 to JRules 7.0.2
- Oracle 9i to Oracle 10g
After installing everything we experienced a problem we never faced before.
In fact every time our web application called the Jrules rule engine we recieved an Exception saying the transaction couln't enlist multiple resources.
After browsing the web we found out there was a change in JBoss's transaction manager default behaviour:
However we cannot figure out why we get this error.
Indeed what we understood from the jboss Datasource documentation is that datasources defined by the tag <xa-datasource> support 2 phase comit and that <local-xa-datasource> ones only support one phase comit.
Yet our application only requires 2 different datasources:
- It's own datasource to access the database, which is defined as a <local-xa-datasource>
- and the JRules datasource only used by JRules modules which is defined as a <xa-datasource>
Therefore, we shouldn't enlist more than a two phase comit and a one phase comit resource in the same transaction.
We first tried to convert our <local-xa-datasource> into a <xa-datasource> thinking it would convert it into a 2 phase comit compatible resource but it didn't change anything.
So we decided to settup the com.arjuna.ats.jta.allowMultipleLastResources property to true in the jbossjta-service.xml file. This seems to fix our problem and probably got our application to work just like before.
However as the documentation says this property is only a workaround and we still believe we should find an other solution.
Now, every time our transaction rollbacks on our resource after invoking JRules we get a javax.transaction.HeuristicMixedException (WARNING) which we assume means the transaction comited our JRules resource but rollbacked our own.
Is our datasource comprehension incorrect?
Is there an obvious settup configuration we missed?
I noticed the following configuration which as we understand is only used to activate the LRCO optimization, but maybe we misunderstood:
Do you have any idea?
PS: We decided to post this thread in the datasource section as we believe the problem might be our datasource configuration.
Please excuse our english.