Clinton, On Tue, Apr 20, 2010 at 7:48 PM, Clinton Begin <clinton.be...@gmail.com>wrote:
> Okay, I've looked around. It is really hard to find the way it's > "supposed" to work, but I don't think it matters. There's more than enough > empirical evidence (both in iBATIS 2 and Adinath's custom implementation). > So I've added the close to the ManagedTransaction. It will log but > otherwise ignore exceptions thrown by close(), to deal with unexpected > states (and re-throwing an exception from close could hide a more important > root cause exception). > It is hard to find info on this, there is a WebSphere (from 2005) article ( http://www.ibm.com/developerworks/websphere/library/techarticles/0506_johnsen/0506_johnsen.html) about this topic that says: *When the application closes a shareable connection, the connection is not truly closed, nor is it returned to the Free pool. Rather, it remains in the Shared connection pool, ready for another request within the same LTC for a connection to the same resource. ** LTC = Local Transaction Containment The funny thing is that I even had a unit test asserting this behavior, so I > must have done it at some point for a reason. I just hope it wasn't a very > good reason. ;-) Haha, been there :) > It's also funny that it wasn't found in 10 betas... which either implies > that not many people use managed transactions, or that some app servers > behave as I thought they would. > > I'm going to recommend a re-build before we take iBATIS 3 to GA, so the > iBATIS release we'll vote on will probably be 3.0.1. > Thanks, I think your changes are going to help others avoid this issue. Keep up the excellent work. Best, Adi -- Acciente, LLC Systems Architecture and Software Design www.acciente.com www.inductionframework.org