1 Reply Latest reply on Apr 20, 2008 6:36 PM by virlene

    OpenSessionInViewFilter - lazy loading issue

      I am getting LazyInitializationException when I try to load lazy data using Hibernate lazy mapping. I have configured OpenSessionViewInFilter for mxml servlet but it doesn't seem to be working.
      If I use this filter for my custom servlet other than Flex servlet, lazy loading works fine. Am I missing anything?

      Here is my environment.

      Backend - Spring Services(exposed as RMI) , Hibernate and SQL Server- deployed in JBoss as a webapp1.
      Frontend - Spring, Flex, FDS, JBoss - deployed as a web app2.
      - Assembler class(extends AbstractAssembler) for accessing spring services from webapp1.

      Here is the snippet of code.
      <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter- class>


      <destination id="forms">
      <adapter ref="java-dao" />
      <identity property="formID" type="java.lang.Long"/>


      public class FormsAssembler extends AbstractAssembler
      FormService formService;

      public void setFormService(FormService formService)
      this.formService = formService;

      public Collection fill(List fillParameters)
      return formService.getActiveForms();

      -- other methods