|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
This interface defines the contract for a resource controller that is responsible for management of a resource during a transaction.
| Method Summary | |
void |
closeResource(ITransactionContext tx)
Closes the resource for transaction management |
void |
commitResource(ITransactionContext tx)
Commits the resource for transaction management |
java.lang.Object |
getResourceConnection()
Retrieves the connection resource that binds to the application to the transactional resource. |
boolean |
isResourceOpen(ITransactionContext tx)
Retrieve the boolean value that indicates if the resource is open and available for transactional operations or not |
void |
openResource(ITransactionContext tx)
Opens the resource for transaction management |
boolean |
prepareToCommit(ITransactionContext tx)
Queries the resource manager if it ready to commit the transaction |
void |
resumeResource(ITransactionContext tx)
Resumes the resource for transaction management |
void |
rollbackResource(ITransactionContext tx)
Rolls back the resource for transaction management |
void |
setRequestedIsolationLevel(TransactionIsolationEnum level)
Sets the requested transaction isolation level for this resource controller. |
void |
setRequestedTransactionTimeout(int timeout)
Sets the requested transaction timeout for this resource controller. |
void |
suspendResource(ITransactionContext tx)
Suspends the resource for transaction management |
| Method Detail |
public java.lang.Object getResourceConnection()
For instance, for a JDBC resource controller, this method
would return the Connection.
public void setRequestedIsolationLevel(TransactionIsolationEnum level)
throws java.lang.IllegalStateException
level - the isolation level
java.lang.IllegalStateException - thrown if the isolation level cannot be set
public void setRequestedTransactionTimeout(int timeout)
throws java.lang.IllegalStateException
timeout - the transaction timeout
java.lang.IllegalStateException - thrown if the timeout value is illegal for
this resource controllerpublic boolean isResourceOpen(ITransactionContext tx)
tx - the transaction object
true is opened for transactionspublic void openResource(ITransactionContext tx)
tx - the transaction objectpublic void suspendResource(ITransactionContext tx)
tx - the transaction objectpublic void resumeResource(ITransactionContext tx)
tx - the transaction objectpublic boolean prepareToCommit(ITransactionContext tx)
tx - the transaction
true if the resource manager can commit the transaction,
otherwise it should return false.public void commitResource(ITransactionContext tx)
tx - the transaction objectpublic void rollbackResource(ITransactionContext tx)
tx - the transaction objectpublic void closeResource(ITransactionContext tx)
tx - the transaction object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||