dcsimg
Whether i can make one connection for entire web application ?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   partha_samantary
Posted On:   Wednesday, September 21, 2005 07:48 AM

			
int i=1;

Hi Can some one tell me , Whether i will open one connection i.s. one instace of connection will be created for entire one web application and that connection object will serve for many clients.



i am not using connection pooling.



can i use single ton class and open a connection there and put that in a usebean in application scope.


if yes, pls give example.

and close that connection in another singleeton class in servelt destroy method.

my mail id: partha_samantaray@rediffmail.com

Re: Whether i can make one connection for entire web application ?

Posted By:   Shaun_Childers  
Posted On:   Wednesday, September 21, 2005 12:54 PM

This is not recommended as it could lead to serious performance problems. Even if you synchronize the use of the connection, others parts of your application will be idle while the wait to use the database.


Don't forego good design (connection pooling) just because it looks difficult to configure or implement. Most web/app servers provide fairly easy setup for this.
About | Sitemap | Contact