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 creating connection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "creating connection" Watch "creating connection" New topic
Author

creating connection

gaurav chaudhary
Ranch Hand

Joined: Jun 24, 2002
Posts: 64
I am making a project where every jsp requires a connection to a database. Now, at the moment I am creating new connection everytime jsp is loaded. Is this the only way except connection pooling? I want that only one instance of connection is made and it is only passed to all jsp's for the particular session. Means i do not have to create a new coonection in every jsp.
thanks in advance for help


gaurav
john guthrie
Ranch Hand

Joined: Aug 05, 2002
Posts: 124
what have you got against connection pooling?
creating a connection per session to pass around to all the jsps in the session is resource wasteful, since the session holds on to the connection even when the latest (or last) html page has been delivered.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: creating connection