Freigeben über


Konfiguration der Orchestrierungs-Engine

Die Orchestrierungs-Engine verwendet die XML-Datei BTSNTSvc.exe.config zum Ermitteln bestimmter Verhaltensweisen. Beispielsweise werden Pausierungseigenschaften und ihre Eigenschaften in der Datei BTSNTSvc.exe.config im XML-Format konfiguriert und beim Starten aller Hostinstanzen gelesen, die eine Orchestrierung enthalten. Weitere Informationen finden Sie unter Orchestrierungshydrierung und Rehydration.

Ein Dienst liest diese Konfigurationsinformationen einmal, wenn er gestartet wird. Änderungen an diesen Informationen werden nicht erkannt, es sei denn, der Dienst wird beendet und erneut gestartet.

In den nachstehenden Beispielen finden Sie unterschiedliche Knoten und mögliche Werte.

Beispiel: Alle Validierungen auf

<?xml version="1.0" ?>
<configuration>
       <configSections>
              <section
                     name="xlangs"
                     type="Microsoft.XLANGs.BizTalk.CrossProcess.XmlSerializationConfigurationSectionHandler, Microsoft.XLANGs.BizTalk.CrossProcess" />
       </configSections>
       <runtime>
              <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
                     <probing privatePath="BizTalk Assemblies;Developer Tools;Tracking" />
              </assemblyBinding>
       </runtime>

       <xlangs>
              <Configuration>
                     <Debugging
                            ValidateAssemblies="true"
                            ValidateSchemas="true"
                            ValidateCorrelations="true"
                            ExtendedLogging="true"
                     />
              </Configuration>
       </xlangs>
</configuration>

Beispiel: Nur Assemblyvalidierung

<?xml version="1.0" ?>
<configuration>
       <configSections>
              <section
                     name="xlangs"
                     type="Microsoft.XLANGs.BizTalk.CrossProcess.XmlSerializationConfigurationSectionHandler, Microsoft.XLANGs.BizTalk.CrossProcess"
              />
       </configSections>
       <runtime>
              <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
                     <probing privatePath="BizTalk Assemblies;Developer Tools;Tracking" />
              </assemblyBinding>
       </runtime>

       <xlangs>
              <Configuration>
                     <Debugging
                            ValidateAssemblies="true"
                            ExtendedLogging="false"
                     />
              </Configuration>
       </xlangs>
</configuration>

Beispiel: Remotedebuggen aktiviert

<?xml version="1.0" ?>
<configuration>
       <runtime>
              <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
                     <probing privatePath="BizTalk Assemblies;Developer Tools;Tracking" />
              </assemblyBinding>
       </runtime>

       <system.runtime.remoting>
              <customErrors mode="on"/>
              <channelSinkProviders>
                     <serverProviders>
                            <provider id="sspi"
                                    type="Microsoft.BizTalk.XLANGs.BTXEngine.SecurityServerChannelSinkProvider,Microsoft.XLANGs.BizTalk.Engine" securityPackage="negotiate" authenticationLevel="packetPrivacy" />
                     </serverProviders>
              </channelSinkProviders>

              <application>
                     <channels>
                            <channel ref="tcp" port="0" name="">
                                   <serverProviders>
                                          <provider ref="sspi" />
                                          <formatter ref="binary" typeFilterLevel="Full"/>
                                   </serverProviders>
                            </channel>
                     </channels>
              </application>
       </system.runtime.remoting>
</configuration>

Beispiel: AppDomain-Konfiguration

Assemblys werden benannten Domänen über Zuweisungsregeln zugewiesen (weitere Einzelheiten siehe unten). Wenn für eine Assembly keine Regel angegeben wurde, wird diese Assembly einer Ad-hoc-Domäne zugewiesen. Die Anzahl solcher zugewiesenen Assemblys pro Ad-hoc-Domäne wird anhand des Wertes von "AssembliesPerDomain" ermittelt.

<?xml version="1.0" ?>
<configuration>
    <configSections>
        <section name="xlangs" type="Microsoft.XLANGs.BizTalk.CrossProcess.XmlSerializationConfigurationSectionHandler, Microsoft.XLANGs.BizTalk.CrossProcess" />
    </configSections>
    <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
            <probing privatePath="BizTalk Assemblies;Developer Tools;Tracking" />
        </assemblyBinding>
    </runtime>
    <xlangs>
        <Configuration>
            <!--
                <!--
