File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Is this correct? Exception question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Is this correct? Exception question" Watch "Is this correct? Exception question" New topic

Is this correct? Exception question

Tontang Bei
Ranch Hand

Joined: Oct 21, 2006
Posts: 130
If a system exception is thrown and it is a subtype of runtimeException for example a NoSuchObjectLocalException then the client will get it as it is yes?
but if the exception is a subtype of RemoteException such as TransactionRequiredException, this will not be thrown to the client as a remoteException(if client is remote) but instead be thrown as just a RemoteException to remote clients and EjbException to local clients?
Valentin Crettaz
Gold Digger

Joined: Aug 26, 2001
Posts: 7610
Does this answer your question ?

[Blog] [Blogroll] [My Reviews] My Linked In
prashanth kumar
Ranch Hand

Joined: Mar 22, 2004
Posts: 162
When it comes to system exceptions,
Remote clients always gets NoSuchObjectException,TransactionRequiredException and TransactionRolledBackException.If anything else happens which are not covered by the above,you get RemoteException.

Atleast,this is how i have understood about exceptions


SCJP1.5(86%)<br />SCWCD1.4(95%)<br />SCBCD1.3(92%)<br />IBM 252
Tontang Bei
Ranch Hand

Joined: Oct 21, 2006
Posts: 130
But Valentin, according to this pdf explanation, the only exception(system) the client can ever receive is the TransactionRolledBack<X>exception and for all else the client will get either a RemoteEx or EJBEx. Is this correct?
[ December 08, 2006: Message edited by: Tontang Bei ]
I agree. Here's the link:
subject: Is this correct? Exception question
jQuery in Action, 3rd edition