Jim,

The container will not use the bean callback methods to reverse a
transaction. Rollbacks are exceptional cases and are not part of the
normal bean life cycle. In general the bean is removed from the ready
state and the underlying transactional resources are rolledback. The
details depend on the container.

In you examples:

Xie, Jinpeng wrote:

I am using a stateless session bean(SLSB) to facade entity beans. The
question I have is about rollback in SLSB.
1. If an entity bean has been updated by ejbStore in SLSB, I know it will be
rollback by ejbLoad.

Correct, ejbLoad will be invoked before the next business method.

2. If an entity bean has been created by ejbCreate in SLSB, will it be
rollback by ejbRemove?

No. Most likely the bean will be removed from the ready state and the
underlying database will be rolledback (removing the inserted rows).

3. If an entity bean has been removed by ejbRemove in SLSB, will it be
rollback by ejbCreate?

No. The bean would not be in the ready state due to the ejbRemove. The
database will be rolledback (undoing the row deletion). Most likely the
next business method on this bean will activate it again and call ejbLoad.

For more details you'd need to check with the particular container
you're using.



Thanks!

Jim


You're welcome.

--Victor

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