Transfer version 1.1

transfer.com.sql.transaction
Class Transaction

WEB-INF.cftags.component
        extended by transfer.com.collections.AbstractBaseObservable
            extended by transfer.com.sql.transaction.Transaction

public class Transaction
extends AbstractBaseObservable

Transaction management to allow for cache clearing on Transaction failure, and nested Transactions


Constructor Summary
init(MethodInjector methodInjector, AOPManager aopManager, TransactionAdviceBuilder transactionAdviceBuilder, TransactionEventPool transactionEventPool)
          Constructor
 
Method Summary
 any __invoke(string method, [struct args='[runtime expression]'])
          invokes a method on a cfc (mixin)
 void advise(any component, any pointcut, [boolean debug='false'])
          wrap transaction advise around a given method, or regex pattern of methods
 any execute(any component, string method, [struct args='[runtime expression]'])
          executes a method, wrapped in a Transfer based transaction (works fine on private methods as well!)
private void fireActionMethod(any object, TransactionEvent event)
          fires the transaction action method
private AOPManager getAOPManager()
 boolean getInTransaction()
          returns if we are in a transaction
private MethodInjector getMethodInjector()
private any getSystem()
private TransactionAdviceBuilder getTransactionAdviceBuilder()
private TransactionEventPool getTransactionEventPool()
private any getTransactionLocal()
private void setAOPManager(AOPManager aopManager)
private void setMethodInjector(MethodInjector methodInjector)
private void setSystem(any System)
private void setTransactionAdviceBuilder(TransactionAdviceBuilder transactionAdviceBuilder)
private void setTransactionEventPool(TransactionEventPool transactionEventPool)
private void setTransactionLocal(any transactionLocal)
 
Methods inherited from class transfer.com.collections.AbstractBaseObservable
addObserver, fireEvent, getCollection, removeObserver, removeObserverByKey, setCollection, throw
 
Methods inherited from class WEB-INF.cftags.component
 

Constructor Detail

init

public init(MethodInjector methodInjector, AOPManager aopManager, TransactionAdviceBuilder transactionAdviceBuilder, TransactionEventPool transactionEventPool)
Constructor

Parameters:
methodInjector - The method injector cfc
aopManager - the manager for AOP
transactionAdviceBuilder - builds the transaction advice
transactionEventPool - the transaction event pool
Method Detail

__invoke

public any __invoke(string method, [struct args='[runtime expression]'])
invokes a method on a cfc (mixin)

Parameters:
method - the method name to invoke
args - the argument collection to pass through

advise

public void advise(any component, any pointcut, [boolean debug='false'])
wrap transaction advise around a given method, or regex pattern of methods

Parameters:
component - the component to apply the advice to
pointcut - either a function, or a regex for functions to advise
debug - when true, cftrace's the method names that gets adviced

execute

public any execute(any component, string method, [struct args='[runtime expression]'])
executes a method, wrapped in a Transfer based transaction (works fine on private methods as well!)

Parameters:
component - the component context to execute the method
method - the name of the method to invoke
args - the argument collection to pass through

fireActionMethod

private void fireActionMethod(any object, TransactionEvent event)
fires the transaction action method

Overrides:
fireActionMethod in class AbstractBaseObservable
Parameters:
object - the object to fire against
event - The event object to fire

getAOPManager

private AOPManager getAOPManager()


getInTransaction

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


getMethodInjector

private MethodInjector getMethodInjector()


getSystem

private any getSystem()

Overrides:
getSystem in class AbstractBaseObservable

getTransactionAdviceBuilder

private TransactionAdviceBuilder getTransactionAdviceBuilder()


getTransactionEventPool

private TransactionEventPool getTransactionEventPool()


getTransactionLocal

private any getTransactionLocal()


setAOPManager

private void setAOPManager(AOPManager aopManager)

Parameters:
aopManager

setMethodInjector

private void setMethodInjector(MethodInjector methodInjector)

Parameters:
methodInjector

setSystem

private void setSystem(any System)

Overrides:
setSystem in class AbstractBaseObservable
Parameters:
System

setTransactionAdviceBuilder

private void setTransactionAdviceBuilder(TransactionAdviceBuilder transactionAdviceBuilder)

Parameters:
transactionAdviceBuilder

setTransactionEventPool

private void setTransactionEventPool(TransactionEventPool transactionEventPool)

Parameters:
transactionEventPool

setTransactionLocal

private void setTransactionLocal(any transactionLocal)

Parameters:
transactionLocal

Transfer version 1.1