Solved

how to get OracleConnection from weblogic pooled connection?

Posted on 2004-09-21
8
700 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 250 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 250 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Java Timer (static) 9 43
How to monitor the number of connections/threads being utilized on Tomcat 6.0 8 70
javap bin 2 34
difference of if loops 23 49
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
The viewer will learn how to implement Singleton Design Pattern in Java.

776 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