Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to use connection pools in wl6.1

 
megala raghavan
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
In weblogic i have done the connection pool set up, from which part of my code i have to use this connection pool. in EJB code or servlet code.
do we need use this connection pool in our class to connect to database or how to use pl. help me
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First of all you shouldn't be directly using a WebLogic Connection Pool, this is not portable across J2EE Servers. You should create and use a Datasource or TxDatasource which is backed by your WebLogic Connection Pool.
As to where you would use the Datasource... if you have determined that your application needs EJB (most do not) then the EJB Layer is where you would be looking up and using your Datasource.
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One more thing, if you are using CMP Beans then they require the use of a Datasource which will then be managed by the Container. Therefore, in the case of CMP you will never be explicitly accessing the Datasource.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic