Richard Kilgore wrote:

 > On Wed, Jan 09, 2002 at 01:29:30PM +0100, Jung , Dr. Christoph wrote:
 >
 >>Hi Richard ...
 >>
 >>AFAIK, if you serialise an exception, the stacktrace is serialised, 
too. So
 >>I do not understand your point ...
 >>
 >>CGJ
 >>
 >
 > No, this is a pretty well-known obstacle in debugging RMI apps.
 > The backtrace member of Throwable is transient, so what you get
 > back on the client side doesn't tell you anything about where the
 > error occurred.
 >

 > I suppose that in most cases, diagnosing the error on the server
 > side is the solution, but there are two cases where this does not
 > work out:
 >
 >     1. the error is some unexpected exception, possibly a
 >        run-time NullPointerException or the like.
 >
 >     2. knowledge of the fact that a given exception represents a
 >        true error condition requires knowledge that only the
 >        client possesses, so the server app does not print a stack
 >        trace (this happens).


In most cases of distributed apps, the client shouldn't know anything 
about the internal workings of the server. If it's just for debugging 
purposes then the stack traces of unexpected execeptions (like 
NullPointerException) should be reported in the server anyway. If 
they're not, it's an oversight in the server code.

Your case 2 above, presumably only applies to user-defined exceptions 
which are listed in your interface, no? Again I would say that the 
client's knowledge shouldn't go beyond this in practice. The server 
(either your app or JBoss) should log any exceptions that occur IMHO, 
otherwise tracking problems is a nightmare.

Also, server debugging is pretty straightforward, using the JPDA stuff 
(see JDK docs). You just start JBoss with the appropriate command line 
and connect with a tool that supports it (netbeans, Together, JBuilder, 
whatever).


Luke.

-- 
  Luke Taylor.                                  Monkey Machine Ltd.
  PGP Key ID: 0x57E9523C                        http://www.mkeym.com


_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to