posted 15 years ago
HI all
I am using spring hibernate for my application .
I guess hibernate performs automatic dirty checking for any updates.
In my case even if i dont update/modify object , i could see lot of updates on my console (for complete graph of bject) on submission of form.
Please let me know if need to do any thing explicitly to have dirty checking feature.
IN my applicationContext , I am using ..
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource"></property>
<property name="mappingResources">
<list>
<value><my .hbm files></value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.OracleDialect</prop>
<prop key="hibernate.query.substitutions">true=1 false=0</prop>
<prop key="hibernate.show_sql">true</prop>
</props>
</property>
</bean>
<!-- The Hibernate interceptor -->
<bean id="hibernateInterceptor" class="org.springframework.orm.hibernate3.HibernateInterceptor">
<property name="sessionFactory"><ref bean="sessionFactory"/></property>
</bean>
<!-- Hibernate Transaction manager -->
<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory"></property>
</bean>
<!-- Bean Configuration for the HibernateTemplate-->
<bean name="hibernateTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
<bean id="myDao" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="target">
<bean class="MyDaoImpl">
<property name="sessionFactory"><ref local="sessionFactory"/></property>
</bean>
</property>
<property name="proxyInterfaces">
<value>MyDao</value>
</property>
<property name="interceptorNames">
<list>
<value>hibernateInterceptor</value>
</list>
</property>
</bean>
Thanks
Vikas
Thanks
Vikas Sharma
SCJP(1.4)