openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1677859 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/conversation/ConversationStorageBean.java
Date Tue, 05 May 2015 16:59:05 GMT
Author: struberg
Date: Tue May  5 16:59:05 2015
New Revision: 1677859

URL: http://svn.apache.org/r1677859
Log:
OWB-1050 send @Destroyed(ConversationScoped.class) events if the conversationcontext gets
destroyed

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

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/conversation/ConversationStorageBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/conversation/ConversationStorageBean.java?rev=1677859&r1=1677858&r2=1677859&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/conversation/ConversationStorageBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/conversation/ConversationStorageBean.java
Tue May  5 16:59:05 2015
@@ -31,6 +31,7 @@ import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 
+import org.apache.webbeans.config.WebBeansContext;
 import org.apache.webbeans.context.ConversationContext;
 
 /**
@@ -49,9 +50,15 @@ public class ConversationStorageBean imp
     @Override
     public void destroy(Set<ConversationContext> instance, CreationalContext<Set<ConversationContext>>
context)
     {
+        if (instance == null || instance.size() == 0)
+        {
+            return;
+        }
+
+        ConversationManager conversationManager = WebBeansContext.currentInstance().getConversationManager();
         for (ConversationContext conversationContext : instance)
         {
-            conversationContext.destroy();
+            conversationManager.destroyConversationContext(conversationContext);
         }
     }
 



Mime
View raw message