Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

how to get OracleConnection from weblogic pooled connection?

Posted on 2004-09-21
8
Medium Priority
?
777 Views
Last Modified: 2012-08-13
I am using Weblogic 7.0 SP4.I want to get OracleConnection from weblogic.jdbc.pool.Connection which is being returned by the datasource.How can i do that?

I am able to do it in Web Sphere and here is the code of how i do it in Websphere.
Connection dsconn = ds.getConnection();
java.sql.OracleConnection oconn =(java.sql.OracleConnection) com.ibm.ws.rsadapter.jdbc.WSJdbcUtil.getNativeConnection((com.ibm.ws.rsadapter.jdbc.WSJdbcConnection) dsconn);

But i want to export this code to weblogic 7.0 SP4 and i don't know how to do that?Can someone help me by answering this.

Thanks,
0
Comment
Question by:sunilramu
  • 3
8 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 1000 total points
ID: 12116783
Why do you need to get an OracleConnection btw as opposed to a Connection?
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 12116886
Have you tried casting it to an OracleConnection?
0
 
LVL 92

Assisted Solution

by:objects
objects earned 1000 total points
ID: 12118168
try:

java.sql.OracleConnection oconn = (java.sql.OracleConnection) dsconn.getVendorConnection();
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 12401325
Difficult to say much without questioner feedback
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question