Vikram Rai wrote:
Hi Armin
Thanks for the quick and incisive response as always!
We're using a pretty old release of OJB. We're using OJB1.0RC4.
doh!? This is a really old version! Don't know if all of my suggestions will work with rc4 too (but I think they do).
Do you think it is OK to put in eager-release with this version of OJB, since we read that this was the version for which the eager-release was created. Of course we have eager-release in conjunction with autoCommit="0" as suggested in the OJB Deployment Guide.
eager-release 'true' immediately release the used connection when
StatementManager#closeResources(Statement stmt, ResultSet rs)
was called by OJB.
With useAutoCommit setting '0' OJB does not change autoCommit. I don't know what's the default setting of the used DataSource. If you don't use JTA-tx (and don't enable JTA integration of OJB in OJB.properties file) I assume autoCommit 'true'.
Anyway I think you run into problems:
If autoCommit is always 'true' you can't rollback store of object graphs (each object will be immediately written to DB and you could only rollback the last one).
If autoCommit was always 'false' the enabled eager-release could release uncommited connections (if you begin a PB-tx and store objects and do a query the connection was closed before you can do PB-tx commit).
If you want to use such a configuration (eager-release 'true' and useAutoCommit '0' - it seems you want ;-)), I recommend to write some tests to verify store/delete/rollback of complex object graphs.
If the connection/DataSource autoCommit setting was controlled by the appServer/TxManager then it could be work (that was the idea of JBoss workaround)
Also, if I understand what you're saying correctly, once I'm done using a broker, I can explicitly do
a:broker.serviceConnectionManager().releaseConnection(); before I do a broker.close() thereby closing the connection and returning it to the app server connection pool?
yep! StatementManager#closeResources use the same method when eager-release is true (but you can't control the connection release).
regards, Armin
Thanks & Regards
Vikram
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
