>
> Spec 5.8.3
> The object identifier of a session object is in general opaque to the
> client. The result of getPrimaryKey() on a session EJBObject reference
> results in java.rmi.RemoteException.
>
> There will not be any PrimaryKey associated with a session
> bean, instead of
> allowing it to call the method and then throwing an
> exception, it would have
> been better if this thing is discovered at compile time
> itself. Why is the
> design like this? Any thoughts?
>
The only reason I can think of is an attempt to avoid a large number of
interfaces. SFSBs, SLSBs and EBs are all referenced using an EJBObject. Not
a design choice I would have made.
The same choice also appears in making stateless session beans and statefull
session beans implement the same interface (SessionBean) even though they
are semantically very different, and the protocol is also different
(ejbCreate(), ejbActivate(), ejbPassivate() are different).
- Avi
--
s/\be(\w+)/e-\1/g;
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".