> From: news [mailto:[EMAIL PROTECTED] On Behalf Of Leo Simons > > Leo Sutic wrote: > > But what is wanted here is not logging, but a way of notifying the > > application that something is happening inside the server. > > > > If that notification then translates to log output being > produced then > > that is not the concern of the AltRMI code. > > ah. the penny dropped; ignore my prior post :D > > Lemme see if I understand: > > 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? > > 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? In this case I think of it like this: 1) If the AltRMI server produced logging calls, I'd have to parse the log messages to find out what happened. (a) Logging is fine if a human is supposed to figure out what happened. (b) Method calls are fine if a machine is supposed to do the figuring. The machine can log, if it wants to. Thus, (b) is a superset of (a). Thus we should go for (b), for maximum flexibility - with this being low- level, ultra-portable code. 2) The events signalled would normally be Exceptions. However, an exception can only be thrown to the caller of a method. The AltRMI server may be called by a remote client, and suffer any of the listed failures. An Exception can only be thrown back to the remote caller. But we'd like to know what happens with the server, server-side. Thus we want some kind of monitoring. Thus, we're not using exceptions. See (1) for why we're not using logging. /LS --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
