Atomikos Forum

Why is XAResourceTransaction.suspend() called on conn close?

Hello,

I am using Atomikos TransactionsEssentials and I noticed that com.atomikos.datasource.xa.XAResourceTransaction.suspend() is being called every time I call close on my connection inside of a transaction.

Can somebody shed some light as to what this call is for?
It seems to be quite expensive and I am trying to figure out if this is normal or if I am doing something wrong. If it is normal, is there a way to prevent this call from happening?

Here are more details about my scenario:

1. I am running in a stand alone application (no app server)
2. I am using the default jta.properties
3. I run against Oracle 11.2.0
4. In the scenario I am profiling I do series of reads and writes, each borrowing connection from pool and then calling close on it when done. Everything happens inside of one XA transaction.

Once again, I am noticing one call to suspend() for each close.

Thank you and regards,
Seb
Seb Bolo Send private email
Tuesday, March 05, 2013
 
 
While I still don't know what and why suspend is called, I figured why it was taking a very long time in my stand alone app. I was using an old version of the ojdbc drive (14 instead of 6). As soon as I rectified that problem, things start working a lot faster.

While this is not an issue for me now, I would still be interested to understand the mechanics of this XAResourceTransaction.suspend() if somebody has the time and knowledge to share.

Thanks,
Seb
Seb Bolo Send private email
Thursday, March 07, 2013
 
 
True, we do call the backend every time you close the connection for now. We do have something in our backlog to improve this but nothing implemented so far.
Guy Pardon Send private email
Saturday, March 30, 2013
 
 

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

Other recent topics Other recent topics