Am using Jboss Transactions 4.2 with JBoss AS 4.0.3sp1 and am having trouble XA to work.
I have done everything mentioned in the notes. http://labs.jboss.com/file-access/default/members/jbosstm/downloads/4.2/notes/jts_install.txt
Following describes what am trying to do:
I have two resources to deal with. One is Oracle - we are using OracleXA drivers. The second is WSMQ - using the non-xa version. We have wrapped that non-xa resource in an mbean that now implements the LastResource interface (to accomplish LRCO).
When running the application, we can see logs like the following which am hoping indicates that JBoss Ts 4.2 has been correctly applied to JBossAS:
11:20:04,020 INFO [logger] JTS XARecoveryModule - first pass
11:20:14,021 INFO [arjLogger] Periodic recovery - second pass <Fri, 16 Jun 2006 11:20:14>
11:20:14,021 INFO [arjLogger] AtomicActionRecoveryModule: Second pass
11:20:14,021 INFO [txojLoggerI18N] [com.arjuna.ats.internal.txoj.recovery.TORecoveryModule_6] - TORecoveryModule - second pass
This is how am doing the XA test: Put a breakpoint at the end of our onMessage() method in our mdb - ie, after persistence and message publishing has happened. When it gets to the breakpoint during remote debugging, the MQ connection is killed by stopping the channel in a queue manager. I get exceptions and all that good stuff. When I query the database, there IS data from the transaction. (BTW, when at the breakpoint I query the database and dont see the data as expected).
Any ideas as to what I could be doing wrong or not doing? Any tips on diagnostics I can do to get additional info? I have played with the following:
1. Changed com.arjuna.ats.arjuna.coordinator.commitOnePhase to NO
2. Changed com.arjuna.ats.arjuna.objectstore.objectStoreDir to a different dir.
3. Changed com.arjuna.ats.jts.contextPropMode to CONTEXT
4. Changed com.arjuna.common.util.logging.DebugLevel to full diagnostics. we cant seem to find anything meaningful that would indicate what's going wrong.
This has me stumped since tuesday - any help/info/direction will be greatly appreciated.
Sorry, but what is your question?
The database transaction should be rolled back.. but instead the commit is going through.
Apologies for the delay but Mark and I have been travelling back from JBossWorld.
Can I clarify what you are requesting?
You have two resources in your transaction, one is an Oracle XA resource and the other is a resource written by yourself.
You have set a breakpoint after the resource modifications have occurred but before the end of the transaction (at the end of the MDB onMessage). At this point you query the database and find no information.
You then drop the connection for your resource before allowing the transaction to continue.
After the transaction has completed you query the database and find the information present.
If this is correct then it would suggest that your XA resource is not voting to rollback the transaction. The data in the Oracle database would not be visible unless both resources had voted to commit in their prepare phase.
You mention that you are wrapping the second resource, can you elaborate?
Do you have a small testcase that we can look at?
Thanks for your response.
You have two resources in your transaction, one is an Oracle XA resource and the other is a resource written by yourself.That is not correct. The other resource is WS MQ 5.3 without the extended client jars - ie, the non XA version.
What we are attempting to do is leverage the LastResource marker interface to tag WS MQ and not have to use the extended version. We used this http://wiki.jboss.org/wiki/Wiki.jsp?page=SampleConfigurationForMQSeriesWebsphereMQ to configure WebSphere MQ as a JMS provider. We are tagging the WSMQConnectionFactory as specified in that sample as the LastResource.
I guess the real question is whether its possible to leverage LRCO to implement XA in the scenario above. If so, how? Use the LastResource marker intf to tag which implementing class(es)?
Are you enlisting the WS MQ resource or one you have written?
How are you tagging the resource and which LastResource interface you are referring to?
Have you tried to enlist the XA resource? If so, why did this not work?