Atomikos Forum |
|
I've been doing some tests with MQ and sql server, reading a message from a queue and in the same Atomikos xa transaction, updating the database. I restarted the sql server instance, forcing a commit failure in the queue listener application...
WARNING: XA resource 'SqlServer': commit for XID '636F6E73756D657230303038303030303238:636F6E73756D6572313535' raised -3: the XA resource detected an internal error [java] javax.transaction.xa.XAException: com.microsoft.sqlserver.jdbc.SQLServerException: The connection is closed. [java] at com.microsoft.sqlserver.jdbc.SQLServerXAResource.DTC_XA_Interface(SQLServerXAResource.java:642) [java] at com.microsoft.sqlserver.jdbc.SQLServerXAResource.commit(SQLServerXAResource.java:708) [java] at com.atomikos.datasource.xa.XAResourceTransaction.commit(XAResourceTransaction.java:957) [java] at com.atomikos.icatch.imp.CommitMessage.send(CommitMessage.java:94) The listener didn't seem to be able to recover from this, resulting in an endless loop giving the same error over again. I kill -9'ed (kill wasn't enough) the application and restarted. I then got the following error which would not clear.... [java] WARNING: XAResourceTransaction consumer0008000028consumer155: no XAResource to commit - the required resource is probably not yet intialized? [java] 13-May-2009 13:46:55 com.atomikos.diagnostics.Slf4jConsole println [java] WARNING: Unexpected error in commit [java] com.atomikos.icatch.HeurHazardException: Heuristic Exception [java] at com.atomikos.datasource.xa.XAResourceTransaction.commit(XAResourceTransaction.java:931) I checked msdtc and it showed a matching in-doubt transaction. I'm using spring to plug everything together. Any advice on what to do in this kind of scenario or explanation as to the behaviour? Cheers. |