zoukankan      html  css  js  c++  java
  • wcf事务(随记)

    ----------------------------------------------------wcf事务:
    1.ACID:原子性、一致性、隔离性、持久性;
    2.事务:添加命名空间(using System.Transactions;)
    using (TransactionScope ts = new TransactionScope())
                {
                    //操作
                    ts.Complete();
                }
    --支持事务流的绑定:NetNamedPipeBinding,nettcpbinding,wshttpbinding,
    --在绑定的配置文件;缺省为false;
    <binding name="" transactionFlow="true">
    --通过代码打开事务流:
      NetTcpBinding nb = new NetTcpBinding();
                nb.TransactionFlow = true;
    --服务契约中:
      [TransactionFlow(TransactionFlowOption.Allowed)]
    --传输协议选项:
    <binding name="" transactionFlow="true" transactionProtocol="WSAtomicTransaction11">
    --设置事务超时:
       <behaviors>
          <serviceBehaviors>
            <behavior name="AllenBehavior">
              <serviceMetadata httpGetEnabled="true" />
              <serviceDebug includeExceptionDetailInFaults="false" />
       <serviceTimeouts transactionTimeout="00:20:00"/>
      </behavior>
          </serviceBehaviors>
    或者是:
       [ServiceBehavior(TransactionTimeout="00:20:00")]
        public class guo : Iguo

  • 相关阅读:
    thinkphp hook 钩子
    获取阿里云镜像仓库中镜像的tag
    Ingress 应用
    Ingress 端口转发
    Prometheus jmx_exporter
    Prometheus中的黑盒监控blackbox
    Prometheus监控k8s中使用exporter的服务
    Prometheus监控k8s中带有metrics的服务
    Prometheus operator
    Kubernetes 外部访问集群内部服务
  • 原文地址:https://www.cnblogs.com/guozefeng/p/3427934.html
Copyright © 2011-2022 走看看