none
BizTalk, WCF-SAP adapter and load balancing RRS feed

  • Question

  • I have two BizTalk 2010 servers that belong to the same BizTalk group. They are being used to expose a web service front-end to SAP BAPI calls. A load balancer sits in front of the two BizTalk servers for the web service requests. If both BizTalk servers are active, I get session errors when calling BAPIs that modify data. The first call on the first server succeeds, but a second call that is serviced by the other server fails with a session error when the BAPI_COMMIT_TRANSACTION message is sent to SAP. This also has the side-effect of leaving an open transaction in SAP and locking the records.

    Has anybody else seen this behavior? Is the WCF-SAP adapter limited to only one active instance like the FTP adapter?

    Friday, January 6, 2012 8:00 PM

Answers

  • This didn't help at all. The problem still exists when setting EnableConnectionPooling to false. Looks like the WCF-SAP adapter suffers from the same limitations as the old mySAP adapter.

    • Marked as answer by sbanwart Thursday, January 26, 2012 7:40 PM
    Thursday, January 26, 2012 7:40 PM

All replies

  •  

    The following mmight help you. Th key point would be to check if connection pooling is disabled

    Configuring an application involves:

    http://msdn.microsoft.com/en-US/library/dd788110(v=BTS.10).aspx

    • Selecting a host for the application.

    • Mapping the ports that you created in your orchestration to physical ports in the BizTalk Server Administration console. For this orchestration you must:

      • Define a location on the hard disk and a corresponding file port where you will drop a request message. The BizTalk orchestration will consume the request message and send it to the SAP system.

      • Define a location on the hard disk and a corresponding file port where the BizTalk orchestration will drop the response message containing the response from the SAP system.

      • Define a physical WCF-Custom or WCF-SAP send port to send messages to the SAP system. For information about how to create ports, see Manually Configuring a Physical Port Binding to the SAP Adapter. Because the send port sends and receive messages conforming to more than one schema and performs two operations, you must set dynamic action for both the operations. For more information about actions, see Specifying SOAP Action. Make sure you adhere to the following key considerations while creating a WCF-Custom or WCF-SAP send port to perform transactions.

        Set the following To this value

        Action

        The send port sends and receives messages for more than one operation. So, the action on the send port must be set for each operation.

        <BtsActionMapping>
          <Operation Name="BAPIMessage" Action="http://Microsoft.LobServices.Sap/2007/03/Rfc/BAPI_SALESORDER_CREATEFROMDAT2" />
          <Operation Name="CommitMessage" Action="http://Microsoft.LobServices.Sap/2007/03/Rfc/BAPI_TRANSACTION_COMMIT" />
          <Operation Name="RollbackMessage" Action="http://Microsoft.LobServices.Sap/2007/03/Rfc/BAPI_TRANSACTION_ROLLBACK" />
        </BtsActionMapping>
        

        EnableBizTalkCompatibilityMode

        Set this binding property to True.

        EnableConnectionPooling

        Set this binding property to False before performing any transactions. In scenarios where the channel set up between the adapter and BizTalk is unexpectedly terminated, the corresponding connection is added to the connection pool. When another channel is opened, and the new channel picks the same connection object, the uncommitted transactions on the old connection object will also be committed when the transactions are committed over the new channel. To avoid this, connection pooling must be disabled while performing transactions.

        Dd788110.note(en-US,BTS.10).gifNote
        Generating the schema using the Consume Adapter Service BizTalk Project Add-in also creates a binding file containing information about the ports and the actions to be set for those ports. You can import this binding file from the BizTalk Server Administration console to create send ports (for outbound calls) or receive ports (for inbound calls). For more information, see Configuring a Physical Port Binding Using a Port Binding File.

         

         

        Dd788110.Important(en-US,BTS.10).gifImportant
        You can configure a backup transport on a WCF-Custom or WCF-SAP send port that enables you to send messages to another SAP system if the primary transport fails to function. However, for performing transactions on an SAP system, the WCF-based SAP adapter does not support specifying a backup transport pointing to another SAP server.
    Monday, January 9, 2012 4:46 AM
  • This didn't help at all. The problem still exists when setting EnableConnectionPooling to false. Looks like the WCF-SAP adapter suffers from the same limitations as the old mySAP adapter.

    • Marked as answer by sbanwart Thursday, January 26, 2012 7:40 PM
    Thursday, January 26, 2012 7:40 PM