Save This Page
Home » spring-framework-2.5.5-with-dependencies » org.springframework.jca » cci » connection » [javadoc | source]
org.springframework.jca.cci.connection
public class: CciLocalTransactionManager [javadoc | source]
java.lang.Object
   org.springframework.transaction.support.AbstractPlatformTransactionManager
      org.springframework.jca.cci.connection.CciLocalTransactionManager

All Implemented Interfaces:
    InitializingBean, ResourceTransactionManager, PlatformTransactionManager, Serializable

org.springframework.transaction.PlatformTransactionManager implementation that manages local transactions for a single CCI ConnectionFactory. Binds a CCI Connection from the specified ConnectionFactory to the thread, potentially allowing for one thread-bound Connection per ConnectionFactory.

Application code is required to retrieve the CCI Connection via ConnectionFactoryUtils#getConnection(ConnectionFactory) instead of a standard J2EE-style ConnectionFactory#getConnection() call. Spring classes such as org.springframework.jca.cci.core.CciTemplate use this strategy implicitly. If not used in combination with this transaction manager, the ConnectionFactoryUtils lookup strategy behaves exactly like the native DataSource lookup; it can thus be used in a portable fashion.

Alternatively, you can allow application code to work with the standard J2EE lookup pattern ConnectionFactory#getConnection() , for example for legacy code that is not aware of Spring at all. In that case, define a TransactionAwareConnectionFactoryProxy for your target ConnectionFactory, which will automatically participate in Spring-managed transactions.

Fields inherited from org.springframework.transaction.support.AbstractPlatformTransactionManager:
SYNCHRONIZATION_ALWAYS,  SYNCHRONIZATION_ON_ACTUAL_TRANSACTION,  SYNCHRONIZATION_NEVER,  logger
Constructor:
 public CciLocalTransactionManager() 
 public CciLocalTransactionManager(ConnectionFactory connectionFactory) 
    Create a new CciLocalTransactionManager instance.
    Parameters:
    connectionFactory - CCI ConnectionFactory to manage local transactions for
Method from org.springframework.jca.cci.connection.CciLocalTransactionManager Summary:
afterPropertiesSet,   doBegin,   doCleanupAfterCompletion,   doCommit,   doGetTransaction,   doResume,   doRollback,   doSetRollbackOnly,   doSuspend,   getConnectionFactory,   getResourceFactory,   isExistingTransaction,   isRollbackOnly,   setConnectionFactory
Methods from org.springframework.transaction.support.AbstractPlatformTransactionManager:
commit,   determineTimeout,   doBegin,   doCleanupAfterCompletion,   doCommit,   doGetTransaction,   doResume,   doRollback,   doSetRollbackOnly,   doSuspend,   getDefaultTimeout,   getTransaction,   getTransactionSynchronization,   invokeAfterCompletion,   isExistingTransaction,   isFailEarlyOnGlobalRollbackOnly,   isGlobalRollbackOnParticipationFailure,   isNestedTransactionAllowed,   isRollbackOnCommitFailure,   isValidateExistingTransaction,   newTransactionStatus,   prepareForCommit,   registerAfterCompletionWithExistingTransaction,   resume,   rollback,   setDefaultTimeout,   setFailEarlyOnGlobalRollbackOnly,   setGlobalRollbackOnParticipationFailure,   setNestedTransactionAllowed,   setRollbackOnCommitFailure,   setTransactionSynchronization,   setTransactionSynchronizationName,   setValidateExistingTransaction,   shouldCommitOnGlobalRollbackOnly,   suspend,   triggerBeforeCommit,   triggerBeforeCompletion,   useSavepointForNestedTransaction
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.springframework.jca.cci.connection.CciLocalTransactionManager Detail:
 public  void afterPropertiesSet() 
 protected  void doBegin(Object transaction,
    TransactionDefinition definition) 
 protected  void doCleanupAfterCompletion(Object transaction) 
 protected  void doCommit(DefaultTransactionStatus status) 
 protected Object doGetTransaction() 
 protected  void doResume(Object transaction,
    Object suspendedResources) 
 protected  void doRollback(DefaultTransactionStatus status) 
 protected  void doSetRollbackOnly(DefaultTransactionStatus status) 
 protected Object doSuspend(Object transaction) 
 public ConnectionFactory getConnectionFactory() 
    Return the CCI ConnectionFactory that this instance manages local transactions for.
 public Object getResourceFactory() 
 protected boolean isExistingTransaction(Object transaction) 
 protected boolean isRollbackOnly(Object transaction) throws TransactionException 
 public  void setConnectionFactory(ConnectionFactory cf) 
    Set the CCI ConnectionFactory that this instance should manage local transactions for.