John Ellwood wrote:
>
> I noticed this behaviour of the RI when the method called was
> non-transactional.
> I suggest you ensure that the transaction attributes of the method are
> REQUIRED.
>
> Now whether this is the behaviour required by the spec I won't speculate...

This is broken behaviour, but as you say easily worked around by
using the REQUIRED attribute.

> Cheers,
> John
> --
> John R. Ellwood         mailto: [EMAIL PROTECTED]
> Principal Architect     Phone: +61 7 3303 3126
> Mincom Limited          Fax: +61 7 3303 3257
> http://www.mincom.com
>
> This transmission is for the intended addressee only and is confidential
> information. If you have received this transmission in error, please delete
> it and notify the sender. The contents of this e-mail are the opinion of the
> writer only and are not endorsed by Mincom Limited unless expressly stated
> otherwise.
>  -----Original Message-----
> From: A mailing list for Enterprise JavaBeans development
> [mailto:[EMAIL PROTECTED]]On Behalf Of Benjamin Broll
> Sent: Tuesday, November 14, 2000 5:50 AM
> To: [EMAIL PROTECTED]
> Subject: Entity Bean Component Contract
>
> Hia,
>
> I've got a question related to the Container's view of the Entity Bean
> Component Contract as specified in the EJB Spec 1.1.
>
> Especially I'm concerned with the calling of the ejbLoad() method as
> specified in the spec and as it is implemented in the J2EE Reference
> Implementation.
>
> Since I bought the book Enterprise JavaBeanse 2nd Edition I trusted in the
> statements of the author but I have found one to be too general. In my case
> I execute a findByPrimaryKey() method on the home interface of a BMP entity
> bean. As it is said on page 214, transitioning from the pooled state to the
> ready state via a find method is in fact like the transitioning via
> activation. Now th author states on page 215 that when a BMP entity bean
> transitions from the pooled state to the ready state via activation, at
> first the method ejbActivate() and then the method ejbLoad() is called by
> the container.
>
> But at least for one container this is not true - the container of the J2EE
> RI (so that's why I'm a bit confused right now :). As debugging revealed,
> the container does only call the ejbActivate() method without calling the
> ejbLoad() method afterwards. Although I can simply call the ejbLoad() method
> in the ejbActivate() method the container's behaviour does not seem to be in
> line with the spec.
>
> The spec (9.1.5.2 - public void ejbLoad();) says that the container must
> invoke the ejbLoad() method whenever it becomes necessary for the instance
> to synchronize its state from its state in the database. And since the first
> call of a business method seems to me as the perfect reason to synchronize
> the state of an entity bean (and thus I think Monson-Haefel is right with
> the assertion in his book), the container of the J2EE RI should call the
> ejbLoad() method.
>
> What do you say? Am I the only person (ie. do I have the only computer :)
> where this happens?
>
> Regards,
>
> .bbr
>
> <environment>
> - J2EE 1.2.1
> - Cloudscape Developer Edition 3.5
> - a BMP entity bean
> - a client calling a find method on the entity bean
> </environment>
>
> ===========================================================================
> 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".

--
________________________________________________________________________________

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