Yes,
The confusion occurs because ejbCreate() means different things wrt Entity
or Session beans.
home.create() on a session bean is saying "Ok, I want to use a session bean
now"
home.create() on an entity bean means "I want an entry put into the
persistant store"
and of cos for remove:
session: Ok, I am done
entity: nuke that bad boy from the store
It may have been better to have the different interfaces have different
method names.
Dion
> -----Original Message-----
> From: A mailing list for Enterprise JavaBeans development
> [mailto:[EMAIL PROTECTED]]On Behalf Of Vance Christiaanse
> Sent: Sunday, April 15, 2001 3:57 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Basic Theory Question
>
>
> ejbCreate() is not invoked when an entity bean is created for an
> existing row.
>
> For an existing row, the container will invoke the following
> * newInstance()
> * setEntityContext(...)
> * ejbActivate()
> * ejbLoad()
>
> The first two steps are not necessary if there is already a pooled
> instance of the class available.
>
> Vance
>
> Vance Christiaanse
> Cintech Consulting
>
> Dane Jones wrote:
> >
> > Thanks Dion for your quick response.
> >
> > However your answer is actually the very cause of my confusion.
> >
> > As far as I can tell, the ejbFind*() methods are called after the
> > ejbCreate() is invoked. Is that correct? In that case, if cust
> > already exists (I don't mean _cust_ per se, but the table row
> that will be
> > used to fill the EJB's attributes) what's the point of an
> > INSERT statement within ejbCreate() when it's already there and the
> > ejbFind*() method can retrieve the existing record?
> >
> > Does the ejbCreate() method *have* to contain an INSERT
> statement (for BMP)?
> > And does the ejbRemove() method have
> > to contain a DELETE statement?
> >
> > I know I'm missing something quite logical, and this is making
> me feel quite
> > stupid.
> >
> > Again, thanks for your help on this
> >
> > Cheers
> >
> > DJ
>
> ==================================================================
> =========
> 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".