I'm using HibernateDaoSupport in Spring for Spring-Hibernate integration. I need to intercept all getCurrentSession calls and enable a filter and set a filter parameter value.
Hibernate supports CurrentSessionContext impls to intercept getCurrentSession calls. Spring provides an implementation of this called SpringSessionContext. But when using HibernateDaoSupport, Spring has it's own SessionHolder mechanism and getCurrentSession() never gets called and the interception never works. Is there a workaround for this?