When are you checking the pk of the remote reference - before or after you
call
remove?

To have fBPK return an uninitialized instance is very strange.  Are you
doing BMP?
Are you calling getPrimaryKey or getting a bean attribute?

James Cook wrote:

> In our ejbLoad we are all accustomed to calling:
>
>     PK key = (PK)this.entityContext.getPrimaryKey();
>
> We do this because the bean's attributes are not yet set and the container
will
> use the entitycontext to pass the pk.
>
> In ejbRemove(), we do not have to resort to this step because the bean's
> attributes will be set with a call to ejbLoad() in the case of commit
options B
> and C.
>
> But how do we execute ejbRemove() when using commit option A? When using
commit
> option A, the bean is *not* synced with the db because ejbLoad() does not
fire.
> The container however must ensure that you get the appropriate bean
instance
> that matches the PK you wish. So if I do:
>
>     MyRemote remote = getMyHome().findByPrimaryKey(pk);
>     remote.remove();
>
> the FBPK method should return a remote reference to the bean in the ready
pool
> that matches the pk value I pass in, if it exists already. If it does,
ejbLoad()
> is not called. However, when I invoke remote.remove(), the pk attribute of
the
> bean is null!? This appears to be a bug.
>
> jim
>
> --
> --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]





---------------------------------------------------------------------
This message (including any attachments) contains confidential, proprietary
or privileged information intended for a specific purpose and individual(s),
and is protected by law.  If you receive this message in error, please
immediately delete it and all copies of it from your system, destroy any
hard copies of it and notify the sender.  Any unauthorized disclosure,
copying or distribution of any part of this message, or the taking of any
unauthorized action based on it, is strictly prohibited.


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]

Reply via email to