org.datanucleus.transaction
Class TransactionManager

java.lang.Object
  extended by org.datanucleus.transaction.TransactionManager

public class TransactionManager
extends java.lang.Object

TransactionManager is facade for creating (Open/XA) transactions A cache of transactions is held per userObject


Constructor Summary
TransactionManager()
           
 
Method Summary
 void begin(java.lang.Object om)
          Begin a new transaction
 void commit(java.lang.Object om)
           
 Transaction getTransaction(java.lang.Object om)
           
 TransactionRuntime getTransactionRuntime()
           
 void registerMbean(java.lang.String domainName, java.lang.String instanceName, ManagementServer mgmtServer)
          Register TransactionManager MBeans in ManagementServer
 void resume(java.lang.Object om, Transaction tx)
           
 void rollback(java.lang.Object om)
           
 void setContainerManagedConnections(boolean flag)
           
 void setRollbackOnly(java.lang.Object om)
           
 void setTransactionTimeout(java.lang.Object om, int millis)
           
 Transaction suspend(java.lang.Object om)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionManager

public TransactionManager()
Method Detail

setContainerManagedConnections

public void setContainerManagedConnections(boolean flag)

registerMbean

public void registerMbean(java.lang.String domainName,
                          java.lang.String instanceName,
                          ManagementServer mgmtServer)
Register TransactionManager MBeans in ManagementServer

Parameters:
domainName - Domain name
instanceName - Instance name
mgmtServer - JMX server

getTransactionRuntime

public TransactionRuntime getTransactionRuntime()

begin

public void begin(java.lang.Object om)
Begin a new transaction

Parameters:
om - the user object (an user reference) associated to this transaction
Throws:
NucleusTransactionException - if there is already a Transaction associated to this user object

commit

public void commit(java.lang.Object om)

getTransaction

public Transaction getTransaction(java.lang.Object om)

resume

public void resume(java.lang.Object om,
                   Transaction tx)

rollback

public void rollback(java.lang.Object om)

setRollbackOnly

public void setRollbackOnly(java.lang.Object om)

setTransactionTimeout

public void setTransactionTimeout(java.lang.Object om,
                                  int millis)

suspend

public Transaction suspend(java.lang.Object om)


Copyright © 2009. All Rights Reserved.