> Bear with me for a simple analogy. As I'm sure you know,
> unlike C, Java disallows the programmer from making an object
> reference point to something other than a real Object (or
> null). Passing and manipulating primary keys is much more
> C-like in that the values of the primary keys can be
> manipulated (ahem, screwed up to point to garbage) by a
> front-end developer, whereas if handles get passed then the
> values which represent EJBs would always represent either a
> genuine entity instance or null.

You could get a Handle to an EJB, persist it, delete the actual EJB and
still have a "valid" Handle: you won't know the Entity is gone till you
try unpersisting it. Also, passing the Handle seems, IMHO, even more
dangerous than the PK: the front end developer has access to the Entity
Bean itself; that also makes the Home interface available
(EJBObject.getEJBHome() ) All risks I pointed out in the previous email
are augmented should you pass around Handles.

My 2c,

JP

===========================================================================
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".

Reply via email to