Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Spring's OpenSessionInViewInterceptor doesn't seem to be working when run under hotswap agent #146
When running my spring application with hotswap agent (tested w/ 0.2 and 0.3), i get a
(replaced my application's qualified class names with
changed the title from
Spring's OpenSessionInViewInterceptor doesn't seem to be working
Spring's OpenSessionInViewInterceptor doesn't seem to be working when run under hotswap agent
Sep 20, 2016
Can you change interceptor to OpenSessionInViewFilter?
where OpenSessionInViewInterceptor has SessionFactory set during inicalization. Maybe we need to refresh this property after Hibernate refresh.
With JPA (EntityManager) everything works correctly.
Well, the problem is not related to interceptor or filter.. It is related to SpringSessionContext class sessionFactory field.. SpringSessionContext , sessionFactory object is not hoswap enhanced version, that is why we got lazy initialization expception.. As a workaround , I modified OpenSessionInViewFilter.lookupSessionFactory method..