This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

database connection pooling with weblogic 8.1

 
Pooja Agarwal
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author & internet detective
Marshal
Posts: 34973
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pooja,
The Datasource.getConnection() method will give you a connection.
 
Pooja Agarwal
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author & internet detective
Marshal
Posts: 34973
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic