Atomikos Forum

Questions on recovery warnings.

Hello all,

I'm trying to use standalone transaction manager with two PostgreSQL databases in console application (driver org.postgresql:postgresql:9.2-1002-jdbc4, but with older 8.x situation was the same). I based my code on 3.8.0/examples/jse/simple/xa.

Before run, I cleaned log_base_dir. After each enlistResource() call it shows me:

INFO: Coordinator not recoverable: 32401@mine-0000100001

Then, even if first transaction was successful (I checked database contents and ensured no exceptions are thrown from tx.commit()), i.e. there's nothing to recover, in all subsecuent transactions it shows me many (10+) times same repeated warning when I call enlistResource():

WARNING: Error in recovery
org.postgresql.xa.PGXAException: Error during recover
        at org.postgresql.xa.PGXAConnection.recover(PGXAConnection.java:368)
        at com.atomikos.datasource.xa.XATransactionalResource.recover(XATransactionalResource.java:579)
        at com.atomikos.datasource.xa.XATransactionalResource.endRecovery(XATransactionalResource.java:669)
        at com.atomikos.icatch.imp.TransactionServiceImp.recover(TransactionServiceImp.java:604)
        at com.atomikos.datasource.xa.XATransactionalResource.setRecoveryService(XATransactionalResource.java:495)
        at com.atomikos.icatch.system.Configuration.addResource(Configuration.java:378)
        at com.atomikos.icatch.jta.TransactionImp.findRecoverableResourceForXaResource(TransactionImp.java:385)
        at com.atomikos.icatch.jta.TransactionImp.enlistResource(TransactionImp.java:304)
        at <my code where I call enlistResource()>

Can anybody please tell me what happens and how to fix things? Do these warnings relate with "Coordinator not recoverable" and how can I make it recoverable?
Dmitry Grigoriev Send private email
Tuesday, April 09, 2013
 
 
I forgot to add about recovery exception I've shown above:

Caused by: org.postgresql.util.PSQLException: This connection has been closed.
        at org.postgresql.jdbc2.AbstractJdbc2Connection.checkClosed(AbstractJdbc2Connection.java:822)
        at org.postgresql.jdbc3.AbstractJdbc3Connection.createStatement(AbstractJdbc3Connection.java:229)
        at org.postgresql.jdbc2.AbstractJdbc2Connection.createStatement(AbstractJdbc2Connection.java:294)
        at org.postgresql.xa.PGXAConnection.recover(PGXAConnection.java:341)
        ... 34 more

I collect in thread-local variable all XAConnections I open inside transaction, and after tx.commit() I close them all. Should I keep them open instead and reuse for new transactions instead? If yes, then is it OK to call getXAResource() for each new transaction, or should I cache them too?
Dmitry Grigoriev Send private email
Tuesday, April 09, 2013
 
 

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

Other recent topics Other recent topics