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

Daniel Hannum (JIRA) jira-events at jboss.com
Wed Sep 20 11:38:00 EDT 2006


    [ http://jira.jboss.com/jira/browse/JBAS-3258?page=comments#action_12343669 ] 
            
Daniel Hannum commented on JBAS-3258:
-------------------------------------

This temporary fix is not working for me. It won't compile because the two @Bind annotations are not allowed (duplicate annotation, it says). I've tried to adjust the pointcut to make it work with a single bind and it still throws the exceptions and still won't hit a breakpoint in the aspect.

How long until 4.0.4SP1 is out?

> 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