Hi,
Actually I don't trust at all this reloading of new (changed) classes
within servlet engine's class loader, being servlets or not, for several
reasons:
- Cant figure if servlet engine checks newer versions only for servlet
classes (insufficient) or for any class used within my app.
(that's expensive!) ?
- When does it checks? When I create a new instance or when I use it?
Or when I access static methods or variables?
- What happens with existing living instances of old classes
refferenced within sessions, static vars or contexts ?
So I choose, at least for developing, a small servlet engine that
doesnt take long to restart - the JSDK's is most convenient for me.
Bye,
Cezar.
On Mon, 28 Jun 1999, Bill O'Keefe wrote:
> >I think te original poster wants to load on demand a new version of the
> >servlet's class - a method like:
> >
> > ServletContext.markObsolete(Servlet myservlet);
> >
> >in order to inform the context to reload (through class loader)
> >when a new request comes.
> >This opposed with expensive dynamic reloading provided by some web servers .
> >
> >There is no such method in JSDK.
>
> Yes, this is basically what I wanted to do. Since there doesn't
> appear to be such a method, do you have any idea how this could
> be implemented? Or, it this basically something that would have
> to be added to each servlet engine? Thanks,
>
> >
> >Cezar.
> >On Thu, 24 Jun 1999, James Duncan Davidson wrote:
> >
> >> > I looked through the servlet spec, and didn't see any
> >> > way to do this, but I just want to know for sure.
> >> > Bascially, I'm looking for a way to reload a servlet
> >> > without shutting down the web server. I don't want to
> >> > use the dynamic reloading facility, since I don't
> >> > want the server to check the timestamp on my servlet
> >> > on every request (I like that feature during development,
> >> > but not in a production site.) So, I want a way to
> >> > reload a servlet under program control (i.e., what
> >> > the Admin server does when you set Loaded Now? to no).
> >>
> >> Servlet loading is under the control of the container that the servlets
> >> are part of. Why do you need to reload a servlet during runtime if you
> >> aren't trying to reload? Can't you call some sort of synchronized clear
> >> method (that you implement) that will reset your servlet?
> >
> >I understood he wants to load a new version of the servlet, not just to
> >clear it.
>
> That is correct.
>
>
> -- Bill
>
> --
> Bill O'Keefe [EMAIL PROTECTED]
> Open Market, Inc. http://www.openmarket.com/
> One Wayside Road TEL: 781.359.7296
> Burlington, MA 01803 FAX: 781.359.8200
>
> ___________________________________________________________________________
> 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
>
___________________________________________________________________________
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