Excellent explanation
Oraboy, December 19, 2011 - 9:40 am UTC
Thanks Tom. Couldn't have asked for a better explanation.
I clearly missed the point, a session could have multiple active transactions. But I am still unclear on how the application code could do this.
To my limited understanding, the application code should grab a connection/session from connection pool and use that pass on its db work & after its done, it releases back to connection pool. Since each unit of work would be capsuled within its transaction boundary, shouldn't the relation between transaction and session be always 1:1?
I can understand "pragma transaction" in plsql..but this application does not use any DB procedure. Your response actually made me more curious , now I want to dig through application code and its transaction management to understand more.
Thanks once again for this invaluable site.
December 19, 2011 - 4:41 pm UTC
XA is magic, it does strange things - really odd things. I don't have the ability to test it - but I'm pretty sure it would be the cause.
.. shouldn't the relation
between transaction and session be always 1:1? ..
not with XA. It in general is many to many.
Autonomous transactions?
Nathan Marston, December 19, 2011 - 9:54 pm UTC
Wouldn't this cause the relationship between transactions and sessions to be many to one also?
December 20, 2011 - 8:01 am UTC
no, it would be one to many. An autonomous transaction belongs to exactly one session. A session can have many autonomous transactions.