openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1678077 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/AbstractContextsService.java
Date Wed, 06 May 2015 19:40:24 GMT
Author: struberg
Date: Wed May  6 19:40:24 2015
New Revision: 1678077

URL: http://svn.apache.org/r1678077
Log:
OWB-1050 properly fire @Destroyed(ConversationScoped.class) event

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/AbstractContextsService.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/AbstractContextsService.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/AbstractContextsService.java?rev=1678077&r1=1678076&r2=1678077&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/AbstractContextsService.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/AbstractContextsService.java
Wed May  6 19:40:24 2015
@@ -100,10 +100,11 @@ public abstract class AbstractContextsSe
      */
     public void destroyOutdatedConversations(ConversationContext currentConversationContext)
     {
+        ConversationManager conversationManager = null;
         Context sessionContext = getCurrentContext(SessionScoped.class, false);
         if (sessionContext != null && sessionContext.isActive())
         {
-            ConversationManager conversationManager = webBeansContext.getConversationManager();
+            conversationManager = webBeansContext.getConversationManager();
             Set<ConversationContext> conversationContexts = conversationManager.getSessionConversations(sessionContext,
false);
             if (conversationContexts != null)
             {
@@ -127,7 +128,8 @@ public abstract class AbstractContextsSe
             currentConversationContext.getConversation().iDontUseItAnymore();
             if (currentConversationContext.getConversation().isTransient())
             {
-                currentConversationContext.destroy();
+                conversationManager = conversationManager != null ? conversationManager :
webBeansContext.getConversationManager();
+                conversationManager.destroyConversationContext(currentConversationContext);
             }
         }
     }



Mime
View raw message