Hi,

Do you remember our problem with transactions in WebLogic?
We found a solution!
1. we set the JDO properties databasePooling to true.
2. however this was not sufficient. Another problem was that every time we
closed the database connection (db.close()) the _scope properties was set
to null. So that when the a connection was taken from the "pool" we got a
NullPointerException when the _scope was used. To solve it we changed the
close() method of the DatabaseImpl, so that it set the _scope properties to
null ONLY if the the transaction context is null or closed.
What do you think about? It is correct?

Merry Christmas.
Patrick

This is our new close() method:

    public synchronized void close()
        throws PersistenceException
    {
        try {
            if ( _transaction == null ) {
                if ( _ctx != null && _ctx.isOpen() ) {
                    try {
                        _ctx.rollback();
                    } catch ( Exception except ) {}
                    try {
                        _ctx.close();
                    } catch ( Exception except ) {}
                    _scope = null;
                    throw new PersistenceException
( "jdo.dbClosedTxRolledback" );
                }
            }
        } finally {}
    }


Patrick Herber
Software Engineer

CSC Switzerland AG
Technologie und Softwareentwicklung
Binzm�hlestrasse 14
CH-8050 Z�rich
Phone: +41 (0)1 307 26 53
Fax: +41 (0)1 307 22 10
Mobile: +41 (0)79 211 35 01
E-Mail: [EMAIL PROTECTED]
http://www.ch.csc.com

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to