|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.slide.transaction.SlideTransactionManager
JTA Transaction manager implementation.
Implementation notes :
Field Summary | |
static int |
DEFAULT_TRANSACTION_TIMEOUT
|
protected static java.lang.String |
LOG_CHANNEL
|
Constructor Summary | |
SlideTransactionManager()
|
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. |
Logger |
getLogger()
Get the logger associated with the transaction manager. |
int |
getStatus()
Obtain the status of the transaction associated with the current thread. |
javax.transaction.Transaction |
getTransaction()
Get the transaction object that represents the transaction context of the calling thread. |
void |
resume(javax.transaction.Transaction tobj)
Resume the transaction context association of the calling thread with the transaction represented by the supplied Transaction object. |
void |
rollback()
Roll back the transaction associated with the current thread. |
void |
setLogger(Logger logger)
Set the logger of the transaction manager. |
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 value of the timeout value that is associated with the transactions started by the current thread with the begin method. |
javax.transaction.Transaction |
suspend()
Suspend the transaction currently associated with the calling thread and return a Transaction object that represents the transaction context being suspended. |
Methods inherited from class java.lang.Object |
|
Field Detail |
protected static final java.lang.String LOG_CHANNEL
public static final int DEFAULT_TRANSACTION_TIMEOUT
Constructor Detail |
public SlideTransactionManager()
Method Detail |
public Logger getLogger()
public void setLogger(Logger logger)
public void begin() throws javax.transaction.NotSupportedException, javax.transaction.SystemException
begin
in interface javax.transaction.TransactionManager
javax.transaction.NotSupportedException
- Thrown if the thread is already
associated with a transaction and the Transaction Manager
implementation does not support nested transactions.javax.transaction.SystemException
- Thrown if the transaction manager encounters
an unexpected error condition.public void commit() throws javax.transaction.RollbackException, javax.transaction.HeuristicMixedException, javax.transaction.HeuristicRollbackException, java.lang.SecurityException, java.lang.IllegalStateException, javax.transaction.SystemException
commit
in interface javax.transaction.TransactionManager
javax.transaction.RollbackException
- Thrown to indicate that the transaction
has been rolled back rather than committed.javax.transaction.HeuristicMixedException
- Thrown to indicate that a heuristic
decision was made and that some relevant updates have been committed
while others have been rolled back.javax.transaction.HeuristicRollbackException
- Thrown to indicate that a
heuristic decision was made and that some 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.javax.transaction.SystemException
- Thrown if the transaction manager encounters
an unexpected error condition.public void rollback() throws java.lang.SecurityException, java.lang.IllegalStateException, javax.transaction.SystemException
rollback
in interface javax.transaction.TransactionManager
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.javax.transaction.SystemException
- Thrown if the transaction manager encounters
an unexpected error condition.public void setRollbackOnly() throws java.lang.IllegalStateException, javax.transaction.SystemException
setRollbackOnly
in interface javax.transaction.TransactionManager
java.lang.IllegalStateException
- Thrown if the current thread is not
associated with a transaction.javax.transaction.SystemException
- Thrown if the transaction manager encounters
an unexpected error condition.public int getStatus() throws javax.transaction.SystemException
getStatus
in interface javax.transaction.TransactionManager
javax.transaction.SystemException
- Thrown if the transaction manager encounters
an unexpected error condition.public javax.transaction.Transaction getTransaction() throws javax.transaction.SystemException
getTransaction
in interface javax.transaction.TransactionManager
javax.transaction.SystemException
- Thrown if the transaction manager encounters
an unexpected error condition.public void resume(javax.transaction.Transaction tobj) throws javax.transaction.InvalidTransactionException, java.lang.IllegalStateException, javax.transaction.SystemException
resume
in interface javax.transaction.TransactionManager
tobj
- The Transaction object that represents the transaction to
be resumed.javax.transaction.InvalidTransactionException
- Thrown if the parameter
transaction object contains an invalid transaction.java.lang.IllegalStateException
- Thrown if the thread is already
associated with another transaction.javax.transaction.SystemException
- Thrown if the transaction manager encounters
an unexpected error condition.public javax.transaction.Transaction suspend() throws javax.transaction.SystemException
suspend
in interface javax.transaction.TransactionManager
javax.transaction.SystemException
- Thrown if the transaction manager encounters
an unexpected error condition.public void setTransactionTimeout(int seconds) throws javax.transaction.SystemException
If an application has not called this method, the transaction service uses some default value for the transaction timeout.
setTransactionTimeout
in interface javax.transaction.TransactionManager
seconds
- The value of the timeout in seconds. If the value is
zero, the transaction service restores the default value.javax.transaction.SystemException
- Thrown if the transaction manager encounters
an unexpected error condition.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |