随笔- 31
文章- 0
评论- 45
最新评论
明年我18 2011-11-08 10:30
@魂殇
这个一两句话很难说清楚,建议看看spring.net的源码
魂殇 2011-11-08 10:23
@向心力
您好,请教一下,Spring的TransactionSynchronizationManager如何使用?
海洋之 心 2011-03-14 08:43
铁路这些人不讲道理,告他们
郑州--飞猫 2011-01-24 20:00
只能精神上支持了,最好是找个媒体
卡斯地方了卡塞蒂飞 2011-01-24 18:02
只能精神上支持了
Ricebug 2011-01-24 15:45
支持一下
桀骜的灵魂 2010-09-14 11:46
@汪江涛
我也注意到这个问题,Spring.net没有线程级别属性配置吗?
汪江涛 2009-08-04 10:52
TransactionScope在不使用分布式事务时, 应该跟DbTransaction差不多, 似乎不用DTC。
温景良(Jason) 2009-07-06 17:46
呵呵,谢谢楼主
T101 2009-07-06 15:21
楼主,可以给这段加点注释吗,菜鸟看起来很吃力,谢谢!
if (!string.IsNullOrEmpty(manufactureName))
{
query = query.Join(
db.Manufactures.Where(
m => m.ManufactureName.Contains(manufactureName)),
v => v.Manufacture,
m => m,
(v, m) => v);
}
向心力 2009-05-28 23:36
感觉这个整合还存在缺陷,主要原因是spring的ioc容器对object的创建默认是singleton的,也就是说你上面的列子中,所有的线程取得的ObjectContext都是同一个对象,当一个线程操作数据库时,Connection被另外一个线程关闭了,就会出问题。当然可以设置singleton=false,但是这样每次又会创建新的ObjectContext了,感觉仍不是很好。
我认为应该再包一层,利用Spring的TransactionSynchronizationManager来管理不同线程下的Resource。
另外,对于事务管理这里,用TransactionScope来实现事务需要服务器开启dtc服务;而大部分应用下我们只需要一个数据库,所以运用DbTransaction来实现事务是最适合的;当存在分布式数据库应用的时候才用TransactionScope比较好。
我认为应该再包一层,利用Spring的TransactionSynchronizationManager来管理不同线程下的Resource。
另外,对于事务管理这里,用TransactionScope来实现事务需要服务器开启dtc服务;而大部分应用下我们只需要一个数据库,所以运用DbTransaction来实现事务是最适合的;当存在分布式数据库应用的时候才用TransactionScope比较好。
rock100 2009-05-11 15:14
好!very good!
mikelij 2009-05-10 20:17
很高兴你能写中英文文章。坚持下去! 这对我们学好英语很有用。
Very glad to know that you write posts in both Chinese and English. Keep up the work! This helps a lot on our English learning.
However, some minor things I would like to mention here:
>more and more developers interested in ADO.NET Entity Framework and hope to use it in their applications’ data access layer.
->more and more developers get interested in ADO.net Entity Framework and hope to use it in their applications' data access layer.
>I wrote an example describes this.
-> I wrote an example to describe this.
>After the understanding base on the previous code, we know that all we only need to do is using AOP ability from Spring.NET to inject transaction code arround ourself code of method.
->After understanding the previous code, we know that all we need to do is to use AOP ability from Spring.NET to inject transaction code arround the methods in our code.
Very glad to know that you write posts in both Chinese and English. Keep up the work! This helps a lot on our English learning.
However, some minor things I would like to mention here:
>more and more developers interested in ADO.NET Entity Framework and hope to use it in their applications’ data access layer.
->more and more developers get interested in ADO.net Entity Framework and hope to use it in their applications' data access layer.
>I wrote an example describes this.
-> I wrote an example to describe this.
>After the understanding base on the previous code, we know that all we only need to do is using AOP ability from Spring.NET to inject transaction code arround ourself code of method.
->After understanding the previous code, we know that all we need to do is to use AOP ability from Spring.NET to inject transaction code arround the methods in our code.
周巍 2009-05-10 00:23
@Jason.Wei
文章是我自己写的
文章是我自己写的
win 2009-05-09 23:31
--引用--------------------------------------------------
Jason.Wei: ,mark,
so ..i want to ask for this question....
well ,this article 's where get it ?
--------------------------------------------------------
brother, ni tai you cai la.
Jason.Wei: ,mark,
so ..i want to ask for this question....
well ,this article 's where get it ?
--------------------------------------------------------
brother, ni tai you cai la.
Jason.Wei 2009-05-09 21:46
,mark,
so ..i want to ask for this question....
well ,this article 's where get it ?
so ..i want to ask for this question....
well ,this article 's where get it ?
周巍 2009-03-01 23:08
@G yc {Son of VB.NET}
主要是因为公司都是使用英语,自己的英语不是很好,需要经常锻炼。
主要是因为公司都是使用英语,自己的英语不是很好,需要经常锻炼。

