Hello.

I followed myself.

I understood that we need to make connection to inactive state calling conn.rollback() or conn.commit() before conn.close()

In this sentence , "we" means user of Derby

Best regards.

/*

        Tomohito Nakayama
        [EMAIL PROTECTED]
        [EMAIL PROTECTED]
        [EMAIL PROTECTED]

        Naka
        http://www5.ocn.ne.jp/~tomohito/TopPage.html

*/
----- Original Message ----- From: "TomohitoNakayama" <[EMAIL PROTECTED]>
To: "Derby Development" <[email protected]>
Sent: Tuesday, July 05, 2005 11:16 PM
Subject: conn.rollback in Database#close() even though there are either conn.commit in Database#commit() and conn.rollback in Database#rollback()


Hello.

Chasing DERBY-397,
I again came to have question why connection was rollbacked in Database#close().


I understood that we need to make connection to inactive state calling conn.rollback() or conn.commit() before conn.close()

However ,
if user execute commit or rollback properly before closing session,
it seems that Database#commit() or Database#rollback() was called and
responding conn.commit() or conn.rollback() are called,
and transaction becomes inactive and is possible to close.

Else if user did not execute neither commit nor rollback before closing session, transaction stays active and is just impossible to close , failed closing connection.

In both case, we don't need to call rollback in Database#close().


Does Database#close() have something to do with case that session was closed by accident ? Or are there something to do with multiple database connected in single session ?


Best regards.


/*

        Tomohito Nakayama
        [EMAIL PROTECTED]
        [EMAIL PROTECTED]
        [EMAIL PROTECTED]

        Naka
        http://www5.ocn.ne.jp/~tomohito/TopPage.html

*/


--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.8.9/39 - Release Date: 2005/07/04




--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.8.9/39 - Release Date: 2005/07/04





--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.8.9/39 - Release Date: 2005/07/04

Reply via email to