tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Soomar, Muki (R.)" <msoo...@ford.com>
Subject RE: Loading a connection pool class on tomcat startup
Date Thu, 09 May 2002 22:02:06 GMT
Thanks fillup. Appreciate your response.

Will this not limit the usage of my connection pool only to that servlet ?

What if my application has 10 servlets that act as controllers who could
just request a connection obj from the pool and after performing their
actions return it back to the pool.

I can always front end this 10 servlets with a master servlet which can
initialize the connection pool class and provide the 10 servlets with the
connection obj. I wanted this to be transparent so that any servlet will be
able to request the connection obj on demand.

Any further ideas ?

Regards,

Muki Soomar



-----Original Message-----
From: Phillip Morelock [mailto:subscriptions@phillipmorelock.com]
Sent: Thursday, May 09, 2002 5:48 PM
To: Tomcat Users List
Subject: Re: Loading a connection pool class on tomcat startup


Make a http servlet.

Override the  "init()" method.

Do your setup inside "init".

In your web-xml, in that servlet's definition, make a load-on-startup tag

to see examples, search google for
load-on-startup web.xml

cheers
fillup


On 5/9/02 1:46 PM, "Soomar, Muki (R.)" <msoomar@ford.com> wrote:

> Hi,
> I have a conceptual question regarding the usage of the tomcat server.
> If I want to create a class that will provide me with a DB connection pool
> that
> my application would like to use whenever there is a request that requires
> me to go and fetch data from the data source, how would I load this class
> when tomcat is started so that I may have this pool ready for use.
> 
> Anyone any inputs ? Thanks much.
> 
> Muki Soomar
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>
> 


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message