Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable ability to specify interface types in Jdbc4NativeJdbcExtractor [SPR-7613] #12269

Closed
spring-projects-issues opened this issue Oct 3, 2010 · 2 comments
Assignees
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

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

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

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...

Juergen

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

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.

Juergen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants