org.objectweb.jac.aspects.transaction
Class DispatchTransactionWrapper
java.lang.Object
org.objectweb.jac.core.Wrapper
org.objectweb.jac.aspects.transaction.DispatchTransactionWrapper
- All Implemented Interfaces:
- Advice, ConstructorInterceptor, Interceptor, MethodInterceptor, Serializable
- public class DispatchTransactionWrapper
- extends Wrapper
This wrapper wraps all JAC objects that can be part of a
transaction in order to dispatch the transactions to local clones
and to commit them.
- See Also:
- Serialized Form
Fields inherited from class org.objectweb.jac.core.Wrapper |
ac, cr |
DispatchTransactionWrapper
public DispatchTransactionWrapper(AspectComponent ac)
dispatch
public Object dispatch(Interaction interaction)
- Dispatches a call on a wrappee transaction-clone depending on
the current transaction if any (if not, it performs a regular
call).
commit
public void commit(Wrappee wrappee,
Integer transactionId)
throws Exception
- Commits the transaction on the wrappee (role method).
This method copies the transaction-clone state to the
original object.
- Parameters:
transactionId
- the transaction to be commited
- Throws:
Exception
rollback
public void rollback(Wrappee wrappee,
Integer transactionId)
- Rollbacks the transaction on the wrappee (role method).
- Parameters:
transactionId
- the transaction to be rollbacked
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