Special edition using Java 2 (Book, 2001) [WorldCat.org]

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 Using the SessionSynchronization interface with session When a transaction executes as part of a stateful session bean, the bean can receive synchronous notifications of the progress of the transaction using the Developing Enterprise Java Applications with J2EE and UML Remote interface, 195-196 and servlets, 205 session-to-session relationships of, 206-207 technology of, 194-197 transactions, 189-194 types of and conversational state, 184-186 session management, servlet, 148-149 session objects, 163 server-side, 148 SessionSynchronization interface, 191-193 session-to-session relationships, 206-207 About using <transaction:ejb-transaction/>| JBoss.org Dec 20, 2012

All Implemented Interfaces: Serializable, Comparable public enum SessionSynchronization extends Enum

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

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.

One solution to solve this issue is to use a @Stateful session bean that implements the javax.ejb.SessionSynchronization interface. This interface allows you to react on a rollback. Another solution is to work with custom EventLog entries written by the main transaction via JPA. A stateful session bean using container-managed transactions can implement the javax.ejb.SessionSynchronization interface to provide transaction synchronization notifications. This interface defines only 3 methods - afterBegin(), beforeCompletion() and afterCompletion(). the SessionSynchronization interface. In this case, the bean objects will be informed of transaction boundaries. A rollback could result in a session bean object's state being inconsistent; in this case, implementing the SessionSynchronization interface may enable the bean object to update its state according to the transaction completion interfaces. See also Home interface; Remote interface modeling behavior of, 197-199 representing, 43-44 SessionSynchronization, 191-193 internal view entity bean, 219-220 session bean, 182 Internet Inter-Orb Protocol (IIOP), 23 inventory management, 4 isolated principle, 190 isSecure, 138 iteration plans, 287, 288 iterative development process A stateful session Bean with container-managed transaction demarcation can optionally implement the javax.ejb.SessionSynchronization interface. This interface can provide the Bean with transaction synchronization notifications. The Session Synchronization interface methods that the EJB provider must develop are the following: