[jboss-jira] [JBoss JIRA] (JBJCA-952) JBossWrapper only checks directly wrapped objects in unwrap/isWrapperFor

James Livingston (JIRA) jira-events at lists.jboss.org
Thu Dec 20 01:42:08 EST 2012


     [ https://issues.jboss.org/browse/JBJCA-952?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James Livingston updated JBJCA-952:
-----------------------------------

    Description: 
The JavaDoc for the JDBC Wrapper class (http://docs.oracle.com/javase/6/docs/api/java/sql/Wrapper.html) says unwrap() should
1) return itself or a proxy when the reicever implements the interface
2) return the wrapped object or a proxy when the wrapped object implements the interface
3) call the wrapped object's unwrap() method if the receiver is a wrapper
4) other throw a SQL exception

JBossWrapper only does 2 and 4.

This means that is you have a WrappedConnectionJDK6 which wraps another wrapper which wraps OracleConnection, there you cannot get to the OracleConnection.

  was:
The JavaDoc for the JDBC Wrapper class (http://docs.oracle.com/javase/6/docs/api/java/sql/Wrapper.html) says unwrap() should
1) return itself or a proxy when the reicever implements the interface
2) return the wrapped object or a proxy when the wrapped object implements the interface
3) call the wrapp object's unwrap() method if the receiver is a wrapper
4) other throw a SQL exception

JBossWrapper only does 2 and 4.

This means that is you have a WrappedConnectionJDK6 which wraps another wrapper which wraps OracleConnection, there you cannot get to the OracleConnection.


    
> JBossWrapper only checks directly wrapped objects in unwrap/isWrapperFor
> ------------------------------------------------------------------------
>
>                 Key: JBJCA-952
>                 URL: https://issues.jboss.org/browse/JBJCA-952
>             Project: IronJacamar
>          Issue Type: Bug
>          Components: JDBC
>            Reporter: James Livingston
>            Assignee: Jesper Pedersen
>
> The JavaDoc for the JDBC Wrapper class (http://docs.oracle.com/javase/6/docs/api/java/sql/Wrapper.html) says unwrap() should
> 1) return itself or a proxy when the reicever implements the interface
> 2) return the wrapped object or a proxy when the wrapped object implements the interface
> 3) call the wrapped object's unwrap() method if the receiver is a wrapper
> 4) other throw a SQL exception
> JBossWrapper only does 2 and 4.
> This means that is you have a WrappedConnectionJDK6 which wraps another wrapper which wraps OracleConnection, there you cannot get to the OracleConnection.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list