Hi Richard,
I thought that this was specified in the standard:
within a transaction:
- ejbLoad when entering a business method
- executing business method
- ejbStore when leaving business method
commit of those changes only upon commit of the whole transaction in the
container
That's why one should not implement each object as a entity bean as the
performance decreases with this behaviour...
best regards
Marc
-----Original Message-----
From: Richard Monson-Haefel [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 10, 2000 2:08 PM
To: [EMAIL PROTECTED]
Subject: Re: What determines when ejbStore and ejbLoad get called?
DaveFord wrote:
> What determines when ejbStore and ejbLoad get called?
>
This is dependent on how your server is implemented, but for most servers
its
the transaction boundaries that determine when the ejbLoad and ejbStore are
called. When an entity bean is enrolled in a transaction (accessed within a
transaction context) the ejbLoad is invoked to synchronize its state with
the
database before any business methods can be serviced. When the transaction
ends, all the entity beans enrolled in the transaction have their ejbStore
method invoked by the container so that they can write their changes to the
database.
Some vendors may choose to implement their servers so that the ejbLoad and
ejbStore are called before and after (respectively) each method invocation.
This approach consumes more resources and cycles but may ensure that the
entity
bean's state is more current depending on the transaction attribute,
database
isolation and concurrency mechanism employed (server managed concurrency vs.
database managed concurrency).
Richard
--
Richard Monson-Haefel
Author of Enterprise JavaBeans, 2nd Edition
Published by O'Reilly & Associates
http://www.EjbNow.com
===========================================================================
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".