public interface ResourceTransaction
ResourceTransaction
manages changes to a group of Resource
Modifier and Type | Method and Description |
---|---|
void |
begin()
Starts a transaction.
|
void |
commit()
Applies every change in the
Set returned by getChangeSet() |
Set<ResourceEvent> |
getChangeSet()
The changes associated with this transaction.
|
int |
getTransactionTimeout()
Get the the duration in seconds after which this
ResourceTransaction will time out and be automatically
rolled back. |
boolean |
isStarted()
Returns true if this transaction is started and was not already committed/rolled back
|
void |
rollback()
Discards this transaction and the associated changes with it
|
void |
setTransactionTimeout(int seconds)
Set the the duration in seconds after which this
ResourceTransaction will time out and be automatically
rolled back. |
void begin() throws ResourceTransactionException
ResourceTransactionException
if the transaction is already startedResourceTransactionException
void commit() throws ResourceTransactionException
Set
returned by getChangeSet()
ResourceTransactionException
void rollback() throws ResourceTransactionException
ResourceTransactionException
boolean isStarted()
void setTransactionTimeout(int seconds)
ResourceTransaction
will time out and be automatically
rolled back. (Timeout starts when begin()
is called.)
If an application has not called this method, the transaction service uses a default value for the transaction
timeout.seconds
- 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 ResourceTransactionException
is thrown.int getTransactionTimeout()
ResourceTransaction
will time out and be automatically
rolled back. If the value returned is zero, the system is using a default timeout value. (Timeout starts when
begin()
is called.)Set<ResourceEvent> getChangeSet()
Set
with the changes that were introduced so farCopyright © 2015 JBoss by Red Hat. All rights reserved.