posted 19 years ago
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.