hi i want to know if i use connection pooling where should i establish my db connection is it in init or service if i put in the init since the init is executed onely onece will give me any problems when concurrent uses login to the app or if i have 10 servlets will there any problem in the connection pool with 5 connection avalable.
it would be a big help if anyone can give me any thing
Personally, I'd avoid getting it from the pool anywhere in the Servlet code itself. You business logic and data access code should be in Plain Old Java Objects that are called from the Servlet. This way that business logic and data access can be reused by other types of clients.
Which app server are u using? If you're using something like WebSphere, all you need to do is configure your JDBC connection and your connection pooling is going to be handled by the app server ... just a thought -stan