javax.ejb

Interface SessionSynchronization

public interface SessionSynchronization

The main ejb context.

Method Summary

void
afterBegin()
void
afterCompletion(boolean committed)
void
beforeCompletion()

Method Details

afterBegin

public void afterBegin()
            throws EJBException,
                   RemoteException
Usages and Demos :

View More Examples of afterBegin()
   1: import javax.transaction.Status;
   2: import javax.ejb.SessionSynchronization;
   3: import javax.ejb.EJBException;
   4:         ...
   5:   private Transaction tx = null;
   6:   private SessionSynchronization sessionSync = null;
   7: 
   8:         ...
   9:   public EJBSynchronization(SessionSynchronization sessionSync) {
  10:     this.sessionSync = sessionSync;
  11:         ...
  12:     try {
  13:       sessionSync.afterBegin();

View Full Code Here
   1: import javax.ejb.EJBException;
   2: import javax.ejb.SessionSynchronization;
   3: import javax.transaction.Status;
   4:         ...
   5:     private Transaction tx = null;
   6:     private SessionSynchronization sessionSync = null;
   7: 
   8:         ...
   9:     public EJBSynchronization(SessionSynchronization sessionSync, Transaction tx) {
  10:         this.sessionSync = sessionSync;
  11:         ...
  12:         try {
  13:             sessionSync.afterBegin();

View Full Code Here
   1: 
   2:   public void registerSynchronization(SessionSynchronization sync)
   3:   {
   4:         ...
   5:       if (xa != null && sync != null) {
   6:     sync.afterBegin();
   7:     
   8:         ...
   9:   public static class SynchronizationAdapter implements Synchronization {
  10:     private final SessionSynchronization _sync;
  11: 
  12:         ...
  13:     SynchronizationAdapter(SessionSynchronization sync)

View Full Code Here
   1: import javax.ejb.EnterpriseBean;
   2: import javax.ejb.SessionSynchronization;
   3: import javax.transaction.Status;
   4:         ...
   5: 
   6:     public static void registerSessionSynchronization(SessionSynchronization session, TransactionContext context) throws javax.transaction.SystemException, javax.transaction.RollbackException{
   7:         SessionSynchronizationCoordinator coordinator = null;
   8:         ...
   9:     
  10:     private void _registerSessionSynchronization(SessionSynchronization session, TransactionContext context){
  11:         boolean registered = sessionSynchronizations.containsKey( context.callContext.getPrimaryKey() );
  12:         ...
  13:             
  14:             session.afterBegin();

View Full Code Here
   1: import javax.ejb.EJBException;
   2: import javax.ejb.SessionSynchronization;
   3: import javax.transaction.Status;
   4:         ...
   5: 
   6:   private SessionSynchronization []_sessions = new SessionSynchronization[16];
   7:   private int _sessionTop;
   8:         ...
   9:     try {
  10:       session.afterBegin();
  11:     } catch (RemoteException e) {

View Full Code Here

afterCompletion

public void afterCompletion(boolean committed)
            throws EJBException,
                   RemoteException
Usages and Demos :

View More Examples of afterCompletion(boolean committed)
   1: import javax.transaction.Status;
   2: import javax.ejb.SessionSynchronization;
   3: import javax.ejb.EJBException;
   4:         ...
   5:   private Transaction tx = null;
   6:   private SessionSynchronization sessionSync = null;
   7: 
   8:         ...
   9:   public EJBSynchronization(SessionSynchronization sessionSync) {
  10:     this.sessionSync = sessionSync;
  11:         ...
  12:       if (status == Status.STATUS_COMMITTED) {
  13:         sessionSync.afterCompletion(true);

View Full Code Here
   1: import javax.ejb.EJBException;
   2: import javax.ejb.SessionSynchronization;
   3: import javax.transaction.Status;
   4:         ...
   5:     private Transaction tx = null;
   6:     private SessionSynchronization sessionSync = null;
   7: 
   8:         ...
   9:     public EJBSynchronization(SessionSynchronization sessionSync, Transaction tx) {
  10:         this.sessionSync = sessionSync;
  11:         ...
  12:             if(status == Status.STATUS_COMMITTED) {
  13:                 sessionSync.afterCompletion(true);

View Full Code Here

beforeCompletion

public void beforeCompletion()
            throws EJBException,
                   RemoteException
Usages and Demos :

View More Examples of beforeCompletion()
   1: import javax.transaction.Status;
   2: import javax.ejb.SessionSynchronization;
   3: import javax.ejb.EJBException;
   4:         ...
   5:   private Transaction tx = null;
   6:   private SessionSynchronization sessionSync = null;
   7: 
   8:         ...
   9:   public EJBSynchronization(SessionSynchronization sessionSync) {
  10:     this.sessionSync = sessionSync;
  11:         ...
  12:     try {
  13:       sessionSync.beforeCompletion();

View Full Code Here
   1: import javax.ejb.EJBException;
   2: import javax.ejb.SessionSynchronization;
   3: import javax.transaction.Status;
   4:         ...
   5:     private Transaction tx = null;
   6:     private SessionSynchronization sessionSync = null;
   7: 
   8:         ...
   9:     public EJBSynchronization(SessionSynchronization sessionSync, Transaction tx) {
  10:         this.sessionSync = sessionSync;
  11:         ...
  12:         try {
  13:             sessionSync.beforeCompletion();

View Full Code Here