|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atomikos.icatch.jta.UserTransactionManager
public class UserTransactionManager
A straightforward, zero-setup implementation of a transaction manager. J2SE applications can use an instance of this class to get a handle to the transaction manager, and automatically startup or recover the transaction service on first use. J2EE applications should NOT use this class in order to avoid the concurrent use of different transaction services. For J2EE applications, we have the class J2eeTransactionManager instead.
Constructor Summary | |
---|---|
UserTransactionManager()
|
Method Summary | |
---|---|
void |
begin()
|
void |
close()
Closes the transaction service, but only if it was implicitly started via this instance. |
void |
commit()
|
boolean |
getForceShutdown()
|
Reference |
getReference()
|
boolean |
getStartupTransactionService()
Returns true if the transaction service will be started if not already running. |
int |
getStatus()
|
Transaction |
getTransaction()
|
void |
init()
Performs initialization if necessary. |
void |
resume(Transaction tx)
|
void |
rollback()
|
void |
setForceShutdown(boolean value)
Sets the force shutdown mode to use during close. |
void |
setRollbackOnly()
|
void |
setStartupTransactionService(boolean startup)
Sets whether the transaction service should be started if not already running. |
void |
setTransactionTimeout(int secs)
|
Transaction |
suspend()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UserTransactionManager()
Method Detail |
---|
public void setStartupTransactionService(boolean startup)
startup
- public boolean getStartupTransactionService()
public void init() throws SystemException
SystemException
public void begin() throws NotSupportedException, SystemException
begin
in interface TransactionManager
begin
in interface UserTransaction
NotSupportedException
SystemException
TransactionManager.begin()
public boolean getForceShutdown()
public void setForceShutdown(boolean value)
value
- public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException
commit
in interface TransactionManager
commit
in interface UserTransaction
RollbackException
HeuristicMixedException
HeuristicRollbackException
SecurityException
IllegalStateException
SystemException
TransactionManager.commit()
public int getStatus() throws SystemException
getStatus
in interface TransactionManager
getStatus
in interface UserTransaction
SystemException
TransactionManager.getStatus()
public Transaction getTransaction() throws SystemException
getTransaction
in interface TransactionManager
SystemException
TransactionManager.getTransaction()
public void resume(Transaction tx) throws InvalidTransactionException, IllegalStateException, SystemException
resume
in interface TransactionManager
InvalidTransactionException
IllegalStateException
SystemException
TransactionManager.resume(javax.transaction.Transaction)
public void rollback() throws IllegalStateException, SecurityException, SystemException
rollback
in interface TransactionManager
rollback
in interface UserTransaction
IllegalStateException
SecurityException
SystemException
TransactionManager.rollback()
public void setRollbackOnly() throws IllegalStateException, SystemException
setRollbackOnly
in interface TransactionManager
setRollbackOnly
in interface UserTransaction
IllegalStateException
SystemException
TransactionManager.setRollbackOnly()
public void setTransactionTimeout(int secs) throws SystemException
setTransactionTimeout
in interface TransactionManager
setTransactionTimeout
in interface UserTransaction
SystemException
TransactionManager.setTransactionTimeout(int)
public Transaction suspend() throws SystemException
suspend
in interface TransactionManager
SystemException
TransactionManager.suspend()
public Reference getReference() throws NamingException
getReference
in interface Referenceable
NamingException
Referenceable.getReference()
public void close()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |