9.1.7.1 ejbLoad and ejbStore with the NotSupported transaction attribute
The use of the ejbLoad and ejbStore methods for caching an entity object�s state in 
the instance
works well only if the Container can use transaction boundaries to drive the ejbLoad 
and ejbStore
methods. When the NotSupported [7] transaction attribute is assigned to a remote 
interface method,
the corresponding enterprise bean class method executes with an unspecified 
transaction context (See
Subsection 11.6.3). This means that the Container does not have any well-defined 
transaction bound-aries
to drive the ejbLoad and ejbStore methods on the instance.
Therefore, the ejbLoad and ejbStore methods are �unreliable� for the instances that 
the Container
uses to dispatch the methods with an unspecified transaction context. The following 
are the only guaran-tees
that the Container provides for the instances that execute the methods with an 
unspecified transac-tion
context:
� The Container invokes at least one ejbLoad between ejbActivate and the first business
method in the instance.
� The Container invokes at least one ejbStore between the last business method on the
instance and the ejbPassivate method.
Because the entity object�s state accessed between the ejbLoad and ejbStore method 
pair is not
protected by a transaction boundary for the methods that execute with an unspecified 
transaction con-text,
the Bean Provider should not attempt to use the ejbLoad and ejbStore methods to control
caching of the entity object�s state in the instance. Typically, the implementation of 
the ejbLoad and
ejbStore methods should be a no-op (i.e. an empty method), and each business method 
should access
the entity object�s state directly in the database.

James Cook wrote:
>
> ----- Original Message -----
> From: "Evan Ireland" <[EMAIL PROTECTED]>
>
> > Even if there is no transaction context the container has to call
> > ejbStore.
>
> Far be it for me to question an author of an EJB server, but the spec (1.1) is
> very gray on whether ejbStore needs to be called on an EntityBean executed
> outside of a transactional context.
>
> >From anecdotal evidence (IIRC) it appears that there are some containers that do
> *not* call ejbSotre in these situations.
>
> jim
>
> ===========================================================================
> 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".

--
________________________________________________________________________________

Evan Ireland              Sybase EAServer Engineering        [EMAIL PROTECTED]
                            Wellington, New Zealand               +64 4 934-5856

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