Posted By:
sidhartha_nagolu
Posted On:
Saturday, May 10, 2003 01:22 PM
hi i need to use a connection pool with tomcat (DBCP). i am retrieving a connection from pool in service method and closing it once when i am done. i need to know what exactly is the place where i should put the code which creates a conext and retrieves data sourse from it. do i need to put in the service method or in the jsp init() method, or in an object associated with the context. i know that keeping it in application context saves me time, but i want too know how expensive(time) are those operations and what is the appropriate design choice. in short, are the opertions initiating a context and retrieving a datasource, are those expensive operations? thank you
More>>
hi
i need to use a connection pool with tomcat (DBCP).
i am retrieving a connection from pool in service method and closing it once when i am done.
i need to know what exactly is the place where i should put the code which creates a conext and retrieves data sourse from it.
do i need to put in the service method or in the jsp init() method, or in an object associated with the context.
i know that keeping it in application context saves me time, but i want too know how expensive(time) are those operations and what is the appropriate design choice.
in short, are the opertions initiating a context and retrieving a datasource, are those expensive operations?
thank you for you time.
have a fruitful day.
<<Less