You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2011/09/23 01:23:49 UTC
DO NOT REPLY [Bug 51879] New: Improve need to access Native
Interfaces
https://issues.apache.org/bugzilla/show_bug.cgi?id=51879
Bug #: 51879
Summary: Improve need to access Native Interfaces
Product: Tomcat Modules
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: jdbc-pool
AssignedTo: dev@tomcat.apache.org
ReportedBy: youngm@gmail.com
Classification: Unclassified
I'm attempting to use tomcat-jdbc with Oracle Streams AQ. Oracle Streams AQ
requires a connection of type OracleConnection. Streams AQ will also under
some circumstances close the OracleConnection it is using. If I use unwrap to
get an OracleConnection and then Streams AQ closes that connection it will
leave my tomcat-jdbc pool in a messed up state since connections will be closed
that tomcat-jdbc thinks are open.
I can see 2 ways tomcat-jdbc may be able to help simplify this use case for
developers:
1. Tomcat JDBC can proxy connections it returns from Wrapper.unwrap with the
interface provided. Currently tomcat-jdbc's ProxyConnection class will only
unwrap to PooledConnection or XAConnection. Otherwise it simply returns the
physical connection.
For example, if I am using the ResetAbandonedTimer interceptor and need to take
advantage of an Oracle specific method in oracle.jdbc.OracleConnection I would
like to be able to invoke:
OracleConnection oraCon = connection.unwrap(OracleConnection.class);
oraCon.someOracleSpecificCommand();
my use of oraCon could still invoke ResetAbandonedTimer.
Or if I were to invoke oraCon.close() this should correctly return this
connection to the pool.
FYI, this is how Websphere's connection pool implements unwrap.
2. When creating the original connection in
org.apache.tomcat.jdbc.pool.ConnectionPool.getProxyConstructor() include in the
proxied interfaces any interfaces the native connection also implements. That
way I wouldn't need to unwrap the tomcat-jdbc provided connection since it will
already implement the native connection's interfaces.
FYI, this is how Oracle UCP works.
Thoughts? I'd be happy to provide a patch if the functionality is desirable.
Mike
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 51879] Improve access to Native Connection Methods
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51879
Mike Youngstrom <yo...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Improve access to Native |Improve access to Native
|Connection Interfaces |Connection Methods
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 51879] Improve access to Native Connection
Interfaces
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51879
Mike Youngstrom <yo...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Improve need to access |Improve access to Native
|Native Interfaces |Connection Interfaces
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 51879] Improve access to Native Connection Methods
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51879
Filip Hanik <fh...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--- Comment #1 from Filip Hanik <fh...@apache.org> 2012-03-20 15:49:26 UTC ---
patch and test cases would be helpful
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org