> 1. Suppose unloading or terminating the servlet by calling its
> destroy() method is going to
> cause a threading issue. We have to wait until all the threads
> currently executing in the
> service() methods of the servlet to finish before destroying and
> releasing resources. Lets
> assume that we alsol keep a count of the number of threads in the
> service() methods and
> use a flag as given in the online Java Tutorial.
>
> Question: Even though we do this, how can we prevent new requests
> from entering the
> service() methods even after the destroy() method
> is called. This could mean that
> the servlet is never unloaded???
- Servlet container is a request interceptor. The servlet does not get
requests directly.
- Srvlet container is maintaining the servlet instance. So, the
container knows how many requests are being processed by each servlet
instance.
- So, it can stop allocating requests to any servlet instance.
> 2. What sort of new security issues will servlets face when accessing
> resources on the intranet
> for e.g. a file with access rights etc.??
Are there new security issues?
> My answer for both were:
>
> 1. The webserver can't prevent requests from being sent to the servlet
> engine Connection Proxy
> service in the case of JRun. So the Servlet Engine would prevent
> further requests from being
> executed inside the service() method for a servlet whose destroy()
> method has been called.
You are right. The servlet engine (or container) can prevent delegating
requests to a servlet instance.
> 2. It has to use something like NT authentication although I do not
> know how the Servlet is directly
> going to access the resource by providing the login & password.
Possibly.
Regards,
Subrahmanyam
------------------------------------------------
Subrahmanyam A.V.B.//http://www.Subrahmanyam.com
------------------------------------------------
___________________________________________________________________________
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