AppDomain configuration.
                Assemblies are assigned to named domains using assignment rules (see more below). If no rule is specified for some assembly, the assembly will be assigned to an ad hoc domain. The number of such assigned assemblies per ad hoc domain is determined by the value of AssembliesPerDomain.
            -->-->
            <AppDomains AssembliesPerDomain="10">
                <!--
                    <!--
In this section the user may specify defualt configuration for any app domain created that does not have a named configuration associated with it (see AppDomainSpecs below)
                    SecondsEmptyBeforeShutdown is the number of seconds that an app domain is empty (that is, it does not contain any orchestrations) before being unloaded. Specify -1 to signal that an app domain should never unload, even when empty.
                    Similarly, SecondsIdleBeforeShutdown is the number of seconds that an app domain is idle (that is, it contains only dehydratable orchestrations) before being unloaded. Specify -1 to signal that an app domain should never unload when idle but not empty. When an idle but non-empty domain is shut down, all of the contained instances are dehydrated first.
                -->
                -->
<DefaultSpec SecondsIdleBeforeShutdown="1200" SecondsEmptyBeforeShutdown="1800">
                    <!--
                        <!--
BaseSetup is a serialized System.AppDomainSetup object. This is passed as-is to
                        AppDomain.CreateAppDomain() and can be used to influence assembly search path etc.
                    -->
                    -->
<BaseSetup>
                        <ApplicationBase>c:\myAppBase</ApplicationBase>_0</ApplicationBase>
                        <ConfigurationFile>c:\myAppBase\myConfig.config</ConfigurationFile>_0</ConfigurationFile>
                    <DynamicBase>DynamicBase_0</DynamicBase>
<DisallowPublisherPolicy>true</DisallowPublisherPolicy>
<ApplicationName>ApplicationName_0</ApplicationName>
<PrivateBinPath>PrivateBinPath_0</PrivateBinPath>
<PrivateBinPathProbe>PrivateBinPathProbe_0</PrivateBinPathProbe>
<ShadowCopyDirectories>ShadowCopyDirectories_0</ShadowCopyDirectories>
<ShadowCopyFiles>ShadowCopyFiles_0</ShadowCopyFiles>
<CachePath>CachePath_0</CachePath>
<LicenseFile>LicenseFile_0</LicenseFile>
<LoaderOptimization>NotSpecified</LoaderOptimization>
</BaseSetup>
                </DefaultSpec>
                <!--
                    - <!--
In this section the user may specify named configurations for specific app domains, identified by their "friendly name". The format of any app-domain spec is identical to that of the default app-domain spec.
                -->-->
                <AppDomainSpecs>
                    <AppDomainSpec Name="MyDomain1" SecondsIdleBeforeShutdown="-1" SecondsEmptyBeforeShutdown="12000">
                        <BaseSetup>
                            <PrivateBinPath>c:\PathForAppDomain1</PrivateBinPath>
                        <PrivateBinPath>PrivateBinPath_0</PrivateBinPath>
<PrivateBinPathProbe>PrivateBinPathProbe_0</PrivateBinPathProbe>
</BaseSetup>
                    </AppDomainSpec>
                    <AppDomainSpec Name="MyFrequentlyUnloadingDomainMyTrashyDomain" SecondsIdleBeforeShutdown="60" SecondsEmptyBeforeShutdown="60" />
                </AppDomainSpecs>
                <!--
                    <!--
The PatternAssignmentRules and ExactAssignmentRules control assignment of assemblies to app domains.
                    When a message arrives, the name of its corresponding orchestration's assembly is determined. Then, the assembly is assigned an app domain name. The rules guide this assignment. Exact rules are consulted first, in their order of definition, and then the pattern rules. The first match is used.
                    If no match is found, the assembly will be assigned to an ad-hoc domain. The configuration and number of assemblies per ad-hoc domain is controlled by the AssembliesPerDomain attribute and the DefaultSpec section.
                -->
               -->
- <ExactAssignmentRules>
                    <!--
                        <!--
An exact assembly rule specifies a strong assembly name and an app domain name. If the strong assembly name equals the rule's assembly name, it is assigned to the corresponding app domain.
                    -->-->
                    <ExactAssignmentRule AssemblyName="BTSAssembly1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=9c7731c5584592ad"
                       AssemblyName_0" AppDomainName="MyDomain1" />AppDomainName_1" />
                    <ExactAssignmentRule AssemblyName="BTSAssembly2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=9c7731c5584592ad"AssemblyName_0" AppDomainName="AppDomainName_1" />
                        AppDomainName="MyFrequentlyUnloadingDomain " />
                <ExactAssignmentRule AssemblyName="AssemblyName_0" AppDomainName="AppDomainName_1" />
