aspose file tools*
The moose likes BEA/Weblogic and the fly likes creating JDBC Connection Pool in weblogic6.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "creating JDBC Connection Pool in weblogic6.1" Watch "creating JDBC Connection Pool in weblogic6.1" New topic
Author

creating JDBC Connection Pool in weblogic6.1

vasu devan
Ranch Hand

Joined: Apr 18, 2002
Posts: 37
Hi All,
I am trying to create JDBC connection pool in weblogic6.1 console, but I am not in position to get connected with the Oracle database.
I have used the following setting in the console.
NAME:My connection Pool
URL :jdbc:weblogic racle
DriverClassName:weblogic.jdbc.oci.Driver
Properties:user=scott server=<database server IP>
Is it correct? Do suggest me the right configuration.
Thanks in Advance
Vasu
[ May 01, 2002: Message edited by: champ ]
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

I hope u have set the password...U can do that by passing password property along with user property..BTW , have u targeted the pool to the server with u r connecting...Use the targets tab in the console to map the pool to the server..It would be better if u post the error message..
Originally posted by champ:
Hi All,
I am trying to create JDBC connection pool in weblogic6.1 console, but I am not in position to get connected with the Oracle database.
I have used the following setting in the console.
NAME:My connection Pool
URL :jdbc:weblogic racle
DriverClassName:weblogic.jdbc.oci.Driver
Properties:user=scott server=<database server IP>
Is it correct? Do suggest me the right configuration.
Thanks in Advance
Vasu
[ May 01, 2002: Message edited by: champ ]



Groovy
Rajeev Bakhru
Greenhorn

Joined: Jun 21, 2001
Posts: 28
Hi
Check whether u selected the connection pool in the services tab- JDBC in the console for the server.
Rajeev
vasu devan
Ranch Hand

Joined: Apr 18, 2002
Posts: 37
Hi pradeep bhat,
Thanks for the reply
I have set the password also. In the targets tab I have set the server name also.
I am just pasting my code below for you to check and suggest whether the approach is correct.

Class.forName("weblogic.jdbc.oci.Driver");
Connection con = DriverManager.getConnection("jdbc:weblogic racle","username","password");
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("sql");

The problem is I could not connect to the database. Do suggest me what is the problem.
Thanks
Vasu
Roshan Lal
Ranch Hand

Joined: Nov 13, 2001
Posts: 64
Originally posted by champ:
Hi All,
I am trying to create JDBC connection pool in weblogic6.1 console, but I am not in position to get connected with the Oracle database.
I have used the following setting in the console.
NAME:My connection Pool
URL :jdbc:weblogic racle
DriverClassName:weblogic.jdbc.oci.Driver
Properties:user=scott server=<database server IP>
Is it correct? Do suggest me the right configuration.
Thanks in Advance
Vasu
[ May 01, 2002: Message edited by: champ ]

I use something like:
Properties:--->
user=Test
password=Test
dll=ocijdbc8
protocol=thin
URL:---> (I am using oracle thin driver)
dbc racle:thin:@machine:1521 racleSID
Driver:--->
oracle.jdbc.driver.OracleDriver
Hope that helps!
arun sahni
Ranch Hand

Joined: Jan 16, 2002
Posts: 91
I too have similar problem with Bea6.1 connecting to Oracle 9. Is this dll=ocijdbc8 work for oracle9 also?


Arun Sahni<br />SCJP2,SWCD,<br />BEA Certified Specialist: Server <br />JCert Enterprise Developer for BEA.
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

Driver myDriver = (Driver)
Class.forName("weblogic.jdbc.pool.Driver").newInstance();
Properties props = new Properties();
props.put("connectionPoolID", "myConnectionPool");
Connection conn =
myDriver.connect("jdbc:weblogic ool", props);
Has the connection pool created properly ? U can observe this from admin console. If the pool is not created plz read the JDBC doc on oracle db.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: creating JDBC Connection Pool in weblogic6.1