Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Connection Pooling for my web application

 
Adrian Yan
Ranch Hand
Posts: 688
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I created connection pool classes. Now I want to use it for the entirely application (JSP and Servlet). Does anyon know how to get it to work? I know JSP can use the scope to set bean lifetime, is there a similar procedure for servlet to set scope too?
If I out the pool instatiation in the init() of my servlet, how can I passed the pool so other classes can use it?
 
Peter Tran
Bartender
Posts: 783
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Adrian,
I think this article is exactly what you need.
-Peter
 
Adrian Yan
Ranch Hand
Posts: 688
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the article. But my concern is that, I use some classes for data gathering (or quesrying), how can I pass a connection object to the classes.
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try reading the article. It explains pretty clearly how to get a connection object from the connection pool.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic