org.exoplatform.services.transaction.impl.jotm
Class TransactionServiceJotmImpl

java.lang.Object
  extended by org.exoplatform.services.transaction.impl.jotm.TransactionServiceJotmImpl
All Implemented Interfaces:
TransactionService

public class TransactionServiceJotmImpl
extends Object
implements TransactionService

Created by The eXo Platform SAS.
JOTM based implementation of TransactionService

Version:
$Id: $
Author:
Gennady Azarenkov

Field Summary
protected static org.apache.commons.logging.Log log
           
 
Constructor Summary
TransactionServiceJotmImpl(InitialContextInitializer initializer, InitParams params)
           
 
Method Summary
 Xid createXid()
          creates unique XA transaction identifier
 void delistResource(ExoResource exores)
          delists XA resource from transaction manager
 void enlistResource(ExoResource exores)
          enlists XA resource in transaction manager
 int getDefaultTimeout()
           
 TransactionManager getTransactionManager()
           
 UserTransaction getUserTransaction()
           
 List popThreadLocalRMEventList()
          Pop the current set from the stack of thread local resource event sets The list contains ResourceManagerEvent objects.
 void pushThreadLocalRMEventList(List eventList)
          Push a new event list on the stack of thread local resource event sets.
 void setTransactionTimeout(int seconds)
          sets timeout in seconds
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.commons.logging.Log log
Constructor Detail

TransactionServiceJotmImpl

public TransactionServiceJotmImpl(InitialContextInitializer initializer,
                                  InitParams params)
                           throws RemoteException
Throws:
RemoteException
Method Detail

getTransactionManager

public TransactionManager getTransactionManager()
Specified by:
getTransactionManager in interface TransactionService
Returns:
TransactionManager

getUserTransaction

public UserTransaction getUserTransaction()
Specified by:
getUserTransaction in interface TransactionService
Returns:
UserTransaction

enlistResource

public void enlistResource(ExoResource exores)
                    throws RollbackException,
                           SystemException
Description copied from interface: TransactionService
enlists XA resource in transaction manager

Specified by:
enlistResource in interface TransactionService
Parameters:
exores - XAResource
Throws:
RollbackException
SystemException

delistResource

public void delistResource(ExoResource exores)
                    throws RollbackException,
                           SystemException
Description copied from interface: TransactionService
delists XA resource from transaction manager

Specified by:
delistResource in interface TransactionService
Parameters:
exores - XAResource
Throws:
RollbackException
SystemException

createXid

public Xid createXid()
Description copied from interface: TransactionService
creates unique XA transaction identifier

Specified by:
createXid in interface TransactionService
Returns:
Xid

getDefaultTimeout

public int getDefaultTimeout()
Specified by:
getDefaultTimeout in interface TransactionService
Returns:
default timeout in seconds

setTransactionTimeout

public void setTransactionTimeout(int seconds)
                           throws SystemException
Description copied from interface: TransactionService
sets timeout in seconds

Specified by:
setTransactionTimeout in interface TransactionService
Throws:
SystemException

pushThreadLocalRMEventList

public void pushThreadLocalRMEventList(List eventList)
Push a new event list on the stack of thread local resource event sets. The list must contain only ResourceManagerEvent objects.

Parameters:
eventList - the possibly null list of events to store forecoming ResourceManagerEvent events occuring in the current thread.

popThreadLocalRMEventList

public List popThreadLocalRMEventList()
Pop the current set from the stack of thread local resource event sets The list contains ResourceManagerEvent objects.

Returns:
The possibly null ResourceManagerEvent list of events that have occured in the current thread since the last call of pushThreadLocalRMEventList or since the thread started.


Copyright © 2009 eXo Platform SAS. All Rights Reserved.