tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Smith <d...@cornell.edu>
Subject Re: Sticky servlet
Date Tue, 18 Sep 2007 21:49:56 GMT
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 lifetime of the servlet container (which 
could be a
number of days, months, or years), or any amount of time in between."

I think you should give up on the whole idea of trying to keep a servlet 
operating for the life of tomcat.  Look at the reasons why you want this 
and look at other solutions to those problems.

--David

David Delbecq wrote:
> 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 :
>> 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 be 1 month of inactivity, or so much requests arrive
>> that out-of-memory will happen?
>> Maybe I should create some background thread or socket or whatever?
>>
>> Any solutions appreciated, thanks in advance.
>>
>>   
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message