Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Exceptions

 
Abhinav Srivastava
Ranch Hand
Posts: 354
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1608
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Abhinav Srivastava
Ranch Hand
Posts: 354
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic