jodd.jtx.proxy
Class AnnotationTxAdviceManager

java.lang.Object
  extended by jodd.jtx.proxy.AnnotationTxAdviceManager

public class AnnotationTxAdviceManager
extends java.lang.Object

Manager for AnnotationTxAdvice.


Field Summary
protected  java.lang.String contextPattern
           
protected  JtxTransactionMode defaultTransactionMode
           
protected static java.lang.String JTXCTX_PATTERN_CLASS
           
protected static java.lang.String JTXCTX_PATTERN_METHOD
           
protected  LeanTransactionWorker jtxWorker
           
protected  java.util.Map<java.lang.String,JtxTransactionMode> txmap
           
 
Constructor Summary
AnnotationTxAdviceManager(JtxTransactionManager jtxManager)
           
AnnotationTxAdviceManager(JtxTransactionManager jtxManager, java.lang.String contextPattern)
           
AnnotationTxAdviceManager(JtxTransactionManager jtxManager, java.lang.String contextPattern, JtxTransactionMode defaultTxMode)
           
AnnotationTxAdviceManager(LeanTransactionWorker jtxWorker)
           
AnnotationTxAdviceManager(LeanTransactionWorker jtxWorker, java.lang.String contextPattern)
           
AnnotationTxAdviceManager(LeanTransactionWorker jtxWorker, java.lang.String contextPattern, JtxTransactionMode defaultTxMode)
           
 
Method Summary
 JtxTransactionMode getDefaultTransactionMode()
          Returns default transaction mode.
 LeanTransactionWorker getJtxWorker()
          Returns tx worker.
 JtxTransactionMode getTxMode(java.lang.Class type, java.lang.String methodName, java.lang.Class[] methodArgTypes, java.lang.String unique)
          Reads transaction mode from method annotation.
 java.lang.String resolveContext(java.lang.Class type, java.lang.String methodName)
          Resolves tx context from context pattern.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JTXCTX_PATTERN_CLASS

protected static final java.lang.String JTXCTX_PATTERN_CLASS
See Also:
Constant Field Values

JTXCTX_PATTERN_METHOD

protected static final java.lang.String JTXCTX_PATTERN_METHOD
See Also:
Constant Field Values

txmap

protected final java.util.Map<java.lang.String,JtxTransactionMode> txmap

jtxWorker

protected final LeanTransactionWorker jtxWorker

defaultTransactionMode

protected final JtxTransactionMode defaultTransactionMode

contextPattern

protected final java.lang.String contextPattern
Constructor Detail

AnnotationTxAdviceManager

public AnnotationTxAdviceManager(JtxTransactionManager jtxManager)

AnnotationTxAdviceManager

public AnnotationTxAdviceManager(LeanTransactionWorker jtxWorker)

AnnotationTxAdviceManager

public AnnotationTxAdviceManager(JtxTransactionManager jtxManager,
                                 java.lang.String contextPattern)

AnnotationTxAdviceManager

public AnnotationTxAdviceManager(LeanTransactionWorker jtxWorker,
                                 java.lang.String contextPattern)

AnnotationTxAdviceManager

public AnnotationTxAdviceManager(JtxTransactionManager jtxManager,
                                 java.lang.String contextPattern,
                                 JtxTransactionMode defaultTxMode)

AnnotationTxAdviceManager

public AnnotationTxAdviceManager(LeanTransactionWorker jtxWorker,
                                 java.lang.String contextPattern,
                                 JtxTransactionMode defaultTxMode)
Method Detail

getJtxWorker

public LeanTransactionWorker getJtxWorker()
Returns tx worker.


getDefaultTransactionMode

public JtxTransactionMode getDefaultTransactionMode()
Returns default transaction mode.


resolveContext

public java.lang.String resolveContext(java.lang.Class type,
                                       java.lang.String methodName)
Resolves tx context from context pattern.


getTxMode

public JtxTransactionMode getTxMode(java.lang.Class type,
                                    java.lang.String methodName,
                                    java.lang.Class[] methodArgTypes,
                                    java.lang.String unique)
Reads transaction mode from method annotation. Annotations are cached for better performances.

Parameters:
type - target class
methodName - target method name over which the transaction should be wrapped
methodArgTypes - types of arguments, used to find the method
unique - unique method fingerprint that contains return and arguments type information


Copyright © 2003-2010 Jodd Team