Atomikos Forum

commit failure handling

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.
Kevin Pepper Send private email
Wednesday, May 13, 2009
 
 
Did you 'init' the resource with the spring init-method?

Guy
Guy Pardon Send private email
Friday, May 15, 2009
 
 
Thanks for your reply.
Both resources are init'ed...

<bean id="dataSource"
class="com.atomikos.jdbc.AtomikosDataSourceBean" init-method="init" destroy-method="close">
.....

and

<bean id="queueConnectionFactoryBean" class="com.atomikos.jms.QueueConnectionFactoryBean" init-method="init">
Kevin Pepper Send private email
Thursday, May 21, 2009
 
 
Hi,

This would hopefully be solved in our upcoming 3.5.5

HTH
Guy Pardon Send private email
Thursday, June 04, 2009
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics