Uploaded image for project: 'OpenWebBeans'
  1. OpenWebBeans
  2. OWB-1235

ConversationScope destroyed upon session serialization/deserialization

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.4
    • 2.0.5
    • Enterprise Web Beans
    • None

    Description

      Hello,

      I'm using OWB with Apache Tomcat 9. Whenever the session manager persists and later restores the session, my Conversations fail to restore.

      The session is persisted and restored e.g. wehn Tomcat is restarted or when using the org.apache.catalina.session.PersistentManager.

       

      I debugged during the session restore process and noticed that org.apache.webbeans.context.SessionContext is instantiated multiple times. When JSF (Mojarra 2.3.3) tries to restore the ConversiationScope, a SessionContext instance with empty componentInstanceMap is consulted - although one of the mentioned instances  restored actually got the componentInstanceMap populated during session restore.

       

      The Exception looks like this:

      javax.enterprise.context.NonexistentConversationException: Propogated conversation with cid=1 cannot be restored. Will create a new transient conversation.
      at org.apache.webbeans.conversation.ConversationManager.getConversationContext(ConversationManager.java:108) ~[openwebbeans-impl-2.0.4.jar:2.0.4]
      at org.apache.webbeans.web.context.WebContextsService.getConversationContext(WebContextsService.java:770) ~[openwebbeans-web-2.0.4.jar:2.0.4]
      at org.apache.webbeans.web.context.WebContextsService.getCurrentContext(WebContextsService.java:286) ~[openwebbeans-web-2.0.4.jar:2.0.4]
      at org.apache.webbeans.container.BeanManagerImpl.getContext(BeanManagerImpl.java:284) ~[openwebbeans-impl-2.0.4.jar:2.0.4]
      at org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.getContextualInstance(NormalScopedBeanInterceptorHandler.java:89) ~[openwebbeans-impl-2.0.4.jar:2.0.4]
      at org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.get(NormalScopedBeanInterceptorHandler.java:71) ~[openwebbeans-impl-2.0.4.jar:2.0.4]

      Attachments

        Activity

          People

            struberg Mark Struberg
            holger.sunke@bodo-peters.de Holger Sunke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: