计算机nemurt.dll,DDD~领域事件中使用分布式事务

对于一个聚合来说,它可能会被附加很多事件,这里我们叫它领域事务,因为一个聚会我们可以把它理解成一个领域,一个业务。对于领域事件不清楚的同学可以看看我的这篇文章《DDD~领域事件与事件总线》,里面有详细的说明,今天主要说一下领域里的事务,即领域事件的数据处理和主逻辑里的数据处理在同一事务里完成。

知识准备

SQL2005环境使用TransactionScopeNoMsdtc事务,它是占占开发的,原理是将一批操作包裹到一个SqlConnection里,由开发者维护接连的关闭,这也是使用时要特别注意的地方,因为如果不关闭连接,SQL链接池会益出。

SQL2008环境使用微软自己的分布式事务实现TransactionScope,它对于同一个上下文来说,是不会被提升为分布式事务的,这一点对SQL2005要强很多。

代码实践

///

/// 添加WebSystem表时,所需要的事件对象

///

[Serializable]

public class WebSystemCreateEvent : EventBase

{

///

/// 数据上下文,它与架构无关,可以是Linq2Sql,EF,ADO.NET

///

public IUnitOfWork UnitOfWork { get; set; }

///

/// 对象主键

///

public int ID { get; set; }

}

[HttpPost]

public ActionResult WebSystem(FormCollection form)

{

//订阅领域事件

EventBus.Instance.Subscribe(i =>

{

var entity1 = new DbContextRepository(i.UnitOfWork).Find(i.ID);

entity1.WebSystemName = entity1.WebSystemName + "更新了";

new DbContextRepository(i.UnitOfWork).Update(entity1);

});

IUnitOfWork UnitOfWork = new backgroundEntities1();

var db = new DbContextRepository(UnitOfWork);

using (TransactionScope trans = new TransactionScope())

{

var entity = new WebSystem

{

Info = form["Info"],

Status = Convert.ToInt32(form["Status"]),

WebSystemName = form["WebSystemName"]

};

db.Insert(entity);

//发布领域事务

EventBus.Instance.Publish(new WebSystemCreateEvent

{

ID = entity.WebSystemID,

UnitOfWork = UnitOfWork,

});

trans.Complete();

}

return RedirectToAction("WebSystemList");

}

SQL截图

TransactionScopeNoMsdtc截图

597a0613e2fc9e9dda5ddc9af9de75bd.png

TransactionScope截图

47694a264be471c3999ffbdb041d601e.png

本地WWW网站服务器的MSDTC为禁用状态

aaarticlea/png;base64,iVBORw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pO+YvIYjS2OnPGy43Fb5bUYPMKdSZ/iUXWJvvFi7/td5hF4vursNGgM/A69emMrGns9rMtnSU6VXX/ZtPWE1myNnZ7fzurscMQfFfVkBPobASpVmeOuWpaeWloUmf+LXbCr1JrTUvlOsu2uTZc8XVm15A3pKTjCg85gc5GkMp1lk1RclZHf7PpD5xs479V4agrGbIvIGcjyXOz6csxqLySQ06gsxGkQp35Iguqqr4lW3dWZ1zjXqzOnMdkiScm/c2m8y50Bqqn8tUZ+W+iXq1URadWZ35joab8qCsZsu2vhNdZgZtN/1cKfpvyQ06gsxGkVp1xyxB75te6TmlYZ8Gbyt6tzuyNbLHmrLMK3GySzaAzUJbKdZZN0VFYnQV9HRxvj3SWeMbR32wm1irP7tl5JAedgVI0f7NJvls5ja3OnLELAyfH232dJUt+WKywzuwe7J79RV8lQ06gsxGkWp3Z3TovfX/VeufVls5yyauzN5v2SoosCWW31PpfK7kjkl2VOSnQGXidmnTWOs3rrAtUuDrLnpdxhevWbsD17HdV+ZAT6GwEgc5iokKd9QXoDLyO0ZlwW9HfAp2N8pAT6GwEGQwGY/EWTmcti7bOMsborO24aizkkBPobAQhn8fHVPwht+nXRgqGbIDOAACRAJ0BACIBOgMARAJ0BgCIBOgMABAJ0BkAIBKgMwBAJLyus9Y+EoeCgoJSURkbGxs0/BE4FBQUlJrK/wN4F8DfNXjjMAAAAABJRU5ErkJggg==" alt="" />

ABP在领域事件中异步调用方法抛异常

在领域事件中调用UserRegistrationManager.RegisterAsync抛异常 Call UserRegistrationManager.RegisterAsync() throw ...

