openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1648007 - in /openwebbeans/trunk: webbeans-impl/src/main/java/org/apache/webbeans/conversation/ webbeans-spi/src/main/java/org/apache/webbeans/spi/plugins/ webbeans-tomcat6/src/main/java/org/apache/webbeans/web/tomcat/ webbeans-tomcat7/src...
Date Fri, 26 Dec 2014 18:47:18 GMT
Author: rmannibucau
Date: Fri Dec 26 18:47:17 2014
New Revision: 1648007

URL: http://svn.apache.org/r1648007
Log:
ability to get session id for conversaiont.begin(id)

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/conversation/ConversationImpl.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/conversation/ConversationManager.java
    openwebbeans/trunk/webbeans-spi/src/main/java/org/apache/webbeans/spi/plugins/OpenWebBeansWebPlugin.java
    openwebbeans/trunk/webbeans-tomcat6/src/main/java/org/apache/webbeans/web/tomcat/TomcatWebPlugin.java
    openwebbeans/trunk/webbeans-tomcat7/src/main/java/org/apache/webbeans/web/tomcat7/TomcatWebPlugin.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=1648007&r1=1648006&r2=1648007&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
Fri Dec 26 18:47:17 2014
@@ -181,6 +181,10 @@ public class ConversationImpl implements
         {
             isTransient = false;
             this.id = id;
+            if (this.sessionId == null)
+            {
+                this.sessionId = getSessionId();
+            }
             updateTimeOut();
             conversationManager.addConversationContext(this, (ConversationContext) webBeansContext.getBeanManagerImpl().getContext(ConversationScoped.class));
         }

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/conversation/ConversationManager.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/conversation/ConversationManager.java?rev=1648007&r1=1648006&r2=1648007&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/conversation/ConversationManager.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/conversation/ConversationManager.java
Fri Dec 26 18:47:17 2014
@@ -133,7 +133,8 @@ public class ConversationManager
         while (it.hasNext())
         {
             conv = (ConversationImpl) it.next();
-            if (conv.getSessionId().equals(sessionId))
+            String cSId = conv.getSessionId(); // can be null when set manually -> javax.enterprise.context.Conversation.begin(java.lang.String)()
+            if (cSId != null && cSId.equals(sessionId))
             {
                 map.put(conv, conversations.remove(conv));
             }

Modified: openwebbeans/trunk/webbeans-spi/src/main/java/org/apache/webbeans/spi/plugins/OpenWebBeansWebPlugin.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-spi/src/main/java/org/apache/webbeans/spi/plugins/OpenWebBeansWebPlugin.java?rev=1648007&r1=1648006&r2=1648007&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-spi/src/main/java/org/apache/webbeans/spi/plugins/OpenWebBeansWebPlugin.java
(original)
+++ openwebbeans/trunk/webbeans-spi/src/main/java/org/apache/webbeans/spi/plugins/OpenWebBeansWebPlugin.java
Fri Dec 26 18:47:17 2014
@@ -29,5 +29,5 @@ package org.apache.webbeans.spi.plugins;
  */
 public interface OpenWebBeansWebPlugin extends OpenWebBeansPlugin
 {
-    //Any future operations for web containers
+    String currentSessionId();
 }

Modified: openwebbeans/trunk/webbeans-tomcat6/src/main/java/org/apache/webbeans/web/tomcat/TomcatWebPlugin.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-tomcat6/src/main/java/org/apache/webbeans/web/tomcat/TomcatWebPlugin.java?rev=1648007&r1=1648006&r2=1648007&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-tomcat6/src/main/java/org/apache/webbeans/web/tomcat/TomcatWebPlugin.java
(original)
+++ openwebbeans/trunk/webbeans-tomcat6/src/main/java/org/apache/webbeans/web/tomcat/TomcatWebPlugin.java
Fri Dec 26 18:47:17 2014
@@ -129,4 +129,9 @@ public class TomcatWebPlugin extends Abs
         return false;
     }
 
+    @Override
+    public String currentSessionId()
+    {
+        return null; // TODO
+    }
 }

Modified: openwebbeans/trunk/webbeans-tomcat7/src/main/java/org/apache/webbeans/web/tomcat7/TomcatWebPlugin.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-tomcat7/src/main/java/org/apache/webbeans/web/tomcat7/TomcatWebPlugin.java?rev=1648007&r1=1648006&r2=1648007&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-tomcat7/src/main/java/org/apache/webbeans/web/tomcat7/TomcatWebPlugin.java
(original)
+++ openwebbeans/trunk/webbeans-tomcat7/src/main/java/org/apache/webbeans/web/tomcat7/TomcatWebPlugin.java
Fri Dec 26 18:47:17 2014
@@ -129,4 +129,9 @@ public class TomcatWebPlugin extends Abs
         return false;
     }
 
+    @Override
+    public String currentSessionId()
+    {
+        return null; // TODO
+    }
 }



Mime
View raw message