File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Exceptions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Exceptions" Watch "Exceptions" New topic


Abhinav Srivastava
Ranch Hand

Joined: Nov 19, 2002
Posts: 354

We have one AppException extending Exception and this is thrown from a session bean and caught by the client.
The client is not doing any thing with this exception, not even printing its message. What I observe is that constructor AppException(String message) is being invoked on the client side. Why is this happening ?
Tony Morris
Ranch Hand

Joined: Sep 24, 2003
Posts: 1608
Why is what happening?
The only thing that is happening is that someone is ignoring an exception.
Why? Because that person needs to learn correct software design practices.
I can offer no further explanation.

Tony Morris
Java Q&A (FAQ, Trivia)
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
What's the protocol between client & server? If it's just a plain old Java call I'm confused. If it's something remote like EJB or RMI the local end of the protocol is probably deserializing the exception so it can throw it in the client JVM.

A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Abhinav Srivastava
Ranch Hand

Joined: Nov 19, 2002
Posts: 354

This is an EJB scenario thru RemoteInterfaces.
I am assuming that Constructors (in this case) would not be invoked during deserialization - would they ?? Also, it the MyException(message) constructor which is invoked always - not the default constructor.
For the record - the server is weblogic81 and jdk 142.
I agree. Here's the link:
subject: Exceptions
It's not a secret anymore!