[Proxool-developer] Closed Connection and Rollback of a transaction
UNMAINTAINED!
Brought to you by:
billhorsman
From: Mahendra KC <mah...@ho...> - 2007-01-24 18:52:06
|
Hello all,=20 I am facing a tricky situation when I am inside a jdbc transaction and the = connection is closed by Proxool because of timeout. As expected, My method = throws an exception and in my catch I normally do rollback(). Because the c= onnection is closed, as expected, now my rollback is throwing a null pointe= r exception. =20 My understanding is that there is no standard specified in JDBC API to det= ermine the transactional behavior when the underlying connection is closed = before commit/rollback. Probably it is more of a database/driver vendor spe= cific implementation to decide rollback or commit in the situation where co= nnection is closed. I am using Oracle 10g, oracle thin driver ( with Hibernate as ORM layer) an= d my default in the above scenario happens to be "commit" instead of "rollb= ack". =20 Is there a way in Proxool to intercept connection when it is about to be au= tomatically closed so that I can rollback before that? The closest I can fi= nd is the onDeath() method from the ConnectionListener but that method will= be always called irrespective of a natural/unnatural death.=20 I am hoping there must be a way to get around this common problem. =20 Thanks MKC =20 =20 _________________________________________________________________ Try amazing new 3D maps http://maps.live.com/?wip=3D51= |