Equality of PreparedStatement

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Equality of PreparedStatement

c.bauer
Testing Hibernate 4.3  with Bitronix 2.1.3, it has some new JDBC handling code.

Connection#prepareStatement() returns a proxied JdbcUncachedPreparedStatementHandle, which wraps the original JDBC driver's PreparedStatement implementation.

When calling getStatement() on a ResultSet, you get the original PreparedStatement, not wrapped by Bitronix.

Hibernate 4.3 now relies on these two being equal(), I guess JdbcUncachedPreparedStatementHandle doesn't override this properly.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Equality of PreparedStatement

Brett Wooldridge-2
Hi Christian,

Thanks for reporting this.  We're on the cusp of releasing Bitronix 3.0 within the next week or two.  Can you create a bug report?  I'll be sure the fix for this gets into the release.  We need to intercept all the methods that return a ResultSet and instead return a proxied ResultSet whose getStatement() method returns the originating proxied statement.

Brett



On Sun, Mar 24, 2013 at 7:06 PM, Christian Bauer <[hidden email]> wrote:
Testing Hibernate 4.3  with Bitronix 2.1.3, it has some new JDBC handling code.

Connection#prepareStatement() returns a proxied JdbcUncachedPreparedStatementHandle, which wraps the original JDBC driver's PreparedStatement implementation.

When calling getStatement() on a ResultSet, you get the original PreparedStatement, not wrapped by Bitronix.

Hibernate 4.3 now relies on these two being equal(), I guess JdbcUncachedPreparedStatementHandle doesn't override this properly.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Loading...