dcsimg
How One Connection Object alone Used to for Whole Session between Different Pages
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Raveenkumar_Govindasamy
Posted On:   Wednesday, July 20, 2005 01:03 AM


I'm involved in developing One Application which involves
ADD, DELETE, MODIFY,REPORT of Database Tables.


But Instead of Opening and Closing Connection in all Pages
of JSP. I want to Use One Connection Object which is to be
instantiated at the Beginning and to be Used through out the session.



Which Technology I can Use


Java Beans


JSP


Servlets

Re: How One Connection Object alone Used to for Whole Session between Different Pages

Posted By:   Anonymous  
Posted On:   Friday, July 22, 2005 08:02 AM

HI
how abt creating an java bean encapsualting all the DB functionality u need and place this bean in session scope..
any better idea ! pld post back
Regards
kalyan

Re: How One Connection Object alone Used

Posted By:   Christopher_Koenigsberg  
Posted On:   Thursday, July 21, 2005 02:26 PM

I would suggest reusing one DataSource maybe, but definitely don't reuse Connections; you should close them as soon as you can, and get new ones from the DataSource whenever you need one. The DataSource should be one that provides connection pooling.
About | Sitemap | Contact