[jboss-jira] [JBoss JIRA] Commented: (JBAS-3258) JDBC artificats should throw SQLException when already closed

Adrian Brock (JIRA) jira-events at lists.jboss.org
Thu Nov 29 12:55:52 EST 2007


    [ http://jira.jboss.com/jira/browse/JBAS-3258?page=comments#action_12389843 ] 
            
Adrian Brock commented on JBAS-3258:
------------------------------------

Help requests go in the forums, not release notes.

> 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

        



More information about the jboss-jira mailing list