Kostas, could I have the URL of the white papers.





"K.V. Chandrinos" <[EMAIL PROTECTED]> on 05/31/2000 04:40:36 AM

Please respond to "A mailing list for discussion about Sun Microsystem's Java
      Servlet API Technology." <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:    (bcc: Vijay Singh/TCS/Pershing)
Subject:  Re: Question regarding servlet use and its lifecycle ???




On Wed, 31 May 2000, Sanjay Agnani wrote:

> Hi,
>
> If I write a HTTP servlet and register it with the server say Weblogic
> server.

[questions on servlet-lifecycle]

Executive summary

According to specs (and documentation:-) servlets -if not implementing
SingleThreadModel- are loaded once, on startup or first call, depending on
configuration. Therefore, their init() is run once. After that, all
requests are handled by spawning threads which in essense execute the
service method(s). The servlet instance remains 'alive' until its (perhaps
implicit) destroy method is called by the container, most of the times
when the server goes down. Some container implementations have elected to
make a swift check on class file modification time and substitute the new
servlet if any, in a manner transparent to the user. Other containers have
not done so.

In recent specs, the servlet container (aka engine) reserves the right to
migrate execution to a different execution space (e.g. different machine)
mostly for load balancing reasons. One way to achieve this, is to load
another instance of the servlet at a remote location. I believe the init
is run again once and business as usual resumes. This migration is
guaranteed NOT to take place during the servicing of a request.

The SingleThreadModel which practically reduces the power of servlets
almost to a mere CGI script is to be used with caution and only when
absolutely necessary, is rather rare, but well documented in the specs and
other messages that have appeared/will appear on this list.

Hope I have given you enough motivation to go read the documentation,
which includes quite more eloquent white papers:-)

Kostas

___________________________________________________________________________
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

Reply via email to