Re: Sticky servlet

2007-09-19 Thread Mikolaj Rydzewski
Kamil Burzynski wrote: I would like to create one of my servlets to be 'sticky': to be sure that Tomcat will never try to remove this servlet from memory. Is load-on-startup enough? I know that it will start my servlet as soon as tomcat starts, but will tomcat ever try to remove such servlet?

Re: Sticky servlet

2007-09-19 Thread David Delbecq
I see no reason you would need your servlet to stay in memory. As long as it is alive when needed (that is when requests arrive) it's enough. Maybe you problem is that it does much than serving request, like running background thread, send message to people and so on. Then you might simply

Re[2]: Sticky servlet

2007-09-19 Thread Kamil Burzynski
Hello, I see no reason you would need your servlet to stay in memory. As long as it is alive when needed (that is when requests arrive) it's enough. Maybe you problem is that it does much than serving request, like running background thread, send message to people and so on. Then you

Sticky servlet

2007-09-18 Thread Kamil Burzynski
Hello, I would like to create one of my servlets to be 'sticky': to be sure that Tomcat will never try to remove this servlet from memory. Is load-on-startup enough? I know that it will start my servlet as soon as tomcat starts, but will tomcat ever try to remove such servlet? E.g. if there will

Re: Sticky servlet

2007-09-18 Thread David Delbecq
In j2ee specs, there is no provision for unloading an unused servlet. Once a servlet has been tarted (load-on-startup or triggered by user query), i never get unloaded, unless webapp gets unloaded, which occurs at shutdown or during a redeploy (administrative task) Kamil Burzynski a écrit :

Re[2]: Sticky servlet

2007-09-18 Thread Kamil Burzynski
Hello, In j2ee specs, there is no provision for unloading an unused servlet. Once a servlet has been tarted (load-on-startup or triggered by user query), i never get unloaded, unless webapp gets unloaded, which occurs at shutdown or during a redeploy (administrative task) Thanks for quick

Re: Sticky servlet

2007-09-18 Thread David Smith
However if you read servlet spec 2.4, SRV.2.3.4 you'll find the following direct quote: The servlet container is not required to keep a servlet loaded for any particular period of time. A servlet instance may be kept active in a servlet container for a period of milliseconds, for the

Re: Sticky servlet

2007-09-18 Thread Bill Barker
Kamil Burzynski [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello, I would like to create one of my servlets to be 'sticky': to be sure that Tomcat will never try to remove this servlet from memory. Is load-on-startup enough? I know that it will start my servlet as soon as

Re[2]: Sticky servlet

2007-09-18 Thread Kamil Burzynski
Hello, Please read the other responses to this thread, since they are correct that there is no guarantee. However, the current implementation of TC (3.3-6.0) will not unload a Servlet unless the entire context is reloaded (with a slight exception for JSP pages). But then you are programming