Re: Keeping the server side object alive !!!

2007-01-15 Thread Andre Prasetya
I attach an example for you. MigrationUtil is a helper class that needs initialisation when the webapp started and needs cleaning when the webapp stopped On 1/16/07, Luis Rivera <[EMAIL PROTECTED]> wrote: Dear Leon, Thanks for the info, I am reading about Contexts, but I am not sure if the

Re: Keeping the server side object alive !!!

2007-01-15 Thread Andre Prasetya
I attach an example for you. MigrationUtil is a helper class that needs initialisation when the webapp started and needs cleaning when the webapp stopped On 1/16/07, Luis Rivera <[EMAIL PROTECTED]> wrote: Dear Leon, Thanks for the info, I am reading about Contexts, but I am not sure if the

Re: Keeping the server side object alive !!!

2007-01-15 Thread Leon Rosenberg
On 1/15/07, Luis Rivera <[EMAIL PROTECTED]> wrote: Dear Leon, Thanks for the info, I am reading about Contexts, but I am not sure if they are created as soon as tomcat starts. As soon as tomcat deploys your webapp which is effectively the same (depends on your settings like autodeploy etc,

Re: Keeping the server side object alive !!!

2007-01-15 Thread Luis Rivera
Dear Leon, Thanks for the info, I am reading about Contexts, but I am not sure if they are created as soon as tomcat starts. This listener seems to be event based, as long as an event is auto generated after Tomcat has started, it would work, or if there is another mechanism that can be used to

Re: Keeping the server side object alive !!!

2007-01-15 Thread Leon Rosenberg
I think what you need is a ContextListener. With it, you will be notified when the context (webapp) starts and can perform initialization, and when the context is destroyed you can perform de-initialization (stop your threads, cleanup ressources and such). regards Leon On 1/15/07, Luis Rivera <[

Keeping the server side object alive !!!

2007-01-15 Thread Luis Rivera
Hi, I would like to know how could I jump start my web service in tomcat before any call from the client is made. My first version only needed to be stateless and that worked fine, since I noticed that each call from the client creates a new object in the server. However, now I would like to cr