DDD领域事件与事件总线源码下载

最近在看领域事件的文章.看到了“张占岭”的 原文地址:http://www.cnblogs.com/lori/p/3476703.html 遗憾的是没有提供下 ...

DDD~领域事件应用篇(订单处理变得更清晰)

回到目录 上一讲主要说了领域事件和领域总线,这并不是一个很容易理解的文章,所以本讲实例篇主要是为了补充上一讲的理论知识,本讲实例关注的是实际中的订单处理模块,我们知道,订单处理是电子商务的核心,往往在 ...

SpringBoot多数据源中的分布式事务

虽然现在微服务越来越流行,我们的系统随之也拆分出来好多的模块功能.这样做的目的其实就是为了弥补单体架构中存在的不足.随着微服务的拆分,肯定设计到分库分表,但这之中肯定设计到分布式事务.最典型的例子就是 ...

DDD~领域事件与事件总线

回到目录 谈谈它 终于有些眉目了,搜刮了很多牛人的资料,英文的,中文的,民国文的,终于小有成就了,同时也做了个DEMO,领域事件这东西好,但需要你明白它之后才会说好,而对于明白领域事件这件事来说,它的 ...

Sql Server中启用分布式事务小结

1.web服务器与数据库服务器同时启动msdtc服务 2. 2台服务器做出如下配置: 控制面板->管理工具->组件服务->计算机->我的电脑->本地DTC .Net示例: ...

.NET Core 事件总线,分布式事务解决方案:CAP

背景 相信前面几篇关于微服务的文章也介绍了那么多了,在构建微服务的过程中确实需要这么一个东西,即便不是在构建微服务,那么在构建分布式应用的过程中也会遇到分布式事务的问题,那么 CAP 就是在这样的背景 ...

.NET Core 事件总线,分布式事务解决方案:CAP 基于Kafka

背景 相信前面几篇关于微服务的文章也介绍了那么多了,在构建微服务的过程中确实需要这么一个东西,即便不是在构建微服务,那么在构建分布式应用的过程中也会遇到分布式事务的问题,那么 CAP 就是在这样的背景 ...

【转】.NET Core 事件总线,分布式事务解决方案:CAP

[转].NET Core 事件总线,分布式事务解决方案:CAP 背景 相信前面几篇关于微服务的文章也介绍了那么多了,在构建微服务的过程中确实需要这么一个东西,即便不是在构建微服务,那么在构建分布式应用 ...

随机推荐

perl 删除过期文件

#!/usr/bin/perl `find /bak/ >list.txt`; open LIST,"/root/list.txt"; while ( ...

Java SE、Java EE、Java ME

Java SE(Java Platform,Standard Edition).Java SE 以前称为 J2SE.它允许开发和部署在桌面.服务器.嵌入式环境和实时环境中使用的 Java 应用程序.J ...

Java事务处理全解析(四)—— 成功的案例(自己实现一个线程安全的TransactionManager)

在本系列的上一篇文章中我们讲到,要实现在同一个事务中使用相同的Connection对象,我们可以通过传递Connection对象的方式达到共享的目的,但是这种做法是丑陋的.在本篇文章中,我们将引入另外 ...

Redis操作+python

自动化接口测试中需要向redis中插入测试数据: 1. 连接redis: import redisself.r = redis.StrictRedis(host=env.REDIS_HOST, por ...

asp开发微信扫码支付

这个任务已经给了.现在正在学习开发中.主要注意的是2点. 1:返回参数的验证. 2:通知后业务处理和处理后返回财付通.大部分操作,api中已经处理好. 现在需要的业务逻辑部分. 需要正确3个参数  r ...

js四舍五入

7-13 向上取整ceil() 7-14 向下取整floor() 7-15 四舍五入round() 7-16 随机数 random()

View以自身中心旋转的代码解惑

matrix.preTranslate(-centerX, -centerY); matrix.postTranslate(centerX, centerY); 经常在中心旋转的应用中看到这段代码. ...

javascript 生成页面轮播元素

优化Java堆大小5温馨提示

总结:Java没有足够的堆大小可能会导致性能非常大的影响,这无疑将给予必要的程序,并不能带来麻烦.本文总结了影响Java居前五位的能力不足,并整齐地叠优化? 笔者Pierre有一个10高级系统架构师有 ...

day 15递归 匿名函数

三元表达式 目的是简化书写 局限性:三元表达式智能简化仅有两个分支的if判断,而且这个判断无论是否成立都必须要返回值 res = True if age >=18 else False 递归: ...

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值