问题是这样的:数据访问层使用的是Hhibernate,使用Spring.net代理事务。基于Mapping对象的操作,Spring能正常的代理事务。但使用Hhibernate的SQL操作,就无法启动事务。求教!
问题补充:
<?xml version="1.0" encoding="utf-8" ?>
<objects xmlns="http://www.springframework.net">
<object type="Spring.Objects.Factory.Config.PropertyPlaceholderConfigurer, Spring.Core">
<property name="ConfigSections" value="databaseSettings"/>
</object>
<db:provider id="DbProvider"
provider="OracleClient-2.0"
connectionString="Data Source=${db.datasource};User Id=${db.user};Password=${db.password};"/>
<object id="NHibernateSessionFactory" type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate20">
<property name="DbProvider" ref="DbProvider"/>
<property name="MappingAssemblies">
<list>
<value>Soft.ERP.Model</value>
</list>
</property>
<property name="HibernateProperties">
<dictionary>
<entry key="hibernate.connection.provider" value="NHibernate.Connection.DriverConnectionProvider"/>
<entry key="dialect" value="NHibernate.Dialect.Oracle9Dialect"/>
<entry key="hibernate.connection.driver_class" value="NHibernate.Driver.OracleClientDriver"/>
<entry key="hibernate.current_session_context_class" value="Spring.Data.NHibernate.SpringSessionContext, Spring.Data.NHibernate20"/>
<entry key="hibernate.query.factory_class" value="NHibernate.Hql.Classic.ClassicQueryTranslatorFactory" />
<entry key="hibernate.cache.provider_class" value="NHibernate.Caches.SysCache.SysCacheProvider, NHibernate.Caches.SysCache" />
<entry key="relativeExpiration" value="5" />
</dict