org.jboss.seam.transaction
Class EjbSynchronizations

java.lang.Object
  extended by org.jboss.seam.transaction.EjbSynchronizations
All Implemented Interfaces:
javax.ejb.SessionSynchronization, LocalEjbSynchronizations, Synchronizations

@Name(value="org.jboss.seam.transaction.synchronizations")
@Scope(value=EVENT)
@Install(precedence=10,
         dependencies="org.jboss.seam.transaction.ejbTransaction")
@BypassInterceptors
public class EjbSynchronizations
extends Object
implements LocalEjbSynchronizations, javax.ejb.SessionSynchronization

Receives JTA transaction completion notifications from the EJB container, and passes them on to the registered Synchronizations. This implementation is fully aware of container managed transactions and is able to register Synchronizations for the container transaction.

Author:
Gavin King

Field Summary
protected  LinkedList<org.jboss.seam.transaction.SynchronizationRegistry> committing
           
protected  LinkedList<org.jboss.seam.transaction.SynchronizationRegistry> synchronizations
           
 
Constructor Summary
EjbSynchronizations()
           
 
Method Summary
 void afterBegin()
           
 void afterCompletion(boolean success)
           
 void afterTransactionBegin()
           
 void afterTransactionCommit(boolean success)
           
 void afterTransactionRollback()
           
 void beforeCompletion()
           
 void beforeTransactionCommit()
           
 void destroy()
           
 boolean isAwareOfContainerTransactions()
           
 void registerSynchronization(Synchronization sync)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

synchronizations

protected LinkedList<org.jboss.seam.transaction.SynchronizationRegistry> synchronizations

committing

protected LinkedList<org.jboss.seam.transaction.SynchronizationRegistry> committing
Constructor Detail

EjbSynchronizations

public EjbSynchronizations()
Method Detail

afterBegin

public void afterBegin()
Specified by:
afterBegin in interface javax.ejb.SessionSynchronization

beforeCompletion

public void beforeCompletion()
                      throws javax.ejb.EJBException,
                             RemoteException
Specified by:
beforeCompletion in interface javax.ejb.SessionSynchronization
Throws:
javax.ejb.EJBException
RemoteException

afterCompletion

public void afterCompletion(boolean success)
                     throws javax.ejb.EJBException,
                            RemoteException
Specified by:
afterCompletion in interface javax.ejb.SessionSynchronization
Throws:
javax.ejb.EJBException
RemoteException

isAwareOfContainerTransactions

public boolean isAwareOfContainerTransactions()
Specified by:
isAwareOfContainerTransactions in interface Synchronizations

afterTransactionBegin

public void afterTransactionBegin()
Specified by:
afterTransactionBegin in interface Synchronizations

afterTransactionCommit

public void afterTransactionCommit(boolean success)
Specified by:
afterTransactionCommit in interface Synchronizations

afterTransactionRollback

public void afterTransactionRollback()
Specified by:
afterTransactionRollback in interface Synchronizations

beforeTransactionCommit

public void beforeTransactionCommit()
Specified by:
beforeTransactionCommit in interface Synchronizations

registerSynchronization

public void registerSynchronization(Synchronization sync)
Specified by:
registerSynchronization in interface Synchronizations

destroy

public void destroy()
Specified by:
destroy in interface LocalEjbSynchronizations


Copyright © 2011 Seam Framework. All Rights Reserved.