db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "TomohitoNakayama" <tomon...@basil.ocn.ne.jp>
Subject conn.rollback in Database#close() even though there are either conn.commit in Database#commit() and conn.rollback in Database#rollback()
Date Tue, 05 Jul 2005 14:16:54 GMT

Chasing DERBY-397,
I again came to have question why connection was rollbacked in 

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 
transaction stays active and is just impossible to close , failed closing 

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



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

View raw message