Package org.jboss.jbossts.star.client
Interface SRAApi
public interface SRAApi
-
Method Summary
Modifier and TypeMethodDescriptionbeginTransaction
(Long timeout, TimeUnit unit) Begin a new SRA.cancelTransaction
(String txId) Cancel a SRAcommitTransaction
(String txId) Commit a SRAjakarta.ws.rs.core.Response
deleteParticipant
(String enlistmentId) Performing DELETE on participant's recovery URL removes participant from the transaction.jakarta.ws.rs.core.Response
enlistParticipant
(String linkHeader, String txId, String content) Register a participant in a txjakarta.ws.rs.core.Response
enlistVolatileParticipant
(String linkHeader, String txId) Register a volatile participant in a txList of all transaction URIs known to the coordinator (active and in recovery)jakarta.ws.rs.core.Response
Performing a GET on the transaction URL with media type application/txstatusext+xml returns extended information about the transaction, such as its status, number of participants, and their individual URIs.Return extended information about the transaction-manager resource such as how long it has been up and all transaction-coordinator URIs.Return statistics for the transaction manager: number of active, prepared, committed, and aborted transactions are returned.Get the current status for a transactionObtain the transaction terminator and participant enlistment URIs for the specified transaction id.jakarta.ws.rs.core.Response
lookupParticipant
(String txId, String enlistmentId) Get the participant url (registered during enlistParticipant) corresponding to a resource reference if the coordinator crashes - the participant list will be empty but this is ok if commit hasn't been called since the TM uses presumed abort semantics.jakarta.ws.rs.core.Response
postParticipant
(String enlistmentId) jakarta.ws.rs.core.Response
replaceParticipant
(String linkHeader, String txId, String enlistmentId) PUT /recovery-coordinator/_RecCoordId_/_new participant URL_ - overwrite the old participant URL with new participant URL (as with JTS, this will also trigger off a recovery attempt on the associated transaction) A participant may use this url to notifiy the coordinator that he has moved to a new location.
-
Method Details
-
getAllTransactions
List of all transaction URIs known to the coordinator (active and in recovery) -
getTransactionManagerInfo
TransactionManagerElement getTransactionManagerInfo()Return extended information about the transaction-manager resource such as how long it has been up and all transaction-coordinator URIs. -
getTransactionStatistics
TransactionStatisticsElement getTransactionStatistics()Return statistics for the transaction manager: number of active, prepared, committed, and aborted transactions are returned.- Returns:
- TransactionStatisticsElement
-
getTransactionURIs
Obtain the transaction terminator and participant enlistment URIs for the specified transaction id.- Parameters:
id
- URL template parameter for the transaction id- Returns:
-
getTransactionStatus
Get the current status for a transaction- Parameters:
id
- the id of the transaction- Returns:
- content representing the status of the transaction
-
getTransactionExtStatus
Performing a GET on the transaction URL with media type application/txstatusext+xml returns extended information about the transaction, such as its status, number of participants, and their individual URIs.- Parameters:
id
- the id of the transaction- Returns:
- HTTP response representing extended transaction status information
-
beginTransaction
Begin a new SRA.- Parameters:
timeout
- the number of milliseconds after which the transaction is eligible for being timed out.- Returns:
- SRA info
- Throws:
GenericSRAException
-
commitTransaction
Commit a SRA- Parameters:
txId
- id of the SRA to commit- Returns:
- SRA status
-
cancelTransaction
Cancel a SRA- Parameters:
txId
- id of the SRA to cancel- Returns:
- SRA status
-
enlistParticipant
Register a participant in a tx- Parameters:
linkHeader
- link headertxId
- id of transactioncontent
- body of request containing URI for driving the participant through completion (the URI should be unique within the scope of txId)- Returns:
- unique resource ref for the participant
-
enlistVolatileParticipant
Register a volatile participant in a tx- Parameters:
linkHeader
- link headertxId
- id of transaction- Returns:
- HTTP status code
-
lookupParticipant
Get the participant url (registered during enlistParticipant) corresponding to a resource reference if the coordinator crashes - the participant list will be empty but this is ok if commit hasn't been called since the TM uses presumed abort semantics.- Parameters:
txId
- transaction id that this recovery url belongs toenlistmentId
- the resource reference- Returns:
- the participant url
-
replaceParticipant
PUT /recovery-coordinator/_RecCoordId_/_new participant URL_ - overwrite the old participant URL with new participant URL (as with JTS, this will also trigger off a recovery attempt on the associated transaction) A participant may use this url to notifiy the coordinator that he has moved to a new location.- Parameters:
linkHeader
- link header containing participant linkstxId
- transaction id that this recovery url belongs toenlistmentId
- id by the participant is known- Returns:
- http status code
-
postParticipant
-
deleteParticipant
Performing DELETE on participant's recovery URL removes participant from the transaction.- Parameters:
enlistmentId
- The resource reference- Returns:
- HTTP status code
-