Sven Haiges wrote:
What I actually need is something like the Spring
OpenSessionInViewInterceptor just for CXF calls. A new Hibenrate
session should be opened with each incoming call ot a service method
and closed after completion.
Is this available fro CXF? If not, would it be diffcult to implement?
Spring's HibernateInterceptor should do what you're after:
<bean id="hibernateInterceptor"
class="org.springframework.orm.hibernate.HibernateInterceptor">
<property name="sessionFactory" ref="..." />
</bean>
<bean id="realServiceImpl" class="my.service.Impl">
...
</bean>
<bean id="serviceImpl"
class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="target"><ref local="realServiceImpl"/></property>
<property name="interceptorNames">
<list>
<idref local="hibernateInterceptor" />
</list>
</property>
</bean>
<jaxws:endpoint implementor="#serviceImpl"
implementorClass="my.service.Impl" ... />
Ian
--
Ian Roberts | Department of Computer Science
[EMAIL PROTECTED] | University of Sheffield, UK