1 Reply Latest reply on Oct 28, 2007 7:20 AM by pmuir

    LazyInitializationException ans Scope(SESSION)

    mvlach

      Hi.

      I am using SMPC with Scope(CONVERSATION). All works good. But when I created action (EJB component) @Statefull, scoped to SESSION the lazy doesn't work. When I switch to the Scope(CONVERSATION) all works gut. I Think I need to use SESSION scope, but the lazy loading break this decision.


      Is there problem with Lazy and SESSION ?

      Thanks Mila

        • 1. Re: LazyInitializationException ans Scope(SESSION)
          pmuir

          Yes, your SMPC is scoped to the conversation, not the session. So after your first conversation ends, your object will no longer have an open persistence context to load lazily from. Search back through the forum, this has been discussed many times.