org.apache.felix.ipojo.transaction
Class TransactionnalMethod
java.lang.Object
org.apache.felix.ipojo.transaction.TransactionnalMethod
- All Implemented Interfaces:
- MethodInterceptor
public class TransactionnalMethod
- extends Object
- implements MethodInterceptor
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
REQUIRES
public static final int REQUIRES
- See Also:
- Constant Field Values
REQUIRES_NEW
public static final int REQUIRES_NEW
- See Also:
- Constant Field Values
MANDATORY
public static final int MANDATORY
- See Also:
- Constant Field Values
SUPPORTED
public static final int SUPPORTED
- See Also:
- Constant Field Values
NOT_SUPPORTED
public static final int NOT_SUPPORTED
- See Also:
- Constant Field Values
NEVER
public static final int NEVER
- See Also:
- Constant Field Values
TransactionnalMethod
public TransactionnalMethod(String method,
int propagation,
int timeout,
exception,
boolean exceptionOnRollback,
TransactionHandler handler)
setTransactionManager
public void setTransactionManager(TransactionManager tm)
onEntry
public void onEntry()
throws SystemException,
NotSupportedException
- Throws:
SystemException
NotSupportedException
onExit
public void onExit()
throws SecurityException,
HeuristicMixedException,
HeuristicRollbackException,
SystemException,
InvalidTransactionException,
IllegalStateException
- Throws:
SecurityException
HeuristicMixedException
HeuristicRollbackException
SystemException
InvalidTransactionException
IllegalStateException
onError
public void onError(String exception)
throws SystemException
- Throws:
SystemException
onEntry
public void onEntry(Object arg0,
Method arg1,
Object[] arg2)
- Description copied from interface:
MethodInterceptor
- This method is called when a thread enters in a method.
The given argument array is created from the method argument.
- Specified by:
onEntry
in interface MethodInterceptor
- Parameters:
arg0
- the pojo on which the method is called.arg1
- the invoked method.arg2
- the arguments array.
onError
public void onError(Object arg0,
Method arg1,
Throwable arg2)
- Description copied from interface:
MethodInterceptor
- This method is called when the execution throws an exception in the given
method.
- Specified by:
onError
in interface MethodInterceptor
- Parameters:
arg0
- the pojo on which the method was accessed.arg1
- the invoked method.arg2
- the thrown exception
onExit
public void onExit(Object arg0,
Method arg1,
Object arg2)
- Description copied from interface:
MethodInterceptor
- This method is called when the execution exits a method :
before a
return
.
If the given returned object is null
, either the method is
void
, or it returns null
.
This method must not modify the returned object.
- Specified by:
onExit
in interface MethodInterceptor
- Parameters:
arg0
- the pojo on which the method exits.arg1
- the exiting method.arg2
- the the returned object (boxed for primitive type)
onFinally
public void onFinally(Object arg0,
Method arg1)
- Description copied from interface:
MethodInterceptor
- This method is called when the execution of a method is going to terminate :
just before to throw an exception or before to return.
(onError or onExit was already called).
- Specified by:
onFinally
in interface MethodInterceptor
- Parameters:
arg0
- the pojo on which the method was accessed.arg1
- the invoked method.
rollbackOwnedTransactions
public void rollbackOwnedTransactions()
Copyright © 2011 Apache Software Foundation. All Rights Reserved.