Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

servlet self-destruct

843841Sep 16 2004 — edited Sep 19 2004
how can a running servlet indicate that it wants to be shutdown?
(it has encountered some condition that it knows is bad/unrecoverable, and wants to shutdown so it can be restarted later)

destroy() is supposed to be called by the container, so that doesn't quite make sense as the right thing for a servlet to do (call it's own destroy() method, since presumably the container doesn't know that it happened in that case..)

calling System.exit() is bad for all the obvious reasons, and unfriendly as well.
is there another way?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 17 2004
Added on Sep 16 2004
6 comments
236 views