Re: Oracle "Set Transaction" behavior, connection pool request
Christian Vest Hansen <[email protected]> Thu, 22 Jun 2006 17:49:51 +0200
| Newsgroups | gmane.text.xml.resin.user |
|---|---|
| Message-ID | <[email protected]> |
Hello, Will Jaynes wrote: > I want to suggest that a change to the connection pool code be considered. > (...) > The pool has the ultimate responsibility to return Connections in > proper state. It could for example call "commit" (or "rollback") on > any Connection returned to the pool, which would properly reset the > Oracle transaction context (this is what's usually recommended as a > solution for Oracle there). In the event of a code change, I'de humbly suggest that the connection pool would call "rollback" rather than "commit". It is not the responsibility of the connection pool to commit other peoples half completed transactions. The only reason I can think of that would lead to a Connection having something left to commit, would be that autocommit was set to 'false' and someone didn't manage to complete the transaction because of some error, so naturally the transaction is in a bogus state and shouldn't be committed. Hence I suggest using rollback instead. Just a thought. Cheers, Christian Vest Hansen.