org.apache.felix.ipojo.transaction
Class TransactionHandler

java.lang.Object
  extended by org.apache.felix.ipojo.Handler
      extended by org.apache.felix.ipojo.PrimitiveHandler
          extended by org.apache.felix.ipojo.transaction.TransactionHandler
All Implemented Interfaces:
Synchronization, ConstructorInjector, FieldInterceptor, MethodInterceptor

public class TransactionHandler
extends PrimitiveHandler
implements Synchronization


Field Summary
static int DEFAULT_PROPAGATION
           
static String NAME
           
static String NAMESPACE
           
 
Fields inherited from class org.apache.felix.ipojo.PrimitiveHandler
HANDLER_TYPE
 
Fields inherited from class org.apache.felix.ipojo.Handler
HANDLER_LEVEL_PROPERTY, HANDLER_NAME_PROPERTY, HANDLER_NAMESPACE_PROPERTY, HANDLER_TYPE_PROPERTY, m_instance, m_isValid
 
Constructor Summary
TransactionHandler()
           
 
Method Summary
 void addTransaction(Transaction transaction)
           
 void afterCompletion(int arg0)
           
 void beforeCompletion()
           
 void bind(TransactionManager tm)
           
 void configure(Element arg0, Dictionary arg1)
          Configures the handler.
  getTransactions()
           
 Object onGet(Object pojo, String fieldName, Object value)
          Callback method called when a managed field asks for a value.
 void start()
          Starts the handler This method starts the management.
 void stateChanged(int newState)
          This method is called when the component state changed.
 void stop()
          Stops the handler This method stops the management.
 void transactionCommitted(Transaction t)
           
 void transactionRolledback(Transaction t)
           
 void unbind(TransactionManager tm)
           
 
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
 

Field Detail

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
Constructor Detail

TransactionHandler

public TransactionHandler()
Method Detail

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 component
arg1 - 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 value
fieldName - the field name
value - 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 © 2011 Apache Software Foundation. All Rights Reserved.