Constructor invoked at client-side
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Abhinav_Srivastava
Posted On:   Thursday, November 11, 2004 03:56 PM

I have this method in my Session EJB which always throws MyException (extends Exception)
There are two constructors in MyException -

MyException() { ... }
MyException(String msg) { ..print("some message");. }

I use a java client to invoke the ejb method. The client catches the exception and does nothing.
The output suggests that the second constructor is invoked at the client.

Why is that happening if that is whats happening? Presumably, constructors are not invoked during deserialization.

Re: Constructor invoked at client-side

Posted By:   Anonymous  
Posted On:   Friday, December 3, 2004 10:55 AM

You need to show the code of at least MyException. In principle you are right: Constructors are not called during deserialization.


Harald M.

About | Sitemap | Contact