my dog learned polymorphism
The moose likes Servlets and the fly likes JDBC database connections in servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "JDBC database connections in servlets" Watch "JDBC database connections in servlets" New topic

JDBC database connections in servlets

Mathew Lee
Ranch Hand

Joined: Jun 08, 2009
Posts: 238

I read connections to database threadsafe hence we can create connections in init() to reuse in doGet() and doPost() methods.I have not understood what author meant. Any ideas, suggestions, sample code, resources, links highly appreciated. Thanks in advance
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63224

Creating connections in this manner is not recommended. Use a connection pool.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: JDBC database connections in servlets
jQuery in Action, 3rd edition