- A stateless session bean must not implement the javax.ejb.SessionSynchronization interface. Message-driven Bean - Client view: the existence of a MDB is completely hidden behind the destination or endpoint for which the MDB is the message listener - Step 2 (Dependency injection) includes injecting SessionContext.-----

: Package javax.ejb - Novell The SessionContext interface provides access to the runtime session context that the container provides for a session enterprise Bean instance. SessionSynchronization: The SessionSynchronization interface allows a session Bean instance to be notified by its container of transaction boundaries. EJB 3 Session Beans - Developer.com A stateful session bean can receive this kind of notification by the EJB container when it implements the javax.ejb.SessionSynchronization interface. This is an optional feature. There are three different types of transaction notifications that the stateful session bean receives from the EJB container, as follows: [WFLY-6215] SessionSynchronization callbacks allow

Other bean types must not implement the SessionSynchronization interface or use the session synchronization annotations. See also this thread for some more background. So my conclusion is that making stateless session beans transaction-aware using CMT can NOT be achieved with javax.ejb.SessionSynchronization.

The Life Cycle of a Stateful Session Bean - Enterprise This interface defines an additional set of callback methods that notify the bean of its participation in transactions. A bean that implements SessionSynchronization can cache database data across several method calls before making an update. java - Spring Stateful Bean equivalent - synchronization

Interface javax.ejb.SessionSynchronization

Interface SessionSynchronization. public interface SessionSynchronization. The main ejb context. Method Summary. All Methods Instance Methods Abstract Methods ; Modifier and Type Method and Description; void: afterBegin void: afterCompletion (boolean committed) void: beforeCompletion Identify correct and incorrect statements or examples javax.ejb.SessionSynchronization Interface. A stateful session bean with container-managed transaction (CMT) demarcation can optionally implement the javax.ejb.SessionSynchronization interface.. The SessionSynchronization interface is defined as follows: . package javax.ejb; public interface javax.ejb.SessionSynchronization { void afterBegin() throws RemoteException; void beforeCompletion