org.springframework.integration.endpoint.interceptor
Class TransactionInterceptor

java.lang.Object
  extended by org.springframework.integration.endpoint.interceptor.EndpointInterceptorAdapter
      extended by org.springframework.integration.endpoint.interceptor.TransactionInterceptor
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean, EndpointInterceptor

public class TransactionInterceptor
extends EndpointInterceptorAdapter
implements org.springframework.beans.factory.InitializingBean

An EndpointInterceptor implementation that provides transactional behavior with a PlatformTransactionManager.

Author:
Mark Fisher

Field Summary
private  java.lang.String isolationLevelName
           
private  org.apache.commons.logging.Log logger
           
private  java.lang.String propagationBehaviorName
           
private  boolean readOnly
           
private  int timeout
           
private  org.springframework.transaction.PlatformTransactionManager transactionManager
           
private  org.springframework.transaction.support.TransactionTemplate transactionTemplate
           
 
Constructor Summary
TransactionInterceptor(org.springframework.transaction.PlatformTransactionManager transactionManager)
           
 
Method Summary
 void afterPropertiesSet()
           
 Message<?> aroundHandle(Message<?> message, MessageHandler handler)
           
 void setIsolationLevelName(java.lang.String isolationLevelName)
           
 void setPropagationBehaviorName(java.lang.String propagationBehaviorName)
           
 void setReadOnly(boolean readOnly)
           
 void setTimeout(int timeout)
           
 
Methods inherited from class org.springframework.integration.endpoint.interceptor.EndpointInterceptorAdapter
postHandle, preHandle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private final org.apache.commons.logging.Log logger

transactionManager

private final org.springframework.transaction.PlatformTransactionManager transactionManager

transactionTemplate

private volatile org.springframework.transaction.support.TransactionTemplate transactionTemplate

propagationBehaviorName

private volatile java.lang.String propagationBehaviorName

isolationLevelName

private volatile java.lang.String isolationLevelName

timeout

private volatile int timeout

readOnly

private volatile boolean readOnly
Constructor Detail

TransactionInterceptor

public TransactionInterceptor(org.springframework.transaction.PlatformTransactionManager transactionManager)
Method Detail

setPropagationBehaviorName

public void setPropagationBehaviorName(java.lang.String propagationBehaviorName)

setIsolationLevelName

public void setIsolationLevelName(java.lang.String isolationLevelName)

setTimeout

public void setTimeout(int timeout)

setReadOnly

public void setReadOnly(boolean readOnly)

afterPropertiesSet

public void afterPropertiesSet()
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean

aroundHandle

public Message<?> aroundHandle(Message<?> message,
                               MessageHandler handler)
Specified by:
aroundHandle in interface EndpointInterceptor
Overrides:
aroundHandle in class EndpointInterceptorAdapter