3.5.4.4 Register One-Pipe XA Resource Manager

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

If the Register One-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 One-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 values:

      • 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 1.

    • 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_OPENONEPIPE.

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

      • Set the XA Resource Manager Proxy referenced by the Connection to the created XA Resource Manager Proxy object.

      • Add the newly created XA Resource Manager Proxy object to the One-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 arguments:

        • 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 the Connection referenced by the Request Connection field of the created XA Resource Manager Proxy object to Awaiting Open Response.

    • Otherwise:

      • Return Failure.