org.apache.openjpa.ee
Class RegistryManagedRuntime.TransactionManagerRegistryFacade

java.lang.Object
  extended by org.apache.openjpa.ee.RegistryManagedRuntime.TransactionManagerRegistryFacade
Enclosing class:
RegistryManagedRuntime

public static class RegistryManagedRuntime.TransactionManagerRegistryFacade
extends Object

A TransactionManager and Transaction facade that delegates the appropriate methods to the internally-held TransactionSynchronizationRegistry. Since the registry is not able to start or end transactions, all transaction control methods will just throw a SystemException.

Author:
Marc Prud'hommeaux

Constructor Summary
RegistryManagedRuntime.TransactionManagerRegistryFacade(TransactionSynchronizationRegistry registry)
           
 
Method Summary
 void begin()
           
 void commit()
           
 boolean delistResource(XAResource xaRes, int flag)
           
 boolean enlistResource(XAResource xaRes)
           
 int getStatus()
           
 Transaction getTransaction()
           
 Object getTransactionKey()
           
 void registerSynchronization(Synchronization sync)
           
 void resume(Transaction tobj)
           
 void rollback()
           
 void setRollbackOnly()
           
 void setTransactionTimeout(int seconds)
           
 Transaction suspend()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegistryManagedRuntime.TransactionManagerRegistryFacade

public RegistryManagedRuntime.TransactionManagerRegistryFacade(TransactionSynchronizationRegistry registry)
Method Detail

getTransaction

public Transaction getTransaction()
                           throws SystemException
Throws:
SystemException

registerSynchronization

public void registerSynchronization(Synchronization sync)
                             throws RollbackException,
                                    IllegalStateException,
                                    SystemException
Throws:
RollbackException
IllegalStateException
SystemException

setRollbackOnly

public void setRollbackOnly()
                     throws IllegalStateException,
                            SystemException
Throws:
IllegalStateException
SystemException

getStatus

public int getStatus()
              throws SystemException
Throws:
SystemException

getTransactionKey

public Object getTransactionKey()

begin

public void begin()
           throws NotSupportedException,
                  SystemException
Throws:
NotSupportedException
SystemException

commit

public void commit()
            throws RollbackException,
                   HeuristicMixedException,
                   SystemException,
                   HeuristicRollbackException,
                   SecurityException,
                   IllegalStateException
Throws:
RollbackException
HeuristicMixedException
SystemException
HeuristicRollbackException
SecurityException
IllegalStateException

resume

public void resume(Transaction tobj)
            throws InvalidTransactionException,
                   IllegalStateException,
                   SystemException
Throws:
InvalidTransactionException
IllegalStateException
SystemException

rollback

public void rollback()
              throws IllegalStateException,
                     SecurityException,
                     SystemException
Throws:
IllegalStateException
SecurityException
SystemException

setTransactionTimeout

public void setTransactionTimeout(int seconds)
                           throws SystemException
Throws:
SystemException

suspend

public Transaction suspend()
                    throws SystemException
Throws:
SystemException

delistResource

public boolean delistResource(XAResource xaRes,
                              int flag)
                       throws IllegalStateException,
                              SystemException
Throws:
IllegalStateException
SystemException

enlistResource

public boolean enlistResource(XAResource xaRes)
                       throws RollbackException,
                              IllegalStateException,
                              SystemException
Throws:
RollbackException
IllegalStateException
SystemException


Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.