yes...there are 2 things in exception bean->container->client when the bean throws a IllegalStateException or any of the other SystemException the client sees it as either RemoteException or EJBException based on if it is remote or local. The client cant do anything useful with the system exception details. Page 559 is what the client sees an page 560 is what the bean throws. Hope this helps
Ok, if you look at EJBContext interface there is no getPrimaryKey(), so any attempt to call getPrimaryKey() using it's sub interface ie SessionContext object, you can't help it but get a fat java.lang.IllegalStateException.
On the second part, Session beans don't have primary key. but EJBObject interface has a getPrimaryKey(). So, when you call EJBObject.getPrimaryKey() on a session bean, for local client you javax.ejb.EJBException and remote client, java.rmi.RemoteException. Just look at this code
I think it's kind of Runtime Exception that is actually thrown from the background.
Whew, hope it helps.
SCJA(Beta) SCJP 1.4 SCWCD 1.4 SCBCD 1.3 SCBCD 5.0 beta <br />The more practice we get, the better we are at the exams and in life in general. Pls join me at My DEN.
posted 14 years ago
Thanks for the replies. I have just taken the exam, scored 88%.