Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
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


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Is this correct? Exception question" Watch "Is this correct? Exception question" New topic
Author

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
Sheriff

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


SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[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

Cheers
Prashanth


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: http://aspose.com/file-tools
 
subject: Is this correct? Exception question