I am getting the LazyInitializationException:
I want to use OpenSessionInViewInterceptor as mentioned in a blog entry.. but didnt quite understand the first part <bean id="urlMapping" ...
How is this related to the rest of the configurations? A complete example of using or implementing this would be helpful..
Thanks.
<beans>
<bean id="urlMapping"
class="org.springframework.web.servlet.handler.Sim pleUrlHandlerMapping">
<property name="interceptors">
<list>
<ref bean="openSessionInViewInterceptor"/>
</list>
</property>
<property name="mappings">
...
</bean>
...
<bean name="openSessionInViewInterceptor"
class="org.springframework.orm.hibernate.support.O penSessionInViewInterceptor">
<property name="sessionFactory"><ref bean="sessionFactory"/></property>
</bean>
</beans>


Reply With Quote