Solved

how to get OracleConnection from weblogic pooled connection?

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
hash value 2 39
stringclean challenge 26 58
Understanding websocket example in spring 1 43
Java array passed to SQL where clause 23 43
I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

743 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now