Solved

how to get OracleConnection from weblogic pooled connection?

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

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Which non-HTML GUI front end to use with Java? 3 52
java example issue 5 44
Java basic valueOf question 1 34
Fast way to search item into Java Array (Rhino compatible) 2 39
In this post we will learn different types of Android Layout and some basics of an Android App.
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 learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

749 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