org.slim3.transaction.jta
Class TransactionSynchronizationRegistryImpl

java.lang.Object
  extended by org.slim3.transaction.jta.TransactionSynchronizationRegistryImpl
All Implemented Interfaces:
TransactionSynchronizationRegistry

public class TransactionSynchronizationRegistryImpl
extends Object
implements TransactionSynchronizationRegistry

An implementation class for TransactionSynchronizationRegistry.

Since:
3.0
Author:
higa

Nested Class Summary
protected  class TransactionSynchronizationRegistryImpl.SynchronizationContext
          The synchronization context attached to transaction.
 
Field Summary
protected  ThreadLocal<TransactionSynchronizationRegistryImpl.SynchronizationContext> contexts
          The synchronization context for thread.
protected  Log log
          The log.
protected  TransactionManager tm
          The transaction manager.
 
Constructor Summary
TransactionSynchronizationRegistryImpl(TransactionManager tm)
          Constructor.
 
Method Summary
protected  TransactionSynchronizationRegistryImpl.SynchronizationContext getContext()
          Returns the synchronization context attached to transaction.
 Object getResource(Object key)
           
 boolean getRollbackOnly()
           
 Object getTransactionKey()
           
 int getTransactionStatus()
           
 void putResource(Object key, Object resource)
           
 void registerInterposedSynchronization(Synchronization sync)
           
 void setRollbackOnly()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected Log log
The log.


tm

protected TransactionManager tm
The transaction manager.


contexts

protected ThreadLocal<TransactionSynchronizationRegistryImpl.SynchronizationContext> contexts
The synchronization context for thread.

Constructor Detail

TransactionSynchronizationRegistryImpl

public TransactionSynchronizationRegistryImpl(TransactionManager tm)
Constructor.

Parameters:
tm - The transaction manager
Method Detail

putResource

public void putResource(Object key,
                        Object resource)
Specified by:
putResource in interface TransactionSynchronizationRegistry

getResource

public Object getResource(Object key)
Specified by:
getResource in interface TransactionSynchronizationRegistry

setRollbackOnly

public void setRollbackOnly()
Specified by:
setRollbackOnly in interface TransactionSynchronizationRegistry

getRollbackOnly

public boolean getRollbackOnly()
Specified by:
getRollbackOnly in interface TransactionSynchronizationRegistry

getTransactionKey

public Object getTransactionKey()
Specified by:
getTransactionKey in interface TransactionSynchronizationRegistry

getTransactionStatus

public int getTransactionStatus()
Specified by:
getTransactionStatus in interface TransactionSynchronizationRegistry

registerInterposedSynchronization

public void registerInterposedSynchronization(Synchronization sync)
Specified by:
registerInterposedSynchronization in interface TransactionSynchronizationRegistry

getContext

protected TransactionSynchronizationRegistryImpl.SynchronizationContext getContext()
Returns the synchronization context attached to transaction.

Returns:
the synchronization context


Copyright © 2008-2009 The Slim3 project. All Rights Reserved.