[
http://jira.jboss.com/jira/browse/JBAS-3258?page=all ]
Adrian Brock updated JBAS-3258:
-------------------------------
Comment: was deleted
JDBC artificats should throw SQLException when already closed
-------------------------------------------------------------
Key: JBAS-3258
URL:
http://jira.jboss.com/jira/browse/JBAS-3258
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: JCA service
Affects Versions: JBossAS-4.0.4.GA
Reporter: Adrian Brock
Assigned To: Weston Price
Fix For: JBossAS-4.0.5.CR1, JBossAS-4.0.4.SP1
In the change to fix JBAS-2741 I mistakenly made the JDBC wrappers throw an SQL
exception if the artifact is already closed. They should just return with an exception.
From the Javadoc:
"Calling the method close on a Statement object that is already closed has no
effect."
e.g. In WrappedStatement
public void close() throws SQLException
{
synchronized (lock)
{
if (closed)
throw new SQLException("Already closed");
closed = true;
}
lc.unregisterStatement(this);
internalClose();
}
this should be:
public void close() throws SQLException
{
synchronized (lock)
{
if (closed)
return;
closed = true;
}
lc.unregisterStatement(this);
internalClose();
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira