> 1) Is the destroy() method always (!) called at the end of a
> servlet even if
> an uncaught exception has been risen???
>     It's important for me because of freeing static resources...

As far as I know the only reason why destroy() would not be called is if the
servlet engine crashed abominably in which case the resources would be freed
with the caveat that they would leave things in an uncertain state.

In the normal run of things the destroy method would be called.

> 2) Where can I set the time the service() method is allowed to run??? In
> which server variable??? I only find the times for the init and
>     the destroy methods...
>

You can contol that yourself quite easily. If you are in a loop with many
iterations, simply compare the current system time with one you made earlier
and break out of the loop, send appropriate message(s) to the client, clean
up
and exit normally.

If you mean service thread idle time then your servlet engine
should allow you to set the length of time a thread is idle before it is
returned
to the thread pool thus abandoning the current service request (messy).

Hope this helps

Andy Bailey

PS I am sure there are other ways as well, these are just off the top of my
head

___________________________________________________________________________
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