3.1.1.3.2 GetTipConnectionFromAddress Operation

The GetTipConnectionFromAddress operation is called when a TIP transaction manager facet initiates a TIP connection to send a TIP command (for example, PUSH):

  • The input parameter for this operation MUST be a partner transaction manager address.

  • This operation returns a TIP connection object, where the following data fields MUST be included and set to the specified values:

    • Partner Transaction Manager Address contains the provided address.

    • Connection Type is Primary.

    • State is Idle.

If there is a TIP connection to the partner transaction manager for which the IDENTIFY/IDENTIFIED exchange has taken place and the State is Idle, as specified in [RFC2371] section 4, the TIP connection manager SHOULD return it.

Otherwise, the TIP connection manager MUST perform the following actions:

  • Create a new TCP connection to the provided partner transaction manager address.

  • Create a corresponding TIP connection object and initialize it with the following values:

    • The Transport Connection field is set to the TCP connection.

    • The State field is set to Initial Identify.

    • The Partner Transaction Manager Address field is initialized to the provided partner transaction manager address.

    • The Connection Type field is set to Primary.

  • Send an IDENTIFY TIP command with the following arguments:

    • The lowest protocol version: "3".

    • The highest protocol version: "3".

    • If the Transaction Manager Address Override field is set, the primary transaction manager address argument MUST be set to the value of the Transaction Manager Address Override field; otherwise, it MUST be set to the address from which the TIP connection originated.

    • The secondary transaction manager address argument SHOULD<1> be set to the value of the provided partner transaction manager address as specified in [RFC2371].

  • Wait indefinitely for a response from the partner transaction manager. The TIP connection manager MUST accept messages, and the TIP transaction manager facet MUST process events while it is waiting:

    • If the connection is terminated, terminate the processing of this event.

    • If the response from the partner transaction manager is a valid IDENTIFIED TIP command, return the TIP connection object.

    • Otherwise, terminate the processing of this event.