8 Replies Latest reply on Jul 10, 2008 4:25 PM by Rene Felgenträger

    org.hibernate.LazyInitializationException - Why?

    Troy Tarrrant Newbie

      Hi All,


      Why do we still get random hibernate lazy initilaization exceptions from the EL when seam is managing the transactions and hibernate session grrrr!! Seam v2.0.GA



      My first day of going live and after weeks of testing, nothing, then this pops up in the logs: random!!


      Any ideas??



      ERROR [org.hibernate.LazyInitializationException] failed to lazily initialize a collection of role: vote.Member.candidates, no session or session was closed
      org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: vote.Member.candidates, no session or session was closed
              at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:358)
              at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:350)
              at org.hibernate.collection.AbstractPersistentCollection.readElementExistence(AbstractPersistentCollection.java:132)
              at org.hibernate.collection.PersistentBag.contains(PersistentBag.java:239)
              at vote.Member.notInWatchList(Member.java:34)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:328)
              at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:273)
              at org.jboss.el.parser.AstMethodSuffix.getValue(AstMethodSuffix.java:59)
              at org.jboss.el.parser.AstValue.getValue(AstValue.java:67)
              at org.jboss.el.parser.AstOr.getValue(AstOr.java:26)
              at org.jboss.el.parser.AstAnd.getValue(AstAnd.java:21)
              at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
              at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
              at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:370)
              at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:276)
              at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
              at org.ajax4jsf.renderkit.html.AjaxOutputPanelRenderer.encodeChildren(AjaxOutputPanelRenderer.java:79)
              at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
              at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
              at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
              at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
              at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
              at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
              at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:189)
              at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
              at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
              at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73)
              at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:154)
              at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:260)
              at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:366)
              at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:493)
              at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
              at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
              at java.lang.Thread.run(Thread.java:595)
      2008-07-09 15:02:26,695 ERROR [STDERR] Jul 9, 2008 3:02:26 PM com.sun.facelets.FaceletViewHandler handleRenderException
      SEVERE: Error Rendering View[/candidateView.xhtml]
      javax.faces.FacesException: javax.el.ELException: /candidateView.xhtml @76,272 rendered="#{(member.id == -1 or member.notInWatchList(currentCandidate)) and !identity.hasRole('candidate')}": org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: vote.Member.candidates, no session or session was closed
              at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:373)
              at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:276)
              at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
              at org.ajax4jsf.renderkit.html.AjaxOutputPanelRenderer.encodeChildren(AjaxOutputPanelRenderer.java:79)
              at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
              at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
             ...
              at java.lang.Thread.run(Thread.java:595)
      Caused by: javax.el.ELException: /candidateView.xhtml @76,272 rendered="#{(member.id == -1 or member.notInWatchList(currentCandidate)) and !identity.hasRole('candidate')}": org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: vote.Member.candidates, no session or session was closed
              at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:76)
              at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:370)
              at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:276)
              at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
              at org.ajax4jsf.renderkit.html.AjaxOutputPanelRenderer.encodeChildren(AjaxOutputPanelRenderer.java:79)
              at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
              at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
              at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
              at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
              at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
              at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
              at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:189)
              at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
              at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
              at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
              ... 38 more
      Caused by: org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: vote.Member.candidates, no session or session was closed
              at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:358)
              at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:350)
              at org.hibernate.collection.AbstractPersistentCollection.readElementExistence(AbstractPersistentCollection.java:132)
              at org.hibernate.collection.PersistentBag.contains(PersistentBag.java:239)
              at vote.Member.notInWatchList(Member.java:34)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:328)
              at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:273)
              at org.jboss.el.parser.AstMethodSuffix.getValue(AstMethodSuffix.java:59)
              at org.jboss.el.parser.AstValue.getValue(AstValue.java:67)
              at org.jboss.el.parser.AstOr.getValue(AstOr.java:26)
              at org.jboss.el.parser.AstAnd.getValue(AstAnd.java:21)
              at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
              at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
              ... 53 more
      2008-07-09 15:02:26,914 ERROR [org.jboss.seam.web.ExceptionFilter] exception root cause
      javax.el.ELException: /candidateView.xhtml @76,272 rendered="#{(member.id == -1 or member.notInWatchList(currentCandidate)) and !identity.hasRole('candidate')}": org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: vote.Member.candidates, no session or session was closed
              at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:76)
              at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:370)
              at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:276)
              at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
              at org.ajax4jsf.renderkit.html.AjaxOutputPanelRenderer.encodeChildren(AjaxOutputPanelRenderer.java:79)
              at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
              at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
              at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
              at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
              at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
              at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
              at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:189)
              at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
              at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
              at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73)
              at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:154)
              at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:260)
              at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:366)
              at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:493)
              at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
              at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
              at java.lang.Thread.run(Thread.java:595)
      Caused by: org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: vote.Member.candidates, no session or session was closed
              at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:358)
              at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:350)
              at org.hibernate.collection.AbstractPersistentCollection.readElementExistence(AbstractPersistentCollection.java:132)
              at org.hibernate.collection.PersistentBag.contains(PersistentBag.java:239)
              at vote.Member.notInWatchList(Member.java:34)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:328)
              at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:273)
              at org.jboss.el.parser.AstMethodSuffix.getValue(AstMethodSuffix.java:59)
              at org.jboss.el.parser.AstValue.getValue(AstValue.java:67)
              at org.jboss.el.parser.AstOr.getValue(AstOr.java:26)
              at org.jboss.el.parser.AstAnd.getValue(AstAnd.java:21)
              at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
              at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
              ... 53 more
      2008-07-09 15:02:27,164 INFO  [vote.AdvertisingAction] getNextAd():type=top;ab=vote.AdvertisingBanner@181882a;size=1
      2008-07-09 15:02:27,164 INFO  [javax.enterprise.resource.webcontainer.jsf.lifecycle] WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.
      sourceId=null[severity=(INFO 0), summary=(failed to lazily initialize a collection of role: vote.Member.candidates, no session or session was closed), detail=(failed to lazily initialize a collection of role: vote.Member.candidates, no session or session was closed)]


        • 1. Re: org.hibernate.LazyInitializationException - Why?
          Rene Felgenträger Newbie

          Nobody can help you, if u dont provide enough (useful) information.


          what does your session bean look like?
          what kind of context are you using (conversation, page, event) ?
          Maybe you close the context accidently by an @End - Annotation ?


          Greetings

          • 2. Re: org.hibernate.LazyInitializationException - Why?
            Stacey Vetzal Newbie

            I've seen this style exception before - and I wonder if our circumstances are similar. For us, it happens more regularly under load and during concurrent AJAX requests using the RichFaces library.


            Our beans are stateful session beans, no conversations, with a Seam managed Hibernate session. Are you using conversations? How about AJAX or multiple concurrent browser windows/tabs on the same session?

            • 3. Re: org.hibernate.LazyInitializationException - Why?
              Daniel Hinojosa Master

              Vote.Member was created in one smaller context and was transfered to a bigger context.  The smaller context died, and the bigger context had a reference to a object that couldn't load your collection.


              • 4. Re: org.hibernate.LazyInitializationException - Why?
                Rene Felgenträger Newbie

                As far as i know and to keep things simple, u can avoid LIE exceptions by considering this:



                1) us the SMPC (Seam Managed Persistence Context), your code could look like this (assuming you configed entityManager which is the default...)



                @In(value="entityManager")
                private EntityManager em




                or



                @In
                private EntityManager entityManager;





                2) your context scope must be big enough: in general a CONVERSATION scope is sufficient. In case of using a SMPC your a actually obliged to use CONVERSATION as the functionality of SMPC is more or less bound to a CONVERSATION.


                3) Multiple AJAX-calls should be restricted by the same eventQueue, in order to avoid any concurrent-Exception


                As i said, this are my experiences with LIE und SMPC and pls correct me, if i am wrong.


                Greetings

                • 6. Re: org.hibernate.LazyInitializationException - Why?
                  Stacey Vetzal Newbie

                  Daniel Hinojosa wrote on Jul 10, 2008 07:50:

                  Vote.Member was created in one smaller context and was transfered to a bigger context.  The smaller context died, and the bigger context had a reference to a object that couldn't load your collection.


                  Hi Daniel,


                  How did you come to the conclusion that it was this? Was there something specific in the exception that hinted at it? Or was it simply that this is the logical reason this exception would be seen in normal circumstances?


                  In our application we're not using conversations, but I'm willing to accept that perhaps somewhere something is getting thrown to a conversational scope accidentally... certainly something worth auditing for.


                  Steve


                  • 7. Re: org.hibernate.LazyInitializationException - Why?
                    Stacey Vetzal Newbie

                    Rene Felgenträger wrote on Jul 10, 2008 12:45:

                    1) us the SMPC (Seam Managed Persistence Context), your code could look like this (assuming you configed entityManager which is the default...)


                    Don't forget you could also use a Seam managed Hibernate session. Make sure you've set up a transaction manager that's appropriate for you (we got strange problems when we accidentally moved away from ejb-transaction).



                    3) Multiple AJAX-calls should be restricted by the same eventQueue, in order to avoid any concurrent-Exception


                    I'd add to this and say that if you have an application that allows multiple browser windows or tabs to be open for a single user session, make sure you're using conversations to keep them separate and keep your objects in conversational contexts. Just don't forget about the transactional semantics and that the 1st level cache in Hibernate will keep you from seeing any changing data in your database until the conversation completes.


                    I have problems with multiple browser windows/tabs open to the same set of objects in Session scope right now. Dealing with lots of LIEs like illegal attempt to associate a collection with two open sessions. Lots of lazy-loaded associations and a very free-form UI with a great deal of AJAX.


                    Does anyone know specifically the scope of the RichFaces eventQueue? Does it extend to all browser windows/tabs open or only to a single window?

                    • 8. Re: org.hibernate.LazyInitializationException - Why?
                      Rene Felgenträger Newbie

                      Steven Vetzal wrote on Jul 10, 2008 15:35:


                      Does anyone know specifically the scope of the RichFaces eventQueue? Does it extend to all browser windows/tabs open or only to a single window?


                      Not sure, but i assume that the eventQueue is associated with the backing beans scope. So, if a new tab causes the creation of a new scope (and therefore the necessary instanciation of the components), the eventQueues-Scope (in the new tab) will be associated with that one.


                      So we still have the problem that several instances are dealing with the same entities and have the risk of illegal attempts.


                      The thing is, that the SMPC is able to handle concurrent access to the entities within ONE and THE SAME CONVERSATION.(I think it cannot handle concurrent entity manipulation form DIFFERENT CONVERSATIONS).


                      greetings