每个请求spring.net的NHibernate会话/事务

编程入门 行业动态 更新时间:2024-10-28 22:30:28
本文介绍了每个请求spring的NHibernate会话/事务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

是否Spring.NET与NHibernate的任何支持(整合),将每个请求的ISession和交易?

Does Spring.NET have any support (integration) with NHibernate that would eneble per request ISession and transactions?

我foung 这个博客 ,但它是一个有点老,所以我想知道,如果事情已经向前移动了一点,可这已经集成在Spring框架,我只能用一些配置设置?

I foung this blog, but it is a bit old one so I want to know if things have moved forward a bit and may be this is already integrated in Spring framework and I can only set it up with some configuration?

推荐答案

是它,它被称为鉴于公开会议。交易支持是太多,但它不是自动每个请求一个事务。

Yes it has, it's called "open session in view". Transaction support is available too, but it's not automatically "one transaction per request".

我认为的好地方,你开始会的Spring文档NHibernate的快速入门。这两个概念是有解释的。

I think a good place for you to start would be the NHibernate quickstart in the Spring documentation. Both concepts are explained there.

只有只注意到了asp MVC的标签;我认为它应该工作,但我不能肯定。如果你正在使用asp MVC 3,你应该使用春1.3.2 ,这是由于近期发布。

Only just noticed the asp MVC tag; I think it should work, but I'm not quite sure. If you're using asp MVC 3, you should use Spring 1.3.2, which is due to release soon.

更多推荐

每个请求spring.net的NHibernate会话/事务

本文发布于:2023-06-04 22:11:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/506104.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:事务   spring   net   NHibernate

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!