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

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


org.jboss.tm.usertx.server
Class UserTransactionSessionImpl

java.lang.Object
  extended byorg.jboss.tm.usertx.server.UserTransactionSessionImpl
All Implemented Interfaces:
Remote, UserTransactionSession

public class UserTransactionSessionImpl
extends Object
implements UserTransactionSession

A UserTransaction session implementation. It handles transactions on behalf of a single client.

Version:
$Revision: 1.11 $
Author:
Ole Husgaard, Scott.Stark@jboss.org

Constructor Summary
UserTransactionSessionImpl()
           
 
Method Summary
 Object begin(int timeout)
          Start a new transaction, and return its TPC.
 void commit(Object tpc)
          Commit the transaction.
 void destroy()
          Destroy this session.
static UserTransactionSession getInstance()
           
 int getStatus(Object tpc)
          Return status of the transaction.
protected static org.jboss.tm.TransactionPropagationContextFactory getTPCFactory()
          Get a reference to the TPC Factory
protected static TransactionManager getTransactionManager()
          Get a reference to the transaction manager.
 void rollback(Object tpc)
          Rollback the transaction.
 void setRollbackOnly(Object tpc)
          Mark the transaction for rollback only.
 void unreferenced()
          When no longer referenced, be sure to rollback any transactions that are still active.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserTransactionSessionImpl

public UserTransactionSessionImpl()
Method Detail

getInstance

public static UserTransactionSession getInstance()

getTransactionManager

protected static TransactionManager getTransactionManager()
Get a reference to the transaction manager.


getTPCFactory

protected static org.jboss.tm.TransactionPropagationContextFactory getTPCFactory()
Get a reference to the TPC Factory


destroy

public void destroy()
             throws RemoteException
Destroy this session.

Specified by:
destroy in interface UserTransactionSession
Throws:
RemoteException

begin

public Object begin(int timeout)
             throws RemoteException,
                    NotSupportedException,
                    SystemException
Start a new transaction, and return its TPC.

Specified by:
begin in interface UserTransactionSession
Parameters:
timeout - The timeout value for the new transaction, in seconds.
Returns:
The transaction propagation context for the new transaction.
Throws:
RemoteException
NotSupportedException
SystemException

commit

public void commit(Object tpc)
            throws RemoteException,
                   RollbackException,
                   HeuristicMixedException,
                   HeuristicRollbackException,
                   SecurityException,
                   IllegalStateException,
                   SystemException
Commit the transaction.

Specified by:
commit in interface UserTransactionSession
Parameters:
tpc - The transaction propagation context for the transaction.
Throws:
RemoteException
RollbackException
HeuristicMixedException
HeuristicRollbackException
SecurityException
IllegalStateException
SystemException

rollback

public void rollback(Object tpc)
              throws RemoteException,
                     SecurityException,
                     IllegalStateException,
                     SystemException
Rollback the transaction.

Specified by:
rollback in interface UserTransactionSession
Parameters:
tpc - The transaction propagation context for the transaction.
Throws:
RemoteException
SecurityException
IllegalStateException
SystemException

setRollbackOnly

public void setRollbackOnly(Object tpc)
                     throws RemoteException,
                            IllegalStateException,
                            SystemException
Mark the transaction for rollback only.

Specified by:
setRollbackOnly in interface UserTransactionSession
Parameters:
tpc - The transaction propagation context for the transaction.
Throws:
RemoteException
IllegalStateException
SystemException

getStatus

public int getStatus(Object tpc)
              throws RemoteException,
                     SystemException
Return status of the transaction.

Specified by:
getStatus in interface UserTransactionSession
Parameters:
tpc - The transaction propagation context for the transaction.
Throws:
RemoteException
SystemException

unreferenced

public void unreferenced()
When no longer referenced, be sure to rollback any transactions that are still active.



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