https://issues.apache.org/bugzilla/show_bug.cgi?id=49831

--- Comment #1 from Daniel Mikusa <dmik...@vmware.com> 2010-08-26 14:21:41 EDT 
---
Thinking that the logic should be modified slightly...

    private void disconnect(boolean finalize) {
        if (isDiscarded()) {
            return;
        }
        setDiscarded(true);
        if (connection != null) {
            try {
                parent.disconnectEvent(this, finalize);
                connection.close();
                if (xaConnection != null) {
                    xaConnection.close();
                }
            }catch (Exception ignore) {
                if (log.isDebugEnabled()) {
                    log.debug("Unable to close underlying SQL
connection",ignore);
                }
            }
        }
        connection = null;
        xaConnection = null;
        lastConnected = -1;
        if (finalize) parent.finalize(this);
    }

Since "connection" is always set it seems like it should always be closed. 
Then if "xaConnection" is set, it should be closed as well.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to