I have to use OpenSessionInViewInterceptor in a non-web application. I have configured OSV Interceptor as follows,
<bean id="openSessionInViewInterceptor" class="org.springframework.orm.hibernate3.support.OpenSessionInViewInterceptor">
<property name="sessionFactory"><ref bean="sessionFactory"/></property>
</bean>
I'm getting a Lazy load exception. Any pointers to where I'm going wrong? Is the configuration correct?
Or does a non-web app require OpenSessionInViewFilter instead of interceptor?
Thanks!