hucmuc
Sep 1st, 2004, 06:12 PM
My appContext has the following:
<bean id="sessionFactory" class="org.springframework.orm.hibernate.LocalSessionFact oryBean">
<property name="dataSource"><ref bean="dataSource"/></property>
<property name="mappingResources">
<list>
<value>org/appfuse/model/User.hbm.xml</value>
</list>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">net.sf.hibernate.dialect.PostgreSQLDialect</prop>
</props>
</property>
</bean>
<bean id="userDAO" class="org.appfuse.persistence.hibernate.UserDAOHibernate">
<property name="sessionFactory"><ref local="sessionFactory"/></property>
</bean>
If I look at the setSessionFactory in HibernateDAOSupport the type of the argument is net.sf.hibernate.SessionFactory. However, my sessionFactory in the configuration file is of type org.springframework.orm.hibernate.LocalSessionFact oryBean. LocalSessionFactoryBean is not a descendant of SessionFactory. How does spring convert this?
Dino
<bean id="sessionFactory" class="org.springframework.orm.hibernate.LocalSessionFact oryBean">
<property name="dataSource"><ref bean="dataSource"/></property>
<property name="mappingResources">
<list>
<value>org/appfuse/model/User.hbm.xml</value>
</list>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">net.sf.hibernate.dialect.PostgreSQLDialect</prop>
</props>
</property>
</bean>
<bean id="userDAO" class="org.appfuse.persistence.hibernate.UserDAOHibernate">
<property name="sessionFactory"><ref local="sessionFactory"/></property>
</bean>
If I look at the setSessionFactory in HibernateDAOSupport the type of the argument is net.sf.hibernate.SessionFactory. However, my sessionFactory in the configuration file is of type org.springframework.orm.hibernate.LocalSessionFact oryBean. LocalSessionFactoryBean is not a descendant of SessionFactory. How does spring convert this?
Dino