public class UserTransactionImpl extends java.lang.Object implements UserTransaction
Constructor and Description |
---|
UserTransactionImpl(TransactionManagerImpl tm)
Creates the proxy.
|
Modifier and Type | Method and Description |
---|---|
void |
abortTransaction()
Aborts the transaction.
|
void |
begin()
Start the transaction.
|
void |
commit()
Commits the transaction
|
void |
delistResource(ManagedResource resource)
Delist a resource.
|
void |
enlistResource(ManagedResource resource)
Enlist a resource.
|
int |
getEnlistedResourceCount()
Returns the number of currently enlisted resources.
|
int |
getStatus()
Gets the transaction's status
|
java.util.ArrayList<ManagedXAResource> |
getXaResources() |
Xid |
getXid()
Returns the XID.
|
boolean |
isActive() |
boolean |
isInContext()
inContext is valid within a managed UserTransactionImpl context, e.g
in a webApp, but not in a cron job.
|
void |
rollback()
Rolls the transaction back
|
void |
setInContext(boolean isInContext)
inContext is valid within a managed UserTransactionImpl context, e.g
in a webApp, but not in a cron job.
|
void |
setRollbackOnly()
Marks the transaction as rollback only.
|
void |
setRollbackOnly(java.lang.Exception e)
Marks the transaction as rollback only.
|
void |
setTransactionTimeout(int seconds)
Sets the transaction's timeout.
|
java.lang.String |
toString() |
void |
userResume(UserTransactionSuspendState state)
Resumes the transaction.
|
UserTransactionSuspendState |
userSuspend()
Suspends the transaction.
|
public UserTransactionImpl(TransactionManagerImpl tm)
public void setTransactionTimeout(int seconds) throws SystemException
setTransactionTimeout
in interface UserTransaction
SystemException
public int getStatus() throws SystemException
getStatus
in interface UserTransaction
SystemException
public boolean isInContext()
public void setInContext(boolean isInContext)
public boolean isActive()
public void enlistResource(ManagedResource resource) throws SystemException, RollbackException
SystemException
RollbackException
public void delistResource(ManagedResource resource)
@Module public java.util.ArrayList<ManagedXAResource> getXaResources()
public Xid getXid() throws SystemException, RollbackException
SystemException
RollbackException
public int getEnlistedResourceCount() throws SystemException, RollbackException
SystemException
RollbackException
public void begin() throws NotSupportedException, SystemException
begin
in interface UserTransaction
NotSupportedException
SystemException
public UserTransactionSuspendState userSuspend()
public void userResume(UserTransactionSuspendState state)
public void setRollbackOnly() throws java.lang.IllegalStateException, SystemException
setRollbackOnly
in interface UserTransaction
java.lang.IllegalStateException
SystemException
public void setRollbackOnly(java.lang.Exception e) throws java.lang.IllegalStateException
java.lang.IllegalStateException
public void commit() throws java.lang.IllegalStateException, RollbackException, HeuristicMixedException, HeuristicRollbackException, java.lang.SecurityException, SystemException
commit
in interface UserTransaction
java.lang.IllegalStateException
RollbackException
HeuristicMixedException
HeuristicRollbackException
java.lang.SecurityException
SystemException
public void rollback() throws java.lang.IllegalStateException, java.lang.SecurityException, SystemException
rollback
in interface UserTransaction
java.lang.IllegalStateException
java.lang.SecurityException
SystemException
public void abortTransaction() throws java.lang.IllegalStateException
java.lang.IllegalStateException
public java.lang.String toString()
toString
in class java.lang.Object