Hello.
I annotated org.apache.derby.impl.drda.Database.java and
found call of conn.rollback() exists from "Initial code import"...
37083 coar protected void close() throws SQLException
37083 coar {
37083 coar
37083 coar try {
37083 coar if (stmtTable != null)
37083 coar {
37083 coar for (Enumeration e = stmtTable.elements() ;
e.hasMoreElements() ;)
37083 coar {
37083 coar ((DRDAStatement) e.nextElement()).close();
37083 coar }
37083 coar
37083 coar }
37083 coar if (defaultStatement != null)
37083 coar defaultStatement.close();
37083 coar if ((conn != null) && !conn.isClosed())
37083 coar {
37083 coar conn.rollback();
37083 coar conn.close();
37083 coar }
37083 coar }
37083 coar finally {
37083 coar conn = null;
37083 coar currentStatement = null;
37083 coar defaultStatement = null;
37083 coar stmtTable=null;
37083 coar }
37083 coar }
Hmm....
This calling conn.rollback() seems to have history ....
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, June 28, 2005 10:41 PM
Subject: Re: [jira] Updated: (DERBY-397) Make it sure for the connection to
be closed in drda.Database#close() even if Exception happens in
conn.rollback().
Hello.
Creating this DERBY-397, I came to be able to have a question around
drda.Database#close().
Why conn.rollback() is called from drda.Database#close() explicitly ...?
Thinking Network connection works same as Embedded connection,
calling conn.rollback() from drda.Database#close() is unnatural.
If rollback was needed needed , the rollback must be done in conn.close()
implicitly ...
Best regards.
/*
Tomohito Nakayama
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Naka
http://www5.ocn.ne.jp/~tomohito/TopPage.html
*/
----- Original Message -----
From: "Tomohito Nakayama (JIRA)" <[email protected]>
To: <[email protected]>
Sent: Tuesday, June 28, 2005 10:36 PM
Subject: [jira] Updated: (DERBY-397) Make it sure for the connection to be
closed in drda.Database#close() even if Exception happens in
conn.rollback().
[ http://issues.apache.org/jira/browse/DERBY-397?page=all ]
Tomohito Nakayama updated DERBY-397:
------------------------------------
Description:
If exeption was happen in conn.rollback() In the code of
drda.Database#close,
that connection was not closed and would be leaked.
http://svn.apache.org/repos/asf/incubator/derby/code/trunk/java/drda/org/apache/derby/impl/drda/Database.java
Make it sure to close connection between drda and engine, when
drda.Database#close was called.
was:
If exeption was happen in conn.rollback() In the code of
drda.Database#close,
that connection was not closed and would be leaked.
http://svn.apache.org/repos/asf/incubator/derby/code/trunk/java/drda/org/apache/derby/impl/drda/Database.java,
Make it sure to close connection between drda and engine, when
drda.Database#close was called.
Make it sure for the connection to be closed in drda.Database#close()
even if Exception happens in conn.rollback().
-------------------------------------------------------------------------------------------------------------------
Key: DERBY-397
URL: http://issues.apache.org/jira/browse/DERBY-397
Project: Derby
Type: Sub-task
Components: Network Server
Reporter: Tomohito Nakayama
Assignee: Tomohito Nakayama
If exeption was happen in conn.rollback() In the code of
drda.Database#close,
that connection was not closed and would be leaked.
http://svn.apache.org/repos/asf/incubator/derby/code/trunk/java/drda/org/apache/derby/impl/drda/Database.java
Make it sure to close connection between drda and engine, when
drda.Database#close was called.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.8.5/32 - Release Date: 2005/06/27
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.8.5/32 - Release Date: 2005/06/27
--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.8.5/32 - Release Date: 2005/06/27
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.8.5/32 - Release Date: 2005/06/27