org.smartcomps.twister.common.transaction
Class TransactionManager

java.lang.Object
  |
  +--org.smartcomps.twister.common.transaction.TransactionManager
All Implemented Interfaces:
LifecycleAwareResource

public class TransactionManager
extends java.lang.Object
implements LifecycleAwareResource

The TransactionManager manages TransactionalResource implementations and tries to apply (if possible) an all or nothing policy with those resources.

See Also:
TransactionException, TransactionalResource

Field Summary
static java.util.Collection resources
           
 
Constructor Summary
TransactionManager()
           
 
Method Summary
static void beginTransaction()
           
static void commitTransaction()
           
 void create()
           
 void destroy()
           
static boolean hasTransaction()
           
static void rollbackTransaction()
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resources

public static java.util.Collection resources
Constructor Detail

TransactionManager

public TransactionManager()
Method Detail

create

public void create()
            throws LifecycleException
Specified by:
create in interface LifecycleAwareResource
LifecycleException

start

public void start()
           throws LifecycleException
Specified by:
start in interface LifecycleAwareResource
LifecycleException

destroy

public void destroy()
             throws LifecycleException
Specified by:
destroy in interface LifecycleAwareResource
LifecycleException

stop

public void stop()
          throws LifecycleException
Specified by:
stop in interface LifecycleAwareResource
LifecycleException

beginTransaction

public static void beginTransaction()
                             throws TransactionException
TransactionException

commitTransaction

public static void commitTransaction()
                              throws TransactionException
TransactionException

rollbackTransaction

public static void rollbackTransaction()
                                throws TransactionException
TransactionException

hasTransaction

public static boolean hasTransaction()


Copyright © 2003 SmartComps. All Rights Reserved.