3.5.4.1 Register Two-Pipe XA Resource Manager

This event MUST be signaled by the higher-layer business logic with the following arguments:

If the Register Two-Pipe XA Resource Manager event is signaled, the XA Resource Manager Bridge MUST perform the following actions:

  • Attempt to find an XA Resource Manager Proxy object in the Two-Pipe XA Resource Manager Proxy Table referenced by the XA Resource Manager Bridge keyed by the provided Resource Manager Cookie.

  • If an object is found:

    • Return Failure.

  • Otherwise:

    • Attempt to create a new XA Resource Manager Proxy object with the following settings:

      • The Resource Manager Global Identifier field is set to NULL GUID.

      • The DLL Name field is set to the provided DLL Name.

      • The Data Store Name field is set to the provided Data Store Name.

      • The Pipe field is set to 2.

    • If Successful:

      • Create a new XA Resource Manager Bridge CMP connection using the XA Resource Manager Bridge Facet Name field of the XA Resource Manager Bridge:

        • Set the Connection Type to CONNTYPE_XATM_OPEN.

      • Set the Request Connection field of the XA Resource Manager Proxy object to the newly created CONNTYPE_XATM_OPEN connection.

      • Set the Connection's XA Resource Manager Proxy reference to the created XA Resource Manager Proxy object.

      • Add the newly created XA Resource Manager Proxy to the Two-Pipe XA Resource Manager Proxy Table referenced by the XA Resource Manager Bridge keyed by the provided Resource Manager Cookie.

      • Send an XATMUSER_MTAG_RMOPEN message (section 2.2.3.2.5) with the following settings:

        • The lenDSN field is set to the length of the provided Data Store Name.

        • The lenXaDll field is set to the length of the provided DLL Name.

        • The Recover field is set to 0x00000000.

        • The DSN field is set to the provided Data Store Name.

        • The XaDllFileName field is set to the provided DLL Name.

      • Set the State of Connection referenced by the Request Connection field of the created XA Resource Manager Proxy object to Awaiting Open Response.

    • Otherwise:

      • Return Failure.