ColdSpring 2.0 - Narwhal

coldspring.transaction.interceptor
Class TransactionInterceptor

WEB-INF.cftags.component
        extended by coldspring.transaction.interceptor.TransactionInterceptor
All Implemented Interfaces:
MethodInterceptor , Ordered

public class TransactionInterceptor
extends WEB-INF.cftags.component

MethodInterceptor for declarative transaction management using <cftransaction>.
Also allows for nested AOP based transactions in CF8. This advice has been ordered with the Highest precedence, so that it comes first, but it can be overwritten by constructor and property setters.


Constructor Summary
init([numeric order])
          Constructor
 
Method Summary
 boolean getInTransaction()
          returns if we are in a transaction
 string getIsolation()
          set Isolation level of the transaction to be applied
 numeric getOrder()
          Return the order value of this object, with a higher value meaning greater in terms of sorting
private any getTransactionLocal()
 boolean hasIsolation()
          whether this object has a isolation value
 any invokeMethod(MethodInvocation methodInvocation)
          Invoke the method, from within a transaction block, unless already in a transaction block
 void setIsolation(string isolation)
          Set the isolation level of the current transaction being applied
 void setOrder(numeric order)
private void setTransactionLocal(any transactionLocal)
 
Methods inherited from class WEB-INF.cftags.component
 

Constructor Detail

init

public init([numeric order])
Constructor

Parameters:
order - The order value for this interceptor
Method Detail

getInTransaction

public boolean getInTransaction()
returns if we are in a transaction


getIsolation

public string getIsolation()
set Isolation level of the transaction to be applied


getOrder

public numeric getOrder()
Return the order value of this object, with a higher value meaning greater in terms of sorting.
Higher values can be interpreted as lower priority. As a consequence, the object with the lowest value has highest priority.

Specified by:
getOrder in interface Ordered

getTransactionLocal

private any getTransactionLocal()


hasIsolation

public boolean hasIsolation()
whether this object has a isolation value


invokeMethod

public any invokeMethod(MethodInvocation methodInvocation)
Invoke the method, from within a transaction block, unless already in a transaction block.

Specified by:
invokeMethod in interface MethodInterceptor
Parameters:
methodInvocation - the method invocation joinpoint

setIsolation

public void setIsolation(string isolation)
Set the isolation level of the current transaction being applied.
Note that when using nested transactions, the isolation level of the outer-most transaction is used.

Parameters:
isolation

setOrder

public void setOrder(numeric order)

Parameters:
order

setTransactionLocal

private void setTransactionLocal(any transactionLocal)

Parameters:
transactionLocal

ColdSpring 2.0 - Narwhal