|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atomikos.icatch.jta.RemoteClientUserTransaction
public final class RemoteClientUserTransaction
An implementation of a (remote) client's user transaction. When
client-demarcated transactions are enabled, this is the kind of
UserTransaction you get by calling getUserTransaction() on the
UserTransactionService. Client applications can use the result to control
transaction demarcation, and even pass their instance to other VMs so that
those can share the same transaction context. The server-side applications
can use the toString() method to obtain the transaction identifier of the
transaction represented by an instance. This way, an incoming call from a
client that demarcates its own transactions only has to ship the
UserTransaction to the server (or to other clients) to identify what
transaction it is in.
NOTE: remote clients that use instances of this class can do transaction
demarcation, but they can not do nested transactions!
NOTE: instances that are meant to be bound in JNDI should be bound without
any transaction context (i.e., without calling begin() first).
Constructor Summary | |
---|---|
RemoteClientUserTransaction()
No-argument constructor, as required by Externalizable interface. |
|
RemoteClientUserTransaction(String name,
String initialContextFactory,
String providerUrl)
Preferred constructor. |
Method Summary | |
---|---|
void |
begin()
|
void |
commit()
|
Reference |
getReference()
|
int |
getStatus()
|
void |
readExternal(ObjectInput in)
|
void |
rollback()
|
void |
setRollbackOnly()
|
void |
setTransactionTimeout(int seconds)
|
String |
toString()
Overrides the default behaviour, to allow retrieving the corresponding transaction at the server side. |
void |
writeExternal(ObjectOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RemoteClientUserTransaction()
public RemoteClientUserTransaction(String name, String initialContextFactory, String providerUrl)
name
- The unique name of the UserTransactionServer.initialContextFactory
- The initial context factory of the server JNDI
context.providerUrl
- The provider URL of the server JNDI context.Method Detail |
---|
public void begin() throws NotSupportedException, SystemException
begin
in interface UserTransaction
NotSupportedException
SystemException
UserTransaction
public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SystemException, IllegalStateException, SecurityException
commit
in interface UserTransaction
RollbackException
HeuristicMixedException
HeuristicRollbackException
SystemException
IllegalStateException
SecurityException
UserTransaction
public void rollback() throws IllegalStateException, SystemException, SecurityException
rollback
in interface UserTransaction
IllegalStateException
SystemException
SecurityException
UserTransaction
public void setRollbackOnly() throws IllegalStateException, SystemException
setRollbackOnly
in interface UserTransaction
IllegalStateException
SystemException
UserTransaction
public int getStatus() throws SystemException
getStatus
in interface UserTransaction
SystemException
UserTransaction
public void setTransactionTimeout(int seconds) throws SystemException
setTransactionTimeout
in interface UserTransaction
SystemException
UserTransaction
public String toString()
toString
in class Object
public Reference getReference() throws NamingException
getReference
in interface Referenceable
NamingException
Referenceable
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
Externalizable
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
Externalizable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |