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 Relational Databases and the fly likes Connection Pooling for my web application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Connection Pooling for my web application" Watch "Connection Pooling for my web application" New topic
Author

Connection Pooling for my web application

Adrian Yan
Ranch Hand

Joined: Oct 02, 2000
Posts: 688
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

Joined: Jan 02, 2001
Posts: 783
Adrian,
I think this article is exactly what you need.
-Peter
Adrian Yan
Ranch Hand

Joined: Oct 02, 2000
Posts: 688
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

Joined: May 05, 2000
Posts: 13974
Try reading the article. It explains pretty clearly how to get a connection object from the connection pool.


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Connection Pooling for my web application