<transactedBatching>

受信操作でトランザクション バッチがサポートされるかどうかを指定します。

スキーマの階層

<system.serviceModel>
  <behaviors>
    <endpointBehaviors>
      <endpointBehaviors> の <behavior>
        <transactedBatching>

構文

<transactedBatching maxBatchSize="Integer" />

属性と要素

以降のセクションでは、属性、子要素、および親要素について説明します。

属性

属性 説明

maxBatchSize

1 回のトランザクションでまとめてバッチ処理できる受信操作の最大数を指定する整数。既定値は 0 です。

子要素

なし。

親要素

要素 説明

<endpointBehaviors> の <behavior>

エンドポイントの動作を指定します。

解説

トランザクション バッチで構成されるトランスポートは、複数の受信操作を 1 つのトランザクションにバッチ処理しようとします。これを実行することにより、受信操作のたびに行うトランザクションの作成とそのコミットの比較的高いコストを回避できます。

構成ファイル内でサービスにトランザクション バッチ動作を追加する方法を次の例に示します。

<system.serviceModel>
  <services>
    <service name="Microsoft.ServiceModel.Samples.CalculatorService"
             behaviorConfiguration="CalculatorServiceBehavior">
      <host>
        <baseAddresses>
          <add baseAddress="https://localhost:8000/ServiceModelSamples/service"/>
        </baseAddresses>
      </host>

      <!-- Define NetMsmqEndpoint -->
      <endpoint address="net.msmq://localhost/private/ServiceModelSamples"
                binding="netMsmqBinding"
                contract="Microsoft.ServiceModel.Samples.IQueueCalculator" />

      <!-- the mex endpoint is explosed at https://localhost:8000/ServiceModelSamples/service/mex -->
      <endpoint address="mex"
                binding="mexHttpBinding"
                contract="IMetadataExchange" />
    </service>
  </services>

  <behaviors>
    <endpointBehaviors>
      <behavior name="endpointBehavior">
        <transactedBatching maxBatchSize="10" />
      </behavior>
    </endpointBehaviors>
    <serviceBehaviors>
      <behavior name="CalculatorServiceBehavior">
        <serviceMetadata httpGetEnabled="true" />
      </behavior>
    </serviceBehaviors>
  </behaviors>
</system.serviceModel>

参照

リファレンス

TransactedBatchingElement
TransactedBatchingBehavior