|
eXo Kernel :: Component :: Common Service 2.4.11-UXP01 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exoplatform.services.transaction.impl.AbstractTransactionService
public abstract class AbstractTransactionService
This abstract class implements the main logic of all the methods expected for a
TransactionService. If you intend to use a TransactionManager in
standalone mode (not manager by your Application Server), you can set the
transaction timeout thanks to the value-param called timeout
the value of this parameter is expressed in seconds.
| Field Summary | |
|---|---|
protected int |
defaultTimeout
The default timeout |
protected boolean |
forceTimeout
Indicates if the timeout has to be enforced |
| Constructor Summary | |
|---|---|
AbstractTransactionService()
|
|
AbstractTransactionService(InitParams params)
|
|
| Method Summary | |
|---|---|
boolean |
delistResource(XAResource xares)
Delists XA resource from transaction manager. |
boolean |
enlistResource(XAResource xares)
Enlists XA resource in transaction manager. |
protected abstract TransactionManager |
findTransactionManager()
This method will try to find the current TransactionManager |
protected UserTransaction |
findUserTransaction()
This method will try to find the current UserTransaction, by default it will
simply wraps a TransactionManager |
int |
getDefaultTimeout()
|
TransactionManager |
getTransactionManager()
|
UserTransaction |
getUserTransaction()
|
protected boolean |
isTMInitialized()
Indicates whether or not the TransactionManager has been initialized |
void |
setTransactionTimeout(int seconds)
Sets timeout in seconds, |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final int defaultTimeout
protected final boolean forceTimeout
| Constructor Detail |
|---|
public AbstractTransactionService()
public AbstractTransactionService(InitParams params)
| Method Detail |
|---|
public boolean delistResource(XAResource xares)
throws RollbackException,
SystemException
delistResource in interface TransactionServicexares - XAResource
SystemException - Thrown if the transaction manager
encounters an unexpected error condition.
RollbackException
public boolean enlistResource(XAResource xares)
throws RollbackException,
SystemException
enlistResource in interface TransactionServicexares - XAResource
RollbackException - Thrown to indicate that
the transaction has been marked for rollback only.
SystemException - Thrown if the transaction manager
encounters an unexpected error condition.public int getDefaultTimeout()
getDefaultTimeout in interface TransactionServicepublic final TransactionManager getTransactionManager()
getTransactionManager in interface TransactionServiceprotected boolean isTMInitialized()
TransactionManager has been initialized
protected abstract TransactionManager findTransactionManager()
throws Exception
TransactionManager
TransactionManager
Exception - if an error occurs while looking for the TransactionManagerpublic final UserTransaction getUserTransaction()
getUserTransaction in interface TransactionService
protected UserTransaction findUserTransaction()
throws Exception
UserTransaction, by default it will
simply wraps a TransactionManager
UserTransaction
Exception - if an error occurs while looking for the UserTransaction
public void setTransactionTimeout(int seconds)
throws SystemException
setTransactionTimeout in interface TransactionServiceseconds - int
SystemException
|
eXo Kernel :: Component :: Common Service 2.4.11-UXP01 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||