openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1664392 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/conversation/ConversationImpl.java
Date Thu, 05 Mar 2015 16:28:35 GMT
Author: rmannibucau
Date: Thu Mar  5 16:28:34 2015
New Revision: 1664392

URL: http://svn.apache.org/r1664392
Log:
ensure to get a session id for not transient conversations

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/conversation/ConversationImpl.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/conversation/ConversationImpl.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/conversation/ConversationImpl.java?rev=1664392&r1=1664391&r2=1664392&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/conversation/ConversationImpl.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/conversation/ConversationImpl.java
Thu Mar  5 16:28:34 2015
@@ -141,6 +141,7 @@ public class ConversationImpl implements
         {
             isTransient = false;
             id = Integer.toString(conversationIdGenerator.incrementAndGet());
+            ensureSessionId();
             iUseIt();
             updateTimeOut();
 
@@ -210,20 +211,25 @@ public class ConversationImpl implements
             isTransient = false;
             this.id = id;
             iUseIt();
-            if (this.sessionId == null)
-            {
-                OpenWebBeansWebPlugin web = webBeansContext.getPluginLoader().getWebPlugin();
-                if (web != null)
-                {
-                    this.sessionId = web.currentSessionId();
-                }
-            }
+            ensureSessionId();
             updateTimeOut();
 
             conversationManager.addConversationContext(this, getOrStartConversationScope());
         }
     }
-    
+
+    private void ensureSessionId()
+    {
+        if (this.sessionId == null)
+        {
+            OpenWebBeansWebPlugin web = webBeansContext.getPluginLoader().getWebPlugin();
+            if (web != null)
+            {
+                this.sessionId = web.currentSessionId();
+            }
+        }
+    }
+
     /**
      * {@inheritDoc}
      */



Mime
View raw message