Daniel John Debrunner wrote:
[EMAIL PROTECTED] wrote:
Lance J. Andersen wrote:
I am not fond of a Singleton of a SQLException but that is just me.
You would at least need to have one per thread.
Why? If I have a singleton as a static and never modify it, I can safely
throw it in multiple threads. It will have the fixed meangingless stack
trace, but this to handle a special case.
The stack trace isn't created when the Exception object is constructed,
it's created when it's thrown. If you throw the same exception object
from multiple threads, they will interfer with each other in
unpredictable ways.
--
Oyvind Bakksjo
Sun Microsystems, Database Technology Group
Trondheim, Norway
http://weblogs.java.net/blog/bakksjo/