Hi,

I have just discovered an unexpected behavior with logging interceptors
generated by HiveMind's LoggingInterceptorFactory.

When an Error is thrown by a method in the intercepted service, it never
gets logged!

After checking LoggingInterceptorFactory source code I found out that only
Exceptions and RuntimeExceptions are caucht and logged by the generated
interceptor.

Although I understand that catching Error is generally not considered good
practice, I believe that for logging purpose it could be judged acceptable,
not to say good advice.

Let me explain my case (or how I discovered this problem):

In HiveBoard server (HiveMind-based) one method called by HiveMind client
(through HiveRemoting facilities) would run out of memory (on the server).
Then the OutOfMemoryError was silently (no log on server side) transported
back to the client (through the Hessian protocol that is used by
HiveRemoting), and would of course display on the client as an OutOfMemory
error (due to client memory needs!).
Since OutOfMemoryError do not include stack traces, I even had no clue that
the problem occurred on server! So I spent a few hours adding and analysing
log traces on client, then analysing in detail log traces from server to
finally find out that the called method would never end (no END log by the
interceptor).

I believe this behavior for a logging interceptor is not correct: we would
expect ANY exception (I mean Throwable) logged by this interceptor, else the
server might always appear to run fine. In this case, I was lucky because
this occurred during my tests, but what would happen in a production system
where maybe client side users would not even report the problem? The server
admin would hardly notice the problem on the server!

Should I submit a JIRA for this problem?

Cheers

Jean-Francois


        

        
                
___________________________________________________________________________ 
Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son 
interface révolutionnaire.
http://fr.mail.yahoo.com

Reply via email to