I was a bit confused about his strategy as well because it felt like really
eager load, but I suppose most containers execute ejbActivate() immediately
followed by ejbLoad() only if a client is actually trying to execute a
method on the bean in question?

Near the end of the article he also tried to address this issue of people
wanting to use eager fetch in their BMP finders saying that most people
should let the container use lazy load and really only load them when they
are accessed.  My understanding about CMP is that this eager load is one
area where CMP has a big advantage over BMP, but he seems to be saying not
to bother.

Anybody else have any comments on either of these points?

Cheers
Jay

-----Original Message-----
From: Robert Nicholson
To: [EMAIL PROTECTED]
Sent: 4/12/01 7:47 PM
Subject: Re: BMP with relationships

Looking at this again... seeing as ejbLoad is called during an
"activation"
event this shouldn't be a problem. So it makes you wonder why you need
to
use ejbActivate at all if ejbLoad is guaranteed to be called during an
"activation" event. ejbLoad seems a more appropriate place to put this
"re-activation" code. Given that you also need to reestablish the object
reference when you read the object in again via an ejbFind method.

> -----Original Message-----
> From: Robert Nicholson [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 12, 2001 4:26 PM
> To: EJB-INTEREST
> Cc: [EMAIL PROTECTED]
> Subject: BMP with relationships
>
>
> I read an article in this months Java Report by Grant Holland on
> implementing "to-one" relationships using ejb 1.1 compliant
> containers. The gyst of the article was that in order to get by
> passivation you not only had to reestablish your relationship's
> object reference in ejbLoad but also in ejbActivate.
>
> I'm currently reading "Applying Enterprise Javabeans" by Vlada
> Matena and Beth Stearns. In their example they subclass a CMP
> entity bean to make it a BMP entity bean and they establish their
> "to-one" relationship references in ejbLoad. However there's no
> implementation of ejbActivate anywhere in this class.
>
> Will a container always _potentially_ passivate an entity bean
instance?
>

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

Reply via email to