Spring.NET + NHibernate-具有OpenSessionInView的多个(不同的)数据库 [英] Spring.NET + NHibernate - Multiple (Distinct) Databases with OpenSessionInView

查看:125
本文介绍了Spring.NET + NHibernate-具有OpenSessionInView的多个(不同的)数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的Web应用程序中,我有2个完全不同的数据库-一个主要由CMS使用的数据库,我们希望从该数据库中获取同一网站上非CMS页面上的页面信息.其中包含完全不同的数据.

In my web application, I have 2 totally different databases - one that's being used mostly by a CMS from which we'd like to get page information on non CMS pages on the same website, & one that contains totally different data.

是否可以对两个数据库使用带有多个会话工厂的Spring.NET的Open Session in View模块,所以在这种情况下,我在spring.config中定义了Spring.Data.NHibernate.LocalSessionFactoryObject类型的2个对象?

Is it possible to use Spring.NET's Open Session In View module with multiple session factories for both of those databases, so in this case I have 2 objects defined in spring.config of type Spring.Data.NHibernate.LocalSessionFactoryObject?

推荐答案

我认为您正在谈论与本论坛帖子中的用户相同的情况

I think you are talking about the same situation as the user in this forum post

http://forum.springframework.net/showthread.php?p=20720

让我知道该解决方案是否对您有用.

Let me know if that solutions works out for you.

干杯, 标记

这篇关于Spring.NET + NHibernate-具有OpenSessionInView的多个(不同的)数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