You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Many connection pool providers return proxies from the .unwrap() method. They use the proxy to block various methods "dangerous" to their pool like close(), etc. One such implementation is Websphere's. This renders the current Jdbc4NativeJdbcExtractor mostly useless as it will simply return a proxy of type Connection. I think it would be more useful and more semantically correct to support specifying the interface type to be returned by the getNative() methods.
That's a good point, and actually even intended to be that way according to the JDBC unwrap javadoc. For Jdbc4NativeJdbcExtractor to have some guaranteed effect, we'll have to specify the actual target API types...
I've added setConnectionType/setStatementType/etc methods to Jdbc4NativeJdbcExtractor, as well as an OracleJdbc4NativeJdbcExtractor with pre-configured Oracle JDBC API types. This will be available in tomorrow's 3.0.5 snapshot.
Mike Youngstrom opened SPR-7613 and commented
Many connection pool providers return proxies from the .unwrap() method. They use the proxy to block various methods "dangerous" to their pool like close(), etc. One such implementation is Websphere's. This renders the current Jdbc4NativeJdbcExtractor mostly useless as it will simply return a proxy of type Connection. I think it would be more useful and more semantically correct to support specifying the interface type to be returned by the getNative() methods.
Affects: 3.0.4
Referenced from: commits ccded10
The text was updated successfully, but these errors were encountered: