org.objectweb.jac.aspects.transaction
Class TransactionAC.TransactionWrapper
java.lang.Object
org.objectweb.jac.core.Wrapper
org.objectweb.jac.aspects.transaction.TransactionAC.TransactionWrapper
- All Implemented Interfaces:
- Advice, ConstructorInterceptor, Interceptor, MethodInterceptor, Serializable
- Enclosing class:
- TransactionAC
- public class TransactionAC.TransactionWrapper
- extends Wrapper
This wrapper defines the transaction wrapper.
It defines a wrapping method that starts a transaction when a
method is called and that commits it when the method returns
normally.
Within the transaction, the cloning and the dispatching is
ensured by an external
DispatchTransactionWrapper
.
- See Also:
DispatchTransactionWrapper
,
Serialized Form
Fields inherited from class org.objectweb.jac.core.Wrapper |
ac, cr |
TransactionAC.TransactionWrapper
public TransactionAC.TransactionWrapper(AspectComponent ac)
handleTransaction
public Object handleTransaction(Interaction interaction)
- This wrapping method wraps a transactional method.
beginOfTransaction
public void beginOfTransaction(Interaction interaction)
- Initializes the transaction.
endOfTransaction
public void endOfTransaction(Interaction interaction)
- Ends the transaction (when success).
catchException
public void catchException(Interaction interaction,
Exception e)
throws Exception
- Handles an exception within a transaction (rollback).
- Throws:
Exception
invoke
public Object invoke(MethodInvocation invocation)
throws Throwable
- Specified by:
invoke
in interface MethodInterceptor
- Overrides:
invoke
in class Wrapper
- Throws:
Throwable
construct
public Object construct(ConstructorInvocation invocation)
throws Throwable
- Specified by:
construct
in interface ConstructorInterceptor
- Overrides:
construct
in class Wrapper
- Throws:
Throwable