Thank you for your reply. That clarified it alot.
Another question -- what's the advantage of using a finder method
(in a Bean Managed Persistence Entity Class) to return data
instead of returning it from a method in myEJB class (e.g., getData() function)?
A reference that I have tells me that clients must be able to find the bean for which
they are looking for, and this is why a finder method is used. In contrary to a session
bean where a client gets access to a bean when it's created. But I'm kind of confused
by this. Does this mean that a client won't have access to a BMP bean until a finder
method is called? There's an example in this book where a client calls a function on
a BMP bean without ever calling a finder method:
SportTeam team = home.create("arg1", "arg2", "arg3", "arg4");
System.out.println(team.getFranchisePlayer());
The above could have been implemented with a finder method?
And there is another:
Collection collection = home.findByOwnernName("Joe");
Could the above be implemented with something other than a finder method?
Thank you in advance for any help. I just started getting into EJB a few days ago.
----- Original Message -----
From: "Evan Ireland" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 26, 2001 12:38 AM
Subject: Re: necessary to get primary key from entitycontext? (part 2)
> If you create your bean, and the instance is deactivated, then you call
> a business method and the container selects another instance from the
> instance pool the primary key will not be valid unless you re-set it
> in ejbActivate (or in ejbLoad but doing it in ejbActivate might be
> a little more efficient).
>
===========================================================================
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".