org.jboss.tm.usertx.client
Class ServerVMClientUserTransaction

java.lang.Object
  extended by org.jboss.tm.usertx.client.ServerVMClientUserTransaction
All Implemented Interfaces:
UserTransaction, UserTransactionProvider

public class ServerVMClientUserTransaction
extends Object
implements UserTransaction, UserTransactionProvider

The client-side UserTransaction implementation for clients operating in the same VM as the server. This will delegate all UserTransaction calls to the TransactionManager of the server.

Version:
$Revision: 37459 $
Author:
Ole Husgaard, adrian@jboss.org, Galder Zamarreno

Nested Class Summary
static interface ServerVMClientUserTransaction.UserTransactionStartedListener
          Deprecated. 
 
Constructor Summary
ServerVMClientUserTransaction(TransactionManager tm)
           
 
Method Summary
 void begin()
           
 void commit()
           
static ServerVMClientUserTransaction getSingleton()
          Return a reference to the singleton instance.
 int getStatus()
           
 boolean isServer()
           
 void registerTxStartedListener(ServerVMClientUserTransaction.UserTransactionStartedListener txStartedListener)
           
 void rollback()
           
 void setRollbackOnly()
           
 void setTransactionRegistry(UserTransactionRegistry registry)
          Set the user transaction registry
 void setTransactionTimeout(int seconds)
           
 void unregisterTxStartedListener(ServerVMClientUserTransaction.UserTransactionStartedListener txStartedListener)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerVMClientUserTransaction

public ServerVMClientUserTransaction(TransactionManager tm)
Method Detail

getSingleton

public static ServerVMClientUserTransaction getSingleton()
Return a reference to the singleton instance.

Returns:
the singleton

isServer

public boolean isServer()

registerTxStartedListener

public void registerTxStartedListener(ServerVMClientUserTransaction.UserTransactionStartedListener txStartedListener)

unregisterTxStartedListener

public void unregisterTxStartedListener(ServerVMClientUserTransaction.UserTransactionStartedListener txStartedListener)

setTransactionRegistry

public void setTransactionRegistry(UserTransactionRegistry registry)
Description copied from interface: UserTransactionProvider
Set the user transaction registry

Specified by:
setTransactionRegistry in interface UserTransactionProvider
Parameters:
registry - the registry

begin

public void begin()
           throws NotSupportedException,
                  SystemException
Specified by:
begin in interface UserTransaction
Throws:
NotSupportedException
SystemException

commit

public void commit()
            throws RollbackException,
                   HeuristicMixedException,
                   HeuristicRollbackException,
                   SecurityException,
                   IllegalStateException,
                   SystemException
Specified by:
commit in interface UserTransaction
Throws:
RollbackException
HeuristicMixedException
HeuristicRollbackException
SecurityException
IllegalStateException
SystemException

rollback

public void rollback()
              throws SecurityException,
                     IllegalStateException,
                     SystemException
Specified by:
rollback in interface UserTransaction
Throws:
SecurityException
IllegalStateException
SystemException

setRollbackOnly

public void setRollbackOnly()
                     throws IllegalStateException,
                            SystemException
Specified by:
setRollbackOnly in interface UserTransaction
Throws:
IllegalStateException
SystemException

getStatus

public int getStatus()
              throws SystemException
Specified by:
getStatus in interface UserTransaction
Throws:
SystemException

setTransactionTimeout

public void setTransactionTimeout(int seconds)
                           throws SystemException
Specified by:
setTransactionTimeout in interface UserTransaction
Throws:
SystemException


Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.