javax.ejb
Interface SessionSynchronization
- public interface SessionSynchronization
The SessionSynchronization interface allows a session Bean instance to be notified by its container of transaction boundaries. SessionSynchronization接口允许会话Bean实例接收容器关于事务边界的通知。
An session Bean class is not required to implement this interface. A session Bean class should implement this interface only if it wishes to synchronize its state with the transactions. 会话Bean类不要求实现该接口。只有当会话Bean类希望实现与事务同步状态时才应该实现该接口。
| Method Summary | |
void | afterBegin() The afterBegin method notifies a session Bean instance that a new transaction has started, and that the subsequent business methods on the instance will be invoked in the context of the transaction. afterBegin方法通知会话Bean实例新事务开始,随后该实例的业务方法将在事务上下文中调用。 |
void | afterCompletion(boolean committed) The afterCompletion method notifies a session Bean instance that a transaction commit protocol has completed, and tells the instance whether the transaction has been committed or rolled back. afterCompletion方法通知会话Bean实例事务提交协议已经完成,告知实例事务 是要提交还是回滚。 |
void | beforeCompletion() The beforeCompletion method notifies a session Bean instance that a transaction is about to be committed. beforeCompletion方法通知会话Bean实例事务将被提交。 |
| Method Detail |