eager-release is for j2ee. We can, and should, release the connection to the pool as soon as we can, and rely on the pooling mechanism to give us back a new connection when we need it.
Inside the app server, the close on the connection doesn't really close the connection, just returns it to the pool. cheers, Matthew -----Original Message----- From: Chris Lewington [mailto:clewing@;ebi.ac.uk] Sent: Thursday, October 17, 2002 9:10 AM To: [EMAIL PROTECTED] Subject: BUG REPORT: OJB 0.9.7 - Commit Failure In Eager Release Mode Hi all, Just trapped a little bug in the StatementManager.closeResources() method, as follows: When in a PB transaction under eager-release mode, the StatementManager closes the connection which then causes any updates within the transaction to be lost. Simple workaround is as follows (in method StatementManager.closeResources()): if (m_eagerRelease) { if (broker.isInTransaction()) { //CL: don't close the connection yet as updates will be lost!! } else { broker.getConnectionManager().releaseConnection(); } } I left the logic like that rather than test for a negative as it helps me to read why I shouldn't close things - feel free to hack it around. By the way, how can you keep the connection open until you want to close it? I may be missing something but it seems as though the connection gets closed (in eager-release) every time a statement gets executed, which could be a bit expensive when doing lots of queries. Cheers, Chris -- To unsubscribe, e-mail: <mailto:ojb-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:ojb-user-help@;jakarta.apache.org> -- To unsubscribe, e-mail: <mailto:ojb-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:ojb-user-help@;jakarta.apache.org>
