Contents

The Transaction interface allows operations to be performed against the transaction in the target Transaction object. A Transaction object is created corresponding to each global transaction creation in which one or more resources participate. In FioranoMQ, the resource (javax.transaction.xa.XAResource object) is available which participates in distributed transactions. Refer to JTA specification for more details on XAResource object.

FioranoMQ provides the following admin APIs related to distributed transactions:

  • Get All Transactions Returns an enumeration of XIDs with the given status.
  • Get Transaction status Returns the status of the transaction specified with the XID.

Get All Transactions

This function returns the enumeration of all the XIDs with a given status. The status of a transaction can be started, ended, suspended or prepared.

Below are the instructions to return all the transactions with a 'given' status running on the FioranoMQ server.

  1. Look up an admin Connection Factory
  2. Create an admin connection
  3. Obtain the admin service from the admin connection
  4. Retrieve all the transactions with a given status

This section explains how to retrieve the list of transactions that have started :

  1. Creating the Admin Service

MQ Admin Service retrieves the list of transactions from the FioranoMQ server. The instance of admin service can be obtained from the admin connection.

2. Transaction List

Alist of the transactions, given their status, can be retrieved from the admin service. To retrieve a list of transactions that have started, the code snippet given below is to be used. This returns all transactions currently present in the MQ server started in the given state

3. Retrieve Transactions

Individual transactions or XIDs can be retrieved from a list of transactions using the code below:


This function returns the status of a transaction, which is specified with a XID. The returned status can be started, ended, suspended or prepared.

Get Transaction Status

Below are the instructions to retrieve the status of a given transaction:

  1. Look up an admin connection factory.
  2. Create an admin connection.
  3. Obtain the admin service from the admin Connection.
  4. Retrieve the status of a given transaction.

This section explains how to obtain the status of a given transaction:

  1. Creating the Admin Service

MQ Admin Service obtains the status of a given transaction from the FioranoMQ server. The instance of admin service can be retrieved from the admin connection.

    1. acf = (MQAdminConnectionFactory) ic.lookup ("primaryACF");
    2. ac = acf.createMQAdminConnection ("admin", "passwd");
    3. adminService = ac.getMQAdminService();
  1. Retrieve Transaction Status

The status of a given transaction, specified by XID, can be retrieved using the admin service object.

Possible options for the status byte:

    1. IFioranoConstants.START - specifies that the transaction is in the started state.
    2. IFioranoConstants.END - specifies that the transaction is in the ended state.
    3. IFioranoConstants.SUSPEND - specifies that the transaction suspended state.
    4. IFioranoConstants.PREPARED - specifies that the transaction is in the prepared
Adaptavist ThemeBuilder EngineAtlassian Confluence