What is Session Synchronization in EJB

Showing Answers 1 - 1 of 1 Answers

Arun Kumar D - SCJP, SCBCD 1.3

  • Mar 26th, 2007
 

SessionSynchronization is an interface in the javax.ejb package. This interface can be implemented by the ejb to show the transactional state of the bean.

The different methods that come into this interface are:

1. aferBegin() - Container call this method to inform the instance of the ejb that the transaction is started.

2. beforeCompletion() - To inform the bean that the transaction is about to be committed.

3. afterCompletion() - Called to inform that the transaction is completed.

Another imp. point is that only Statefull session beans can implement SessionSynchronization interface.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions