public class TransactionImple extends Object implements Transaction, Transaction
Modifier and Type | Field and Description |
---|---|
protected AtomicAction |
_theTransaction |
protected static XAResourceRecordWrappingPlugin |
_xaResourceRecordWrappingPlugin |
XACONNECTION, XAMODIFIER
Modifier | Constructor and Description |
---|---|
protected |
TransactionImple() |
protected |
TransactionImple(BasicAction curr)
Create a new TransactionImple representation of a specified transaction.
|
|
TransactionImple(int timeout)
Create a new transaction with the specified timeout.
|
Modifier and Type | Method and Description |
---|---|
protected Xid |
baseXid()
If this is an imported transaction (via JCA) then this will be the Xid we
are pretending to be.
|
void |
commit()
We should never throw a HeuristicRollbackException because if we get a
HeuristicRollback from a resource, and can successfully rollback the
other resources, this is then the same as having simply been forced to
rollback the transaction during phase 1.
|
protected void |
commitAndDisassociate()
Does the same as commit, but also changes the thread-to-tx association.
|
protected Xid |
createXid(boolean branch,
XAModifier theModifier,
XAResource xaResource) |
boolean |
delistResource(XAResource xaRes,
int flags) |
protected boolean |
endSuspendedRMs()
If there are any suspended RMs then we should call end on them before the
transaction is terminated.
|
boolean |
enlistResource(XAResource xaRes)
This is the JTA compliant version of the method.
|
boolean |
enlistResource(XAResource xaRes,
Object[] params) |
boolean |
equals(Object obj)
Overloads Object.equals()
|
Uid |
get_uid() |
long |
getRemainingTimeoutMills() |
Map<XAResource,TxInfo> |
getResources() |
int |
getStatus() |
Map<Uid,String> |
getSynchronizations() |
int |
getTimeout() |
static TransactionImple |
getTransaction() |
static TransactionImple |
getTransaction(Uid id) |
static Map<Uid,Transaction> |
getTransactions() |
Xid |
getTxId() |
Object |
getTxLocalResource(Object key) |
int |
getXAResourceState(XAResource xaRes) |
int |
hashCode()
Return -1 if we fail.
|
boolean |
isAlive() |
protected static void |
putTransaction(TransactionImple tx) |
void |
putTxLocalResource(Object key,
Object value) |
void |
registerSynchronization(Synchronization sync) |
protected static void |
removeTransaction(TransactionImple tx) |
void |
rollback() |
protected void |
rollbackAndDisassociate()
Does the same as rollback, but also changes the thread-to-tx association.
|
void |
setRollbackOnly() |
String |
toString() |
protected AtomicAction _theTransaction
protected static final XAResourceRecordWrappingPlugin _xaResourceRecordWrappingPlugin
public TransactionImple(int timeout)
protected TransactionImple()
protected TransactionImple(BasicAction curr)
public boolean equals(Object obj)
public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, SystemException, IllegalStateException
commit
in interface Transaction
RollbackException
HeuristicMixedException
HeuristicRollbackException
SecurityException
SystemException
IllegalStateException
public void rollback() throws IllegalStateException, SecurityException, SystemException
rollback
in interface Transaction
IllegalStateException
SecurityException
SystemException
public void setRollbackOnly() throws IllegalStateException, SystemException
setRollbackOnly
in interface Transaction
IllegalStateException
SystemException
public int getStatus() throws SystemException
getStatus
in interface Transaction
SystemException
public void registerSynchronization(Synchronization sync) throws RollbackException, IllegalStateException, SystemException
registerSynchronization
in interface Transaction
RollbackException
IllegalStateException
SystemException
public boolean enlistResource(XAResource xaRes) throws RollbackException, IllegalStateException, SystemException
enlistResource
in interface Transaction
RollbackException
IllegalStateException
SystemException
public boolean enlistResource(XAResource xaRes, Object[] params) throws RollbackException, IllegalStateException, SystemException
public boolean delistResource(XAResource xaRes, int flags) throws IllegalStateException, SystemException
delistResource
in interface Transaction
IllegalStateException
SystemException
public final Uid get_uid()
public final Xid getTxId()
public int getXAResourceState(XAResource xaRes)
public static final TransactionImple getTransaction()
public static final TransactionImple getTransaction(Uid id)
public boolean isAlive()
protected void commitAndDisassociate() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, SystemException, IllegalStateException
protected Xid baseXid()
protected void rollbackAndDisassociate() throws IllegalStateException, SecurityException, SystemException
protected boolean endSuspendedRMs()
protected Xid createXid(boolean branch, XAModifier theModifier, XAResource xaResource) throws IOException, ObjectStoreException
IOException
ObjectStoreException
protected static final void putTransaction(TransactionImple tx)
protected static final void removeTransaction(TransactionImple tx)
public static Map<Uid,Transaction> getTransactions()
public Map<XAResource,TxInfo> getResources()
public int getTimeout()
public long getRemainingTimeoutMills()
Copyright © 2021 JBoss by Red Hat. All rights reserved.