> From: Leon Rosenberg [mailto:[EMAIL PROTECTED] 
> Subject: Re: Recovery from OutOfMemoryError?
> 
> Thats however strongly depend on where it happened... if for example
> the code in question was a middleware stub which is left in
> unpredictable state, or the orb itself, or any kind of stack
> somewhere, or a processing queue, or some background threads... or 3rd
> party libraries...

Agreed - but the above defines software of somewhat questionable
quality, not written with robustness in mind.  But if it's not a
critical environment, the occasional outage may not matter, so robust
algorithms are not always needed.

> I think there are very few places where an oome should be caught and
> can be handled properly, or you have to surround each new with
> try/catch....

Certainly you don't want try/catch everywhere, but as you say, it is
needed in state-altering places so that restoration to a usable
condition can be done when necessary.  Employing techniques such as
acquiring all necessary data structures before manipulating pointers in
doubly-linked lists go a long way towards eliminating the need for
complex backout mechanisms; but these often aren't learned until
something catastrophic happens.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to