Leo,

you have low-level utility code (altrmi) which for some reason crosses what would normally be an exception boundary, yet you do not want this code to handle any exception itself, but rather have the code that uses the utility code to do that?

Check. The diff is that AltRMI is not trying to change user's method signautires. It is transparent. Note some of the messages for ClientMonitor (notr ServerMonitor) are not exception orientated.


this makes sense for altrmi, indeed, as it does for BCEL-related code, or stuff that deals with connection/thread/io management, IOW the real actual low-level stuff.

For lots of other stuff, there is no exception boundary to cross and you just want to rethrow the exception. Like A JDBC driver: it doesn't log, it just throws excpetions. Right?

Which is part of the problem. SQLException (on all methods) sucks. Better a RuntimeEx derivative for that. .NET accidentally got it right.


For yet more stuff (the active part of an api), it does make sense to log. In the avalon world, there is an exception boundary between component and container, so you *do* want your components to do logging. Like JAMES doing logging instead of talking to a monitor.

JAMES is a grey area. It is both reusable comps and an app on its own. If any of the comps were really reusable (and came in own jar) like a DNSComp, I would recommend the monitor approach. If all that is useful is true monitoring rather than exception handling, then all the better.


Finally, stuff which is closely coupled to the active part of an api can also do logging as long as the active api is doing logging. If you have a top-level component using utility code in other classes or beans which are not to be reused outside that component, it makes sense to do logging.

I'm against logging per se as the component writers choice.


I think the issue here is: Is monitoring a server always equivalent to logging?


OTOH: Is making log calls always equivalent to actual logging, or is it sometimes translated into monitoring calls?

IOW: can you (do you want to) connect an altrmi server to an A-F logging implementation?

If you want to. Don't if you don't.


- Paul

--
http://www.thoughtworks.com : The art of heavy lifting.
Home for many Agile practicing Open Source activists...



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to