The LRAConfig object is used to set up the LRA configuration in a participant service by configuring the participant methods in the LRAConfig attributes. The LRAConfig attributes provide similar behavior as the java annotations in the Microprofile LRA spec. These attributes are used to specify the callback methods in a participant service that the LRA coordinator will invoke.

Hierarchy

  • LRAConfig

Constructors

  • Initialize a LRAConfig object

    Parameters

    • lraCoordinatorUrl: string

      Specifies the URL of the Transaction Manager for Microservices LRA Coordinator. To get this attribute value, append /lra- coordinator to the URL that you use to access Transaction Manager for Microservices. For example, if https://tmm-app:9000/api/v1 is the Transaction Manager for Microservices URL, then lraCoordinatorUrl is https://tmm-app:9000/api/v1/lra-coordinator.

    • applRouter: Router

      The router instance in express.js. The attribute value must be an express. Use this to set up the request-response interceptors for requests routed to the configured participant endpoints or callback methods

    • applRouterMountPath: string

      Specifies the path in the main application on which the router instance, applRouter, is mounted

    • lra: LRA

      Specifies the LRA object which defines the LRA context

    • complete: string

      Marks an endpoint that is called by the LRA coordinator when the LRA is closed. The method has to be idempotent so that the coordinator can call it several times. Otherwise, provide the status of the service by an additional method marked in the attribute status

    • compensate: string

      Marks an endpoint that is by the LRA coordinator when the LRA is canceled. The method has to be idempotent so that the LRA coordinator can call it several times. Otherwise, provide the status of the service by an additional method marked in the attribute status

    • status: string

      Marks an endpoint that reports the actual status of the participant

    • afterLRA: string

      Marks an endpoint that is called after the LRA is either completed or compensated.

    • leave: string

      Marks an endpoint that is called when the participant service leaves the current LRA context. Use this only when it is not possible to leave an LRA that has already been completed or compensated

    • forget: string

      Marks an endpoint that LRA coordinator calls for cleaning up the resources. It releases all the resources that were allocated for the LRA context

    • clientId: string

      Client ID

    Returns LRAConfig

Properties

afterLRA: string

Marks an endpoint that is called after the LRA is either completed or compensated

applRouter: Router

The attribute value must be an express.Router instance in express.js. This will be used to setup the request-response interceptors for requests routed to the configured participant endpoints or callback methods.

applRouterMountPath: string

Specifies the path in the main application on which the router instance, applRouter, is mounted.

clientId: string

Client Id

compensate: string

Marks an endpoint that is by the LRA coordinator when the LRA is canceled. The method has to be idempotent so that the LRA coordinator can call it several times. Otherwise, provide the status of the service by an additional method marked in the attribute status. *

complete: string

Marks an endpoint that is called by the LRA coordinator when the LRA is closed. The method has to be idempotent so that the coordinator can call it several times. Otherwise, provide the status of the service by an additional method marked in the attribute status

forget: string

Marks an endpoint that LRA coordinator calls for cleaning up the resources. It releases all the resources that were allocated for the LRA context.

leave: string

Marks an endpoint that is called when the participant service leaves the current LRA context. Use this only when it is not possible to leave an LRA that has already been completed or compensated

lra: LRA

Specifies the LRA object which defines the LRA context

lraCoordinatorUrl: string

Specifies the URL of the Transaction Manager for Microservices LRA Coordinator. To get this attribute value, append /lra- coordinator to the URL that you use to access Transaction Manager for Microservices. For example, if https://tmm-app:9000/api/v1 is the Transaction Manager for Microservices URL, then lraCoordinatorUrl is https://tmm-app:9000/api/v1/lra-coordinator.

status: string

Marks an endpoint that reports the actual status of the participant *

Copyright © 2022, 2024, Oracle and/or its affiliates.