My understanding is EJBObject.remove() calls two hook methods on the bean
class. First, in accordance to the spec of "synchroniz(ing) the state of
the ejb before performing the remove", I assume this means a call to
ejbLoad. Then ejbRemove gets called.
Since you have CMP beans, both these methods are implemented by the
container. Hence, ejbLoad should be a sql "select row" and transferring
this info to the fields of the bean instance, while ejbRemove will do sql
"delete row" and then actually deleting the bean instance itself.
Hence I don't see how an ejbLoad call will affect your ejbRemove call.
Maybe I still understand your problem, and perhaps you can elaborate.
Gene
-----Original Message-----
From: Alex Paransky
To: [EMAIL PROTECTED]
Sent: 6/27/01 7:09 PM
Subject: Re: home.remove(pk) method problem
The fact is that when you call home.remove(pk) your ejbRemove will get
called. Inside of ejbRemove, you would expect to have the state of the
bean
available to you. For this reason, the container needs to read the data
of
the bean before calling your ejbRemove. In our beans, we frequently
check
the state of the bean or other conditions and then possibly throw a
RemoveException.
-AP_
-----Original Message-----
From: A mailing list for Enterprise JavaBeans development
[mailto:[EMAIL PROTECTED]]On Behalf Of Gene Chuang
Sent: Wednesday, June 27, 2001 4:11 PM
To: [EMAIL PROTECTED]
Subject: Re: home.remove(pk) method problem
Why should it matter if the container tries to synchronize your bean
with
the db before ejbRemove? The row/bean is going to get removed
anyways...
Gene Chuang
Kiko.com
-----Original Message-----
From: Bogdan Ghidireac [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 27, 2001 5:06 AM
To: [EMAIL PROTECTED]
Subject: home.remove(pk) method problem
Hi,
I have a CMP EJB that contains some info and a serializable field.
During
the development the object that is serialized into this field has been
changed (some variables have different names). My problem is that I
cannot
use remove(primaryKey) method of the home interface because the
container is
trying to synchronize the state of the ejb before performing the remove
in
the database (see paragraph 9.4.3 from ejb1.1 specs). Is there a way to
force the removal of the entity bean without synchronizing its state ?
Regards,
Bogdan
========================================================================
===
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".
========================================================================
===
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".
========================================================================
===
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".
===========================================================================
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".