共用方式為


3.15.4 Message Processing Events and Sequencing Rules

When a Server Transaction ORPC Extension receives an ORPC, it MUST perform the following sequence of operations.

If the incoming ORPC does not contain a Transaction ORPC Extension (section 2.2.3.1), the server transaction ORPC extension MUST do the following:

  • If the DtcCap_CanExport bit (section 2.2.6.1) is not set in the DtcCapabilities value and the DtcCap_CanTransmit bit (section 2.2.6.1) is not set in the DtcCapabilities value, the server transaction ORPC extension MUST stop further processing and MUST return CONTEXT_E_TMNOTAVAILABLE from the ORPC request.

  • If the DtcCap_CanExport bit is set in the DtcCapabilities value and the local DTCO transaction manager implementation does not support the STxInfo ([MS-DTCO] section 2.2.5.10) method of sending transactions or if the DtcCap_CanTransmit bit is set in the DtcCapabilities value and the local DTCO transaction manager implementation does not support the Propagation_Token ([MS-DTCO] section 2.2.5.4) method of sending transactions, the server transaction ORPC extension MUST stop further processing and MUST return CONTEXT_E_TMNOTAVAILABLE from the ORPC request.

  • If the DtcCap_CanExport bit is set in the DtcCapabilities value and the local DTCO transaction manager implementation supports the STxInfo method of sending transactions, the server transaction ORPC extension MUST do the following:

    • Call the GetSeqAndTxViaExport (section 3.23.4.1) method of the TransactionStream (section 2.2.2.1.2) object reference.

    • If the GetSeqAndTxViaExport call succeeds, the server transaction ORPC extension MUST do the following:

      • If the value returned in pulCurrentSeq parameter is different from the CurrentTSN value, the server transaction ORPC extension MUST do the following:

        • If the InTransaction flag is set to TRUE, it MUST abort the previous transaction.

        • It MUST set InTransaction flag to TRUE.

      • Set the CurrentTSN value to the value returned in pulCurrentSeq.

      • Set the STxInfo instance to the value returned in the prgbExportCookie parameter.

      • Set the TransactionUpdated flag to TRUE.

    • If the GetSeqAndTxViaExport call fails, the server transaction ORPC extension MUST do the following:

      • Call the GetTxViaExport (section 3.23.4.3) method of the TransactionStream object reference.

      • If the GetTxViaExport call succeeds, the server transaction ORPC extension MUST do the following:

        • Set the STxInfo instance to the value returned in prgbExportCookie.

        • Set the TransactionUpdated flag to TRUE.

      • If the GetTxViaExport call fails, the server transaction ORPC extension MUST set the CommitTransaction flag to FALSE.

  • Otherwise, the server transaction ORPC extension MUST do the following:

    • Call the GetSeqAndTxViaTransmitter (section 3.23.4.2) method of the TransactionStream object reference.

    • If the GetSeqAndTxViaTransmitter call succeeds, the server transaction ORPC extension MUST do the following:

      • If the value returned in pulCurrentSeq is different from the CurrentTSN value, the  server transaction ORPC extension MUST do the following:

        • If InTransaction flag is set to TRUE, it MUST abort the previous transaction.

        • It MUST set InTransaction flag to TRUE.

      • Set the CurrentTSN value to the value returned in pulCurrentSeq.

      • Set the Propagation_Token instance to the value returned in the prgbTransmitterBuffer parameter.

      • Set the TransactionUpdated flag to TRUE.

    • If the GetSeqAndTxViaTransmitter call fails, the server transaction ORPC extension MUST do the following:

      • Call the GetTxViaTransmitter (section 3.23.4.4) method of the TransactionStream object reference, setting the ulRequestSeq parameter to the CurrentTSN value.

      • If the GetTxViaTransmitter call succeeds, the server transaction ORPC extension MUST do the following:

        • Set the Propagation_Token instance to the value returned in prgbTransmitterBuffer.

        • Set the TransactionUpdated flag to TRUE.

      • If the GetTxViaTransmitter call fails, the server transaction ORPC extension MUST set the CommitTransaction flag to FALSE.

  • If the incoming ORPC does contain a Transaction ORPC Extension, the server transaction ORPC extension MUST do the following:

    • If the m_ulSeq field of the TransactionPropCallHeader (section 2.2.3.1.1.1) is less than the CurrentTSN value, the server transaction ORPC extension MUST return CONTEXT_E_ABORTING from the ORPC request.

    • If the m_ulSeq field of the TransactionPropCallHeader is greater than the CurrentTSN value, the server transaction ORPC extension MUST do the following:

      • If the InTransaction flag is set to TRUE, the server transaction ORPC extension MUST abort the previous transaction.

      • It MUST set the InTransaction flag to TRUE.

    • Set the CurrentTSN value to the value contained in m_ulSeq field of the TransactionPropCallHeader.

    • If the m_usVariant field of the TransactionPropCallHeader is set to TransactionPropCall_None, the server transaction ORPC extension MUST do the following:

      • If the DtcCap_CanExport bit is not set in the DtcCapabilities value and the DtcCap_CanTransmit bit is not set in the DtcCapabilities value, the server transaction ORPC extension MUST stop further processing and MUST return CONTEXT_E_TMNOTAVAILABLE from the ORPC request.

      • If the DtcCap_CanExport bit is set in the DtcCapabilities value and the local DTCO transaction manager implementation does not support the STxInfo method of sending transactions or if the DtcCap_CanTransmit bit is set in the DtcCapabilities value and the local DTCO transaction manager implementation does not support the Propagation_Token method of sending transactions, the server transaction ORPC extension MUST stop further processing and MUST return CONTEXT_E_TMNOTAVAILABLE from the ORPC request.

      • If the DtcCap_CanTransmit bit is set in the DtcCapabilities value and the local DTCO transaction manager implementation supports the Propagation_Token method of sending transactions, the server transaction ORPC extension MUST do the following:

        • Call the GetTxViaTransmitter method of the TransactionStream object reference, setting ulRequestSeq to the CurrentTSN value.

        • If the GetTxViaTransmitter call succeeds, the server transaction ORPC extension MUST do the following:

          • Set the Propagation_Token instance to the value returned in prgbTransmitterBuffer.

          • Set the TransactionUpdated flag to TRUE.

        • If the GetTxViaTransmitter  call fails, the server transaction ORPC extension MUST set the CommitTransaction flag to FALSE.

      • Otherwise, the server transaction ORPC extension MUST do the following:

        • Call the GetTxViaExport method of the TransactionStream object reference.

        • If the GetTxViaExport call succeeds, the server transaction ORPC extension MUST:

          • Set the STxInfo instance to the value returned in prgbExportCookie.

          • Set the TransactionUpdated flag to TRUE.

        • If the GetTxViaExport call fails, the server transaction ORPC extension MUST set the CommitTransaction flag to FALSE.

  • If the m_usVariant field of the TransactionPropCallHeader is set to TransactionPropCall_ExportCookie, it MUST set the STxInfo instance to the STxInfo contained in the ExportCookie field of the TransactionPropCallExportCookie (section 2.2.3.1.1.2) structure.

  • If the m_usVariant field of the TransactionPropCallHeader is set to TransactionPropCall_TransmitterBuffer, it MUST set the Propagation_Token instance to the Propagation_Token contained in the TransmitterBuffer field of the TransactionPropCallTransmitterBuffer (section 2.2.3.1.1.3) structure.

If the ORPC request contains an application object reference in an ORPC request parameter, the server transaction ORPC extension MUST unmarshal the application object reference as specified in section 3.20.

The server transaction ORPC extension MUST then execute the ORPC call.

If an application or higher level protocol requests the server transaction ORPC extension to abort the transaction, it MUST set the CommitTransaction flag to FALSE.

After the ORPC call is executed, the server transaction ORPC extension MUST do the following:

  • If the ORPC response contains an application object in an ORPC response parameter, the server transaction ORPC extension MUST marshal the application object as specified in section 3.21.

  • If the ORPC response contains an application object reference in an ORPC response parameter, the server transaction ORPC extension MUST marshal the application object reference as specified in section 3.22.

  • If the client requested the server's SWhereabouts ([MS-DTCO] section 2.2.5.11) by setting the TransactionPropCallFlag_NeedWhereabouts flag in the m_usFlags field of the TransactionPropCallHeader, the server transaction ORPC extension MUST return a TransactionPropRetWhereabouts (section 2.2.3.1.2.2) structure.

  • If the client did not request the server's SWhereabouts, it MUST return a TransactionPropRetHeader (section 2.2.3.1.2.1) structure with the m_usVariant field of the TransactionPropRetHeader structure set to TransactionPropRet_None.

  • If the TransactionUpdated flag is TRUE, the server transaction ORPC extension SHOULD <6> set the TransactionPropRetFlag_DontSend bit in the m_usFlag field of the TransactionPropRetHeader structure.

  • If the CommitTransaction flag is set to FALSE, the server transaction ORPC extension MUST set the TransactionPropRetFlag_Abort bit in the m_usFlag field of the TransactionPropRetHeader structure.