aspose file tools*
The moose likes JDBC and the fly likes approach other than connection pooling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "approach other than connection pooling" Watch "approach other than connection pooling" New topic
Author

approach other than connection pooling

ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
What is best approach for writing database operation in web application if you are not going for connection pooling?

Thanks.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

The is not likely to be any difference in the code, but your code is probably going to use up more database resources, since a Connection will actually equal a connection to the database, rather than sharing connections in the way connection pooling does it.

I suppose if you didn't want to use connection pooling you could try to write your code to share connections. But why bother? There are plenty of connection pool implementations out there, why reinvent the wheel?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30551
    
152

Originally posted by ankur rathi:
What is best approach for writing database operation in web application if you are not going for connection pooling?

I guess that would just mean that you have your own connection factory that always creates a new connection. Make sure to close the connection when you are done so you don't have a resource leak.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: approach other than connection pooling