| Author |
RuntimeException treated as application exception
|
Dumitru Postoronca
Ranch Hand
Joined: May 06, 2008
Posts: 46
|
|
Hello,
I am calling an EJB that throws a RuntimeException which gets re-thrown exactly as is to the client.
The code outputs 'Exception in thread "main" java.lang.RuntimeException at ses.MyOtherSes.methodThrowsSystemEx(MyOtherSes.java:23)'.
I'm using jboss 5.1GA.
I don't have an ejb-jar.xml file and i haven't specified RuntimeException to be an application exception. I do NOT understand why it throws it as is instead of throwing an EJBException.
Thank you.
|
 |
Joe carco
Ranch Hand
Joined: Apr 14, 2009
Posts: 82
|
|
|
that is rather strange, I tried that on Glassfish 3.1, a client with main method calling a remote SLSB that throws a RuntimeException in its business method. The client gets an EJBException ... caused by RemoteException
|
 |
Dumitru Postoronca
Ranch Hand
Joined: May 06, 2008
Posts: 46
|
|
I have created a new class & new client and this time I get the expected EJBException.
No idea what happened before.
|
 |
 |
|
|
subject: RuntimeException treated as application exception
|
|
|