Georg's point is still true: the spec. is very clear that the behavior
of entity beans outside of transactions is undefined and bean developers
shouldn't count on it.
Steve Magoun wrote:
> There's still wiggle room there, and each app server that I've seen
> behaves a bit differently. When you see the words "typically" and
> "should" in the same sentence, I guarantee that people (app server
> developers, here) will do what you suggest they not do. I agree with the
> JBoss interpretation, but JBoss' interpretation of the spec has confused
> many people (including myself) because other app servers behave
> differently. I think there's something about this behavior in the
> manual, but I can't find it right now....
>
> Steve
>
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Georg
> Rehfeld
> Sent: Tuesday, May 08, 2001 10:10 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [JBoss-user] CMP persistance after shutdown
>
>
>> the EJB 1.1 spec isn't
>> trmendously clear how this should be handled. Change the transaction
>> attribute + things should work fine.
>
>
> I think the spec is VERY clear, here is the quote:
>
> | 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 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 boundaries 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 guarantees
> | that the Container provides for the instances that execute the methods
> | with an unspecified transaction 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 context, 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.
>
> regards
>
> Georg
> ___ ___
> | + | |__ Georg Rehfeld Woltmanstr. 12 20097 Hamburg
> |_|_\ |___ [EMAIL PROTECTED] +49 (40) 23 53 27 10
>
>
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user