Dec 7th, 2010, 10:50 AM
Transactional issue: XAException: The method 'xa_end' has failed with errorCode '100'
After endless hours of google'ing and debugging I just can't figure out the solution to a problem I'm having and I was wondering if you could take a look at my situation. Sadly enough I'm not an expert in MQ and JTA, and figuring out this problem has become quite a struggle.
I've got a Spring 2.5.6 (with EJB3) + Hibernate + MQ V220.127.116.11 application framework running on a Glassfish 2.1.1 server.
The point where it goes wrong is when one of my handlers is dealing with a message from a queue in a big transaction in order to send it along to another queue. The normal workflow is not a problem, but when the output queue is full, an exception is thrown and the big transaction is rolled back. That's also successful.
However, when that exception is thrown, the application first has to catch the exception, wrap it in another message and send that message to another queue. That while the big transaction is in suspended mode and the wrapping and sending of the new message is done in a new transaction with propagation: Required_New.
The problem occurs in trying to commit the latter transaction. For some reason MQ gives me an error on the call to commit the new transaction.
Here are some logs to illustrate what's happening:
The SessionException (Session was already closed) is kind of hard to figure out, and it could have something to do with the 'xa_end' exception later on?
And that exception - JTS5064: Unexpected exception occurred while delisting the resource javax.transaction.xa.XAException: The method 'xa_end' has failed with errorCode '100'. - is the major problem. I've enabled JTA debug logging, but it seems pretty solid.
Do you notice anything strange or anything I can test out to resolve this issue?
Any help would be greatly appreciated!
Dec 9th, 2010, 05:59 AM
Could really use some input on this