snelson
02-07-2007, 12:03 AM
Hi
I'm using Spring.net latest source with nHibernate to integrate into an existing ASP.NET 2.0 app but having problems debugging some problems I'm having.
Just as a little background - I use Spring with Java at work so I know the basics with regards to how it works just having some problems using the .NET version.
I have an aspects.xml, services.xml and dao.xml referenced from web.config
My DAOs are defined as:
<object id="UserDao" type="iLogistics.Core.Data.HibernateUserDao, iLogisticsCore">
<property name="SessionFactory" ref="SessionFactory" />
</object>
My manager/service code is defined as:
<object id="UserManager" type="iLogistics.Core.Managers.UserManager, iLogisticsCore">
<property name="UserDao" ref="UserDao" />
</object>
The SessionFactory is defined as:
<object id="SessionFactory" type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate12">
<property name="DbProvider" ref="DbProvider"/>
<property name="MappingAssemblies">
<list>
<value>iLogisticsCore</value>
</list>
</property>
<property name="HibernateProperties">
<dictionary>
<entry key="hibernate.connection.provider" value="NHibernate.Connection.DriverConnectionProvider"/>
<entry key="hibernate.dialect" value="NHibernate.Dialect.MsSql2005Dialect"/>
<entry key="hibernate.connection.driver_class" value="NHibernate.Driver.SqlClientDriver"/>
</dictionary>
</property>
</object>
And finally the dbprovider is defined as:
<db:dbProvider id="DbProvider" provider="SqlServer-2.0" connectionString="Data Source=${db.datasource};Database=${db.database};Tr usted_Connection=true" />
The DAO isn't getting injected into the Manager/Service. If you could give me a start to debug this I'd be most grateful.
Many thanks
snelson
BTW Really glad that Spring is available on .NET as this will help with testing and future expansion of the system. Thanks to the developers.
I'm using Spring.net latest source with nHibernate to integrate into an existing ASP.NET 2.0 app but having problems debugging some problems I'm having.
Just as a little background - I use Spring with Java at work so I know the basics with regards to how it works just having some problems using the .NET version.
I have an aspects.xml, services.xml and dao.xml referenced from web.config
My DAOs are defined as:
<object id="UserDao" type="iLogistics.Core.Data.HibernateUserDao, iLogisticsCore">
<property name="SessionFactory" ref="SessionFactory" />
</object>
My manager/service code is defined as:
<object id="UserManager" type="iLogistics.Core.Managers.UserManager, iLogisticsCore">
<property name="UserDao" ref="UserDao" />
</object>
The SessionFactory is defined as:
<object id="SessionFactory" type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate12">
<property name="DbProvider" ref="DbProvider"/>
<property name="MappingAssemblies">
<list>
<value>iLogisticsCore</value>
</list>
</property>
<property name="HibernateProperties">
<dictionary>
<entry key="hibernate.connection.provider" value="NHibernate.Connection.DriverConnectionProvider"/>
<entry key="hibernate.dialect" value="NHibernate.Dialect.MsSql2005Dialect"/>
<entry key="hibernate.connection.driver_class" value="NHibernate.Driver.SqlClientDriver"/>
</dictionary>
</property>
</object>
And finally the dbprovider is defined as:
<db:dbProvider id="DbProvider" provider="SqlServer-2.0" connectionString="Data Source=${db.datasource};Database=${db.database};Tr usted_Connection=true" />
The DAO isn't getting injected into the Manager/Service. If you could give me a start to debug this I'd be most grateful.
Many thanks
snelson
BTW Really glad that Spring is available on .NET as this will help with testing and future expansion of the system. Thanks to the developers.