|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.jts.jta.UserTransactionImpl
public class UserTransactionImpl
This class implements the javax.transaction.UserTransaction interface which defines methods that allow an application to explicitly manage transaction boundaries.
| Constructor Summary | |
|---|---|
UserTransactionImpl()
|
|
| Method Summary | |
|---|---|
void |
begin()
Create a new transaction and associate it with the current thread. |
void |
commit()
Complete the transaction associated with the current thread. |
javax.naming.Reference |
getReference()
This method is used by JNDI to store a referenceable object. |
int |
getStatus()
Obtain the status of the transaction associated with the current thread. |
void |
rollback()
Roll back the transaction associated with the current thread. |
void |
setRollbackOnly()
Modify the transaction associated with the current thread such that the only possible outcome of the transaction is to roll back the transaction. |
void |
setTransactionTimeout(int seconds)
Modify the timeout value that is associated with transactions started by subsequent invocations of the begin method. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UserTransactionImpl()
| Method Detail |
|---|
public void begin()
throws NotSupportedException,
SystemException
begin in interface UserTransactionjava.lang.IllegalStateException - Thrown if the thread is already
associated with a transaction.
SystemException - Thrown if the transaction manager
encounters an unexpected error condition
NotSupportedException
public void commit()
throws RollbackException,
HeuristicMixedException,
HeuristicRollbackException,
java.lang.SecurityException,
java.lang.IllegalStateException,
SystemException
commit in interface UserTransactionTransactionRolledbackException - Thrown to indicate that
the transaction has been rolled back rather than committed.
HeuristicMixedException - Thrown to indicate that a heuristic
decision was made and that some relevant updates have been committed
while others have been rolled back.
HeuristicRollbackException - Thrown to indicate that a
heuristic decision was made and that all relevant updates have been
rolled back.
java.lang.SecurityException - Thrown to indicate that the thread is
not allowed to commit the transaction.
java.lang.IllegalStateException - Thrown if the current thread is
not associated with a transaction.
SystemException - Thrown if the transaction manager
encounters an unexpected error condition
RollbackException
public void rollback()
throws java.lang.IllegalStateException,
java.lang.SecurityException,
SystemException
rollback in interface UserTransactionjava.lang.SecurityException - Thrown to indicate that the thread is
not allowed to roll back the transaction.
java.lang.IllegalStateException - Thrown if the current thread is
not associated with a transaction.
SystemException - Thrown if the transaction manager
encounters an unexpected error condition
public void setRollbackOnly()
throws java.lang.IllegalStateException,
SystemException
setRollbackOnly in interface UserTransactionjava.lang.IllegalStateException - Thrown if the current thread is
not associated with a transaction.
SystemException - Thrown if the transaction manager
encounters an unexpected error condition
public int getStatus()
throws SystemException
getStatus in interface UserTransactionSystemException - Thrown if the transaction manager
encounters an unexpected error condition
public void setTransactionTimeout(int seconds)
throws SystemException
If an application has not called this method, the transaction service uses some default value for the transaction timeout.
setTransactionTimeout in interface UserTransactionseconds - The value of the timeout in seconds. If the value is zero,
the transaction service restores the default value. If the value
is negative a SystemException is thrown.
SystemException - Thrown if the transaction manager
encounters an unexpected error condition.
public javax.naming.Reference getReference()
throws javax.naming.NamingException
getReference in interface javax.naming.Referenceablejavax.naming.NamingException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||