File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes database connection pooling with weblogic 8.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "database connection pooling with weblogic 8.1" Watch "database connection pooling with weblogic 8.1" New topic
Author

database connection pooling with weblogic 8.1

Pooja Agarwal
Ranch Hand

Joined: May 19, 2004
Posts: 37
Hai All,

I am new to weblogic database connection pooling.
I am using Weblogic8.1 and want to use connection pooling to get a jdbc connection. my database server is Oracle 8.1.7.

Things which i have done using the weblogic admin console.
----------------------------------------------------------

I have created a Jdbc connection pool named myconnectionpool.
I have created a datasource named mydatasource.
and named the JNDI as myjndi.
Is the above process correct to create the connection pool in the weblogic8.1.

I am not aware of the java code to get the database connection object from the connection pool which i have created.
can any one please let me know the java code to get the connection from the pool.

Any help is appreciated
Thanks in advance
pooja.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30512
    
150

Pooja,
The Datasource.getConnection() method will give you a connection.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Pooja Agarwal
Ranch Hand

Joined: May 19, 2004
Posts: 37
Hai Boyarsky,

Thanks for ur reply, do i need to import any specific packages related to weblogic, any classpaths to set ???
Plz let me know abt it.

thanks once again
Pooja
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30512
    
150

Pooja,
You need to make sure the Oracle jar (classes12.zip) is in your server's classpath. The weblogic classes should already be in the classpath for weblogic if you are running code on the server.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: database connection pooling with weblogic 8.1