Solved

how to get OracleConnection from weblogic pooled connection?

Posted on 2004-09-21
8
740 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Get HTML5 Certified

Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
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.
Suggested Courses

622 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