tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yaroslav Sokolov" <yarick...@gmail.com>
Subject Re: What's about unloading policy of jsp-servlets ?
Date Mon, 06 Mar 2006 09:19:58 GMT
On 03/03/06, Costin Manolache <costin@gmail.com> wrote:
>
>
> [skipped]

>
> The difficult question is - how does it affect the spec compliance ?


it is  friendly to the spec ;-) :

[start quoting of Java™ Servlet Specification Version 2.4]

SRV.2.3.4 End of Service

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.

[end quoting]

My understanding was that container is allowed to unload servlets and
> jsps and webapps whenever he wants. The only problem I see is
> servlets/jsps using fields - static or not, I assume people don't
> expect them to go away and don't have code in destroy() to save state.


I hope there are not so many jsps described above. In any case, if such a
policy was optional - it can be not turned on for web applications like
these.

Also, there are such jsps just because of provocation that once loaded
servlet
has never been unloaded until shutting down of the web application.

So it might break a lot of code.
>
>
>
> Costin
>
[skipped]

--
Regards,
Yaroslav Sokolov.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message