</ExactAssignmentRules>
                <PatternAssignmentRules>
                    <!--
                        <!--
A pattern assignment rule specifies a regular expression and an app domain name. If the strong assembly name matches the expression, it is assigned to the corresponding app domain. This allows version independent assignment, assignment by public key token, or assignment by the custom assembly key.
                    -->-->
                    <!--
                        assign all assemblies with name BTSAssembly3, regardless of version and public key,
                        to the MyDomain1 app domain
                    -->
                    <PatternAssignmentRule AssemblyNamePattern=" BTSAssembly3, Version=\d.\d.\d.\d, Culture=neutral, PublicKeyToken=.{16}"AssemblyNamePattern_0" AppDomainName=" MyDomain1" />
                <PatternAssignmentRule AssemblyNamePattern="AssemblyNamePattern_0" AppDomainName="AppDomainName_1" />
<PatternAssignmentRule AssemblyNamePattern="AssemblyNamePattern_0" AppDomainName="AppDomainName_1" />
</PatternAssignmentRules>
            </AppDomains>
        </Configuration>
    </xlangs>
</configuration>

Ändern anderer Abschnitte der Datei "BTSNTSvc.exe.config"

Informationen zum Ändern der Dehydrierungswerte in BTSNTSvc.exe.config finden Sie unter Dehydrierungsstandardeigenschaften.

Die Konfigurationsdatei BTSNTSvc.exe enthält eine Reihe weiterer Abschnitte, die in "Allgemeine Referenz zu .NET Framework" dokumentiert sind. Weitere Informationen zur Änderung dieser Abschnitte finden Sie im Konfigurationsdateischema der .NET Framework Allgemeine Referenz unter https://go.microsoft.com/FWLink/?LinkID=52964.

Zusätzlich zu BizTalk-spezifischen Konfigurationsinformationen ist die BTSNTSvc.exe.config-Datei auch der Ort, an dem .NET-Anwendungskomponenten, die im Kontext einer Orchestrierung, eines Adapters oder einer Pipeline ausgeführt werden, ihre Konfigurationsinformationen zur Laufzeit mithilfe des .NET <appSettings-Standardtags> unter dem <Konfigurationstag> abrufen. Da BizTalk bereits einen Mechanismus für benutzerdefinierte Adapter und Pipelinekomponenten zum Abrufen von Konfigurationsinformationen bietet, wird das <appSettings-Tag> in der BTSNTSvc.exe.config-Datei in der Regel von benutzerdefinierten .NET-Komponenten verwendet, die aus einer Orchestrierung aufgerufen werden. Beispiel:

<appSettings>
     <add key="configParamName" value="configParamValue" />
</appSettings>

Nachrichteneinschränkung per Orchestrierung

Diese Eigenschaft wird in der Datei btsntsvc.exe.config festgelegt und verhindert, dass von einer Orchestrierung zu viel Speicherplatz in Anspruch genommen wird, indem die mögliche Anzahl der ausstehenden Nachrichten beschränkt wird. Alle Nachrichten werden weiterhin an die MessageBox übermittelt; Nachrichten in der Warteschlange werden jedoch erst nach Verarbeitung einiger der ausstehenden Nachrichten an die Orchestrierung übergeben.

Um diese Eigenschaft in der btsntsvc.exe.config-Datei (im BizTalk Server Stammverzeichnis) anzugeben, fügen Sie unter Anwendungsknoten den folgenden Parameter hinzu:

<configuration>
            <application>
                        <Throttling PauseAt="100" ResumeAt="50" />
            </application>
</configuration>

In diesem Beispiel werden von der MessageBox keine weiteren Nachrichten gesendet, sobald sich in der Orchestrierung 100 ausstehende Nachrichten befinden. Wenn sich die Anzahl der ausstehenden Nachrichten in der Orchestrierung auf 50 reduziert hat, können von der MessageBox weitere Nachrichten gesendet werden. Sie können andere Werte angeben.

Dieses Feature muss ebenfalls für die einzelnen Hosts in der Datenbank aktiviert werden. Um die Nachrichteneinschränkung für einen Host zu aktivieren, müssen Sie in der BizTalkMsgBoxDb-Datenbank die Tabelle dbo.Applications bearbeiten. Legen Sie für jeden Host, den Sie die Nachrichtendrosselung pro Orchestrierung aktivieren möchten, das fAttributes-Flagbit auf 1 fest. Nur die Hosts, deren fAttribute auf 1 festgelegt ist, erlauben die Nachrichtendrosselung pro Orchestrierung.

Weitere Informationen

Debuggen von OrchestrierungenXLANG-s Language