Atomikos Forum

Recovery with Oracle

Hello,

Using Atomikos 3.8.0 with Oracle and Spring.

Please help by explain the following situations, questions:

Situation A:

 1. Start a @Transactional method
 2. Do some DB sql updates
 3. Kill the application before the method ends
 4. ! Records remain locked into DB and after application restart Atomikos doesn't recover, rollback that transaction.

Q: Why Atomikos doesn't recover the lock/transaction and thus it is kept in the database until the timeout occurs.


Situation B:
 1. Start a @Transactional method
 2. Do some DB updates
 3. Leave the @Transactional method to end, thus commit to be called and kill the application in Atomikos code after XAResourceTransaction.prepare() is called (more exactly after the line ret = xaresource_.prepare ( xid_ );)
 4. In this case when the application is started Atomikos recovers the transaction.


I went to see what's happening in Oracle, after XAResourceTransaction.prepare(), I notice that in DBA_PENDING_TRANSACTIONS table appear a new records. Oracle also has a view V$GLOBAL_TRANSACTION in which a record appears after the transaction is created but it seems Atomikos doesn't see those records.

So, how shall I deal with situation 1?
Use some oracle specific tools for rolling back that transaction (cannot wait for 30 min for example till the timeout)? 

Thank you in advance,
Dumitru
Dumitru Boldureanu Send private email
Tuesday, November 05, 2013
 
 
Situation A describes an active transaction - XA does not permit recovery of those. The only way is to have them time out in the database. AFAIK this is standard Oracle behavior, event without XA.

The advantage of XA in this case is that at least you can specify a transaction timeout - maybe you can try setting a lower transaction timeout?

HTH
Guy Pardon Send private email
Sunday, December 08, 2013
 
 

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

Other recent topics Other recent topics