org.apache.felix.ipojo.transaction
Class TransactionHandler
java.lang.Object
org.apache.felix.ipojo.Handler
org.apache.felix.ipojo.PrimitiveHandler
org.apache.felix.ipojo.transaction.TransactionHandler
- All Implemented Interfaces:
- Synchronization, ConstructorInjector, FieldInterceptor, MethodInterceptor
public class TransactionHandler
- extends PrimitiveHandler
- implements Synchronization
Methods inherited from class org.apache.felix.ipojo.PrimitiveHandler |
attach, getConstructorParameter, getConstructorParameterType, getFactory, getHandler, getInstanceManager, getLogger, getPojoMetadata, onCreation, onEntry, onError, onExit, onFinally, onSet, setFactory |
Methods inherited from class org.apache.felix.ipojo.Handler |
debug, error, error, getDescription, getHandlerManager, getValidity, info, initializeComponentFactory, isValid, reconfigure, setValidity, warn, warn |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NAMESPACE
public static final String NAMESPACE
- See Also:
- Constant Field Values
NAME
public static final String NAME
- See Also:
- Constant Field Values
DEFAULT_PROPAGATION
public static final int DEFAULT_PROPAGATION
- See Also:
- Constant Field Values
TransactionHandler
public TransactionHandler()
configure
public void configure(Element arg0,
Dictionary arg1)
throws ConfigurationException
- Description copied from class:
Handler
- Configures the handler.
- Specified by:
configure
in class Handler
- Parameters:
arg0
- the metadata of the componentarg1
- the instance configuration
- Throws:
ConfigurationException
- if the metadata are not correct.
start
public void start()
- Description copied from class:
Handler
- Starts the handler
This method starts the management.
- Specified by:
start
in class Handler
stop
public void stop()
- Description copied from class:
Handler
- Stops the handler
This method stops the management.
- Specified by:
stop
in class Handler
bind
public void bind(TransactionManager tm)
unbind
public void unbind(TransactionManager tm)
transactionRolledback
public void transactionRolledback(Transaction t)
transactionCommitted
public void transactionCommitted(Transaction t)
stateChanged
public void stateChanged(int newState)
- Description copied from class:
Handler
- This method is called when the component state changed.
By default, this method does nothing.
- Overrides:
stateChanged
in class Handler
- Parameters:
newState
- the new instance state ComponentInstance
onGet
public Object onGet(Object pojo,
String fieldName,
Object value)
- Description copied from class:
PrimitiveHandler
- Callback method called when a managed field
asks for a value.
The default implementation returned the previously
injected value.
- Specified by:
onGet
in interface FieldInterceptor
- Overrides:
onGet
in class PrimitiveHandler
- Parameters:
pojo
- the pojo object requiring the valuefieldName
- the field namevalue
- the value passed to the field (by the previous call)
- Returns:
- the value to inject, of the previous value if the handler
don't want to inject a value.
- See Also:
FieldInterceptor.onGet(Object, String, Object)
afterCompletion
public void afterCompletion(int arg0)
- Specified by:
afterCompletion
in interface Synchronization
beforeCompletion
public void beforeCompletion()
- Specified by:
beforeCompletion
in interface Synchronization
addTransaction
public void addTransaction(Transaction transaction)
getTransactions
public getTransactions()
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.