tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Barker" <wbar...@wilshire.com>
Subject Re: Do idle servlets get unloaded/reloaded?
Date Wed, 25 Jan 2006 04:03:28 GMT

"Blair Cooper" <blairc@teamon.com> wrote in message 
news:200601241941.k0OJffxv013625@apps05.teamon.com...
>I have a servlet running on Tomcat 5.5. If it sits idle for a while and 
>then
> I hit it, the init() method gets called again. "autoDeploy" is set to 
> false.
> Is this expected behavior?
>
>

It isn't unless your servlet is single-threaded.  In that case, Tomcat can 
(and will) allocate multiple copies of your servlet, each of which will get 
an init call.

>
> If this is expected, shouldn't destroy() get called at some point prior to
> the init()?
>
>
>
> The problem I'm having is that the init() method ends up try to recreate
> objects that where created by a previous call to init(). My destroy() 
> method
> would have cleaned up the earlier instances if it had been called. I have
> logging in the destroy() method so I know that it didn't get called.
>
>
>
> Any ideas or suggestions?
>
>
>
> Thanks,
>
> Blair
>
>
>
> 




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


Mime
View raw message