my dog learned polymorphism
The moose likes BEA/Weblogic and the fly likes Using OracleOCIConnectionPool in WebLogic 6.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Using OracleOCIConnectionPool in WebLogic 6.1" Watch "Using OracleOCIConnectionPool in WebLogic 6.1" New topic

Using OracleOCIConnectionPool in WebLogic 6.1

Bob Runstein

Joined: May 21, 2002
Posts: 6
I need to configure an OracleOCIConnectionPool so that I can use the OracleOCIConnectionPool.getProxyConnection method to have the connection act on behalf of a user other than the one used to open the connections in the pool. I also need these connections to support container managed EJB transactions, so the pool needs to be registered with WebLogic so the EJB container can access the connections.
I can create the pool in the WebLogic console and configure a datasource for it, but the datasource returns only the connection, not the OracleOCIConnectionPool which is required to set a different user context for the connection.
I can create the pool in code, but then how do I register it with WebLogic so I can use container managed transactions?

Bob Runstein<br />Microsoft Certified Professional<br />Sun Certified Developer for the Java 2 Platform<br />Sun Certified Enterprise Architect for the Java 2 Platform<br /> <br />BR Solutions LLC<br />20797 E. Fair Ln<br />Centennial, CO 80016<br />720-870-7244 home<br />720-254-8966 cell<br />
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
I don't think this is possible in WebLogic. In order to participate in a CMT or a distributed transaction WebLogic requires the source to be a TxDatasource. Unfortunately a TxDatasource can only be backed by a WebLogic ConnectionPool. You can use the Oracle JDBC Driver, but I don't think you can take advantage of Oracle's OracleOCIConnectionPool.
Again, I don't think it is possible but I am not 100% sure. Contact BEA Support and see what kind of information they give you. Be sure to post back when you get the answer.
[ February 13, 2003: Message edited by: Chris Mathews ]
I agree. Here's the link:
subject: Using OracleOCIConnectionPool in WebLogic 6.1
It's not a secret anymore!