On Fri, 3 Nov 2000, Bo Xu wrote:

[ ... ]
>          please answer this question:
>          the ONLY one instance of my class will NEVER be
>          *removed" and "made again", is that right ?   :-)
[ ... ]
> *  is it possible that my class wil be *load* and "unload" several times? :-)
>
>
> 2  another problem -- *hot plugin*  :-)
>
> for example,
>         now I want to update my class, and just as this time,
>         there are several threads which are *from* my old class
>         are running,  in this case, is there such Servlet engine
>         which will support *hot plugin"? :-)   if so, now there
>          will be two version of my class in this Servlet engine
>          at this time --  just my guessing :-)
[ ... ]

Some later messages suggest you've got this straightened out, but I
will add a few comments just in case.

These questions relate to a different issue than the previous ones.
The previous ones related to threading.  These have to do with
persistence and the servlet life cycle.  Basically, you need to be
aware of the servlet life cycle, that servlets can be taken up and
down multiple times, which will result in calls to the servlet init()
and destroy() methods.  In those methods, you can take care of
persisting and restoring any necessary data.  For example, with your
counter, you can save it to a file in destroy(), and then restore it
from that file in init() (of course, you will have to consider all the
issues that have been discussed when writing those methods, like in
what situations multiple instances of the servlet will exist).  As to
threads, if your servlet started up some threads while it was running,
those threads may need to be stopped in destroy().

Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to