Muokkaa

Jaa


BAM Interceptors in a High Availability Environment

This topic describes the failover processes for the BAM WF interceptor and the BAM WCF interceptor in a high availability environment during a SQL Server failover.

BAM WF Interceptor

When operating in a high availability environment, the BAM WF interceptor will retry retrieval of the interceptor configuration file when there is a SQL Server connection problem during a SQL Server failover. However, the interceptor will not retry when writing data to the BAM Primary Import database when a SQL Server failover is in process. This is because the interceptor relies on the behavior of the WorkflowCommitBatchService class when writing data to the BAM Primary Import database.

In the following example, DefaultWorkflowCommitWorkBatchService is added as a run-time service with enableRetries="true" so that it retries the batch as shown in a snippet from an App.config file:

<add type="System.Workflow.Runtime.Hosting.DefaultWorkflowCommitWorkBatchService, System.Workflow.Runtime, Version=3.0.00000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"  enableRetries="True"/>

However, if there are existing ambient transactions when the CommitWorkBatch method is called, the workflow instance is terminated immediately when a SQL Server connection is not available.

For more information about the behavior of the WorkflowCommitBatchService class in a high availability environment, see the "Reliability and High Availability" section in "Introduction to Hosting Windows Workflow Foundation" at https://go.microsoft.com/fwlink/?LinkId=88068.

BAM WCF Interceptor

In a high availability environment, the BAM WCF interceptor does not retry retrieval of the interceptor configuration file when there is a SQL Server connection problem during a SQL Server failover. You should therefore customize the WCF code to compensate for failure or use reliable messaging to resubmit messages.

See Also

BAM WF Interceptor