stomp.service.tx
Class TransactionServiceLayer

java.lang.Object
  |
  +--stomp.service.tx.TransactionServiceLayer
All Implemented Interfaces:
java.lang.reflect.InvocationHandler, java.io.Serializable

public class TransactionServiceLayer
extends java.lang.Object
implements java.lang.reflect.InvocationHandler, java.io.Serializable

Proxy that provides wrapping services to JDO objects. These services might include starting and ending transactions, making an object remote, making an object read-only, exception handling, etc etc.

Author:
Eric Lindauer
See Also:
Serialized Form

Constructor Summary
TransactionServiceLayer(ServiceEnabled object)
           
 
Method Summary
 java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method m, java.lang.Object[] args)
          provides any services this request requires, then passes the method on to the wrapped object for further handling.
protected  java.lang.Object invokeTransactional(java.lang.Object proxy, java.lang.reflect.Method m, java.lang.Object[] args)
          starts or continues a transaction, registers all arguments with that transaction, then passes the method call through to the transactional version of the wrapped object.
static boolean maybeTransactional(java.lang.reflect.Method m)
           
static ServiceEnabled newInstance(ServiceEnabled object)
           
static ServiceEnabled newInstance(ServiceEnabled object, java.lang.Class[] interfaces)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionServiceLayer

public TransactionServiceLayer(ServiceEnabled object)
Method Detail

invoke

public java.lang.Object invoke(java.lang.Object proxy,
                               java.lang.reflect.Method m,
                               java.lang.Object[] args)
                        throws java.lang.Throwable
provides any services this request requires, then passes the method on to the wrapped object for further handling.

Specified by:
invoke in interface java.lang.reflect.InvocationHandler
java.lang.Throwable

newInstance

public static ServiceEnabled newInstance(ServiceEnabled object)

newInstance

public static ServiceEnabled newInstance(ServiceEnabled object,
                                         java.lang.Class[] interfaces)

maybeTransactional

public static boolean maybeTransactional(java.lang.reflect.Method m)

invokeTransactional

protected java.lang.Object invokeTransactional(java.lang.Object proxy,
                                               java.lang.reflect.Method m,
                                               java.lang.Object[] args)
                                        throws java.lang.Throwable
starts or continues a transaction, registers all arguments with that transaction, then passes the method call through to the transactional version of the wrapped object. if the object wrapped by this is DBImmutable, this method throws an UnsupporedOperationException, explaining that once persisted, this object cannot be changed.

java.lang.Throwable