站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 server API Documentation 英文版文档

ClientUserTransaction (JBoss Server API) - JBoss 4.0.1 sp1 server API Documentation 英文版文档


org.jboss.tm.usertx.client
Class ClientUserTransaction

java.lang.Object
  extended byorg.jboss.tm.usertx.client.ClientUserTransaction
All Implemented Interfaces:
Referenceable, Serializable, org.jboss.tm.TransactionPropagationContextFactory, UserTransaction

public class ClientUserTransaction
extends Object
implements UserTransaction, org.jboss.tm.TransactionPropagationContextFactory, Referenceable, Serializable

The client-side UserTransaction implementation. This will delegate all UserTransaction calls to the server. Warning: This is only for stand-alone clients that do not have their own transaction service. No local work is done in the context of transactions started here, only work done in beans at the server. Instantiating objects of this class outside the server will change the JRMP GenericProxy so that outgoing calls use the propagation contexts of the transactions started here.

Version:
$Revision: 1.8 $
Author:
Ole Husgaard
See Also:
Serialized Form

Method Summary
 void begin()
           
 void commit()
           
 Reference getReference()
           
static ClientUserTransaction getSingleton()
          Return a reference to the singleton instance.
 int getStatus()
           
 Object getTransactionPropagationContext()
           
 Object getTransactionPropagationContext(Transaction tx)
           
 void rollback()
           
 void setRollbackOnly()
           
 void setTransactionTimeout(int seconds)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getSingleton

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


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

getTransactionPropagationContext

public Object getTransactionPropagationContext()
Specified by:
getTransactionPropagationContext in interface org.jboss.tm.TransactionPropagationContextFactory

getTransactionPropagationContext

public Object getTransactionPropagationContext(Transaction tx)
Specified by:
getTransactionPropagationContext in interface org.jboss.tm.TransactionPropagationContextFactory

getReference

public Reference getReference()
                       throws NamingException
Specified by:
getReference in interface Referenceable
Throws:
NamingException


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.