title: Hibernate session management with Spring and JAX-WS
body: <p>I have an application that uses Hibernate for persistence and am attempting to implement a JAX-WS interface (exposing it using the Spring Framework).  I also have a service class (annotated with <code>@WebService</code> and <code>@WebMethod</code>) that calls methods in my persistence layer. I am getting exceptions (<code>LazyInitializationException</code>) when working with lazy loaded objects.  </p>
  
  <p>I ran into the same problem with Quartz jobs and was able to resolve it by wrapping my job bean with a <code>org.springframework.aop.framework.ProxyFactoryBean</code> and providing  <code>org.springframework.orm.hibernate3.HibernateInterceptor</code>.  I attempted to wrap my service bean with the <code>ProxyFactoryBean</code>, but received errors about the proxy not being an annotated web service.</p>
  
  <p>Is there a way to do the same type of thing in this case, or what would be the best approach to managing my hibernate sessions to take in this scenario?</p>