On 3/10/06, David Blevins <[EMAIL PROTECTED]> wrote:
> Been working with Bruce and Ralf a bit on removing this log message
> that actually means nothing for people using LocalTransactionContext
> who commit/rollback as they should.
>
> Bruce, the jar you sent didn't seem to do the trick but this change
> to the finalize method does the trick:
>
> protected void finalize() throws Throwable {
> if (_scope == null || !_ctx.isOpen() ) {
> return;
> }
>
> if (_ctx instanceof LocalTransactionContext ||
> (_ctx instanceof GlobalTransactionContext && !
> _isPoolInUseForGlobalTransactions)) {
> // retrieve SQL bound to this Database instance
> OQLQuery oqlQuery = getOQLQuery();
> String sql = ((OQLQueryImpl) oqlQuery).getSQL();
>
> _log.warn(Messages.format("jdo.finalize_close",
> this.toString(), _dbName, sql));
> }
> close();
> }
>
>
> Aside from the annoying and false log message, I'd like to avoid the
> needless synchronized call to close() in the finalizing thread.
>
> Anyway, this patch kosher?
It looks good to me, but I'd like Ralf and Werner to chime before I commit it.
Bruce
--
perl -e 'print unpack("u30","D0G)[EMAIL
PROTECTED]&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'
Apache Geronimo (http://geronimo.apache.org/)
Castor (http://castor.org/)
-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:
[EMAIL PROTECTED]
-------------------------------------------------