org.jboss.tm.usertx.client
Class ClientUserTransaction
java.lang.Object
|
+--org.jboss.tm.usertx.client.ClientUserTransaction
- All Implemented Interfaces:
- javax.naming.Referenceable, java.io.Serializable, TransactionPropagationContextFactory, javax.transaction.UserTransaction
- public class ClientUserTransaction
- extends java.lang.Object
- implements javax.transaction.UserTransaction, TransactionPropagationContextFactory, javax.naming.Referenceable, java.io.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.1.4.1 $
- Author:
- Ole Husgaard
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getSingleton
public static ClientUserTransaction getSingleton()
- Return a reference to the singleton instance.
begin
public void begin()
throws javax.transaction.NotSupportedException,
javax.transaction.SystemException
- Specified by:
begin
in interface javax.transaction.UserTransaction
commit
public void commit()
throws javax.transaction.RollbackException,
javax.transaction.HeuristicMixedException,
javax.transaction.HeuristicRollbackException,
java.lang.SecurityException,
java.lang.IllegalStateException,
javax.transaction.SystemException
- Specified by:
commit
in interface javax.transaction.UserTransaction
rollback
public void rollback()
throws java.lang.SecurityException,
java.lang.IllegalStateException,
javax.transaction.SystemException
- Specified by:
rollback
in interface javax.transaction.UserTransaction
setRollbackOnly
public void setRollbackOnly()
throws java.lang.IllegalStateException,
javax.transaction.SystemException
- Specified by:
setRollbackOnly
in interface javax.transaction.UserTransaction
getStatus
public int getStatus()
throws javax.transaction.SystemException
- Specified by:
getStatus
in interface javax.transaction.UserTransaction
setTransactionTimeout
public void setTransactionTimeout(int seconds)
throws javax.transaction.SystemException
- Specified by:
setTransactionTimeout
in interface javax.transaction.UserTransaction
getTransactionPropagationContext
public java.lang.Object getTransactionPropagationContext()
- Description copied from interface:
TransactionPropagationContextFactory
- Return a transaction propagation context for the transaction
currently associated with the invoking thread, or
null
if the invoking thread is not associated with a transaction.
- Specified by:
getTransactionPropagationContext
in interface TransactionPropagationContextFactory
getTransactionPropagationContext
public java.lang.Object getTransactionPropagationContext(javax.transaction.Transaction tx)
- Description copied from interface:
TransactionPropagationContextFactory
- Return a transaction propagation context for the transaction
given as an argument, or
null
if the argument is null
or of a type unknown to
this factory.
- Specified by:
getTransactionPropagationContext
in interface TransactionPropagationContextFactory
getReference
public javax.naming.Reference getReference()
throws javax.naming.NamingException
- Specified by:
getReference
in interface javax.naming.Referenceable
Copyright © 2000 The JBoss Organization. All Rights Reserved.