Hi Owen,
Yes, I wanted to use ignored exception but didn't want to give the idea that it was an expected exception, so tracing as an event sounds like a good idea. Why don't you go ahead and make the change?
Thanks,
Nirmal.
"Owen D Burroughs" <[EMAIL PROTECTED]>
12/19/2002 05:56 AM
|
To: [EMAIL PROTECTED] cc: Subject: Re: [wsif] Proposed change to WSIF service factory |
Nirmal,
If you are going to ignore the exceptions that are thrown, it is best to
use Trc.ignoredException rather than Trc.exception. This prevents the whole
stack trace appearing in the WSIF trace (only the exception message is
output). This is less confusing for somebody trying to debug a problem
futher in flow of execution - people see the first exception with stack
trace as the cause, when in fact we may have ignored the exception and the
problem is somewhere else.
On the same topic, currently using Trc.ignoredException outputs the message
"Ignoring expected exception <exception message>". This is better than the
full stack trace of the exception but gives the wrong impression. The
exception is not necessarily expected just tolerated. So maybe we should
trace it as an event with text along the lines of "EVENT Throwable
encountered and ignored: <exception message>"
Owen
|---------+---------------------------->
| | Nirmal |
| | Mukhi/Watson/IBM@|
| | IBMUS |
| | |
| | 18/12/2002 21:18 |
| | Please respond to|
| | axis-dev |
| | |
|---------+---------------------------->
>--------------------------------------------------------------------------------------------------------------------------------------------------|
| |
| To: [EMAIL PROTECTED] |
| cc: |
| Subject: Re: [wsif] Proposed change to WSIF service factory |
| |
| |
>--------------------------------------------------------------------------------------------------------------------------------------------------|
Hi,
I've put in the trace using Trc.exception but I'm against propagating it -
true they might be unexpected and it might be worth alerting the user, but
WSIFServiceFactory.newInstance() will be called by every single client so
we need to think carefully about propagating exceptions.
Also, propagating exceptions now results in too much code change - in the
dynamic proxy, all the sample clients, etc. which I am not in favor of
doing so close to release. I'm sure you'll agree that if at all we think
this is good, we should hold off on it until later so as to minimise code
changes prior to the RC.
I'm committing the change without propagating the exception now, let's
bring this up again when the code "semi-freeze" is no longer in effect!
Nirmal.
Aleksander Slominski
<[EMAIL PROTECTED]> To:
[EMAIL PROTECTED]
cc:
12/18/2002 04:11 PM Subject: Re: [wsif]
Please respond to axis-dev Proposed change to WSIF service
factory
Nirmal Mukhi wrote:
> I'll catch the exceptions separately and trace them. However, I think
> the correct behavior is to ignore exceptions,
hi,
do not ignore but maybe log them with Trc.exception()
> since we have a fallback default factory, and users can be informed
> through the trace about the excdeption if they care. The alternative
> is to throw a WSIFException but I don't recall other abstract factory
> implementations (in WSDL4J, JAXP and so on) throwing exceptions from
> newInstance() - that is an unnecessary thing the user would have to
> take care of.
maybe in this case it makes sense to distinguish two types of exceptions:
1. "expected" exception such as ClassNotFound that are logged but
ignored to allow default factory be created
2. other exception: also logged but allowed to propagate
thanks,
alek