openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gerdo...@apache.org
Subject svn commit: r937336 - in /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans: component/ conversation/ el/ portable/creation/ spi/se/
Date Fri, 23 Apr 2010 15:32:56 GMT
Author: gerdogdu
Date: Fri Apr 23 15:32:55 2010
New Revision: 937336

URL: http://svn.apache.org/viewvc?rev=937336&view=rev
Log:
Update while running sample applications.

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractOwbBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionPointBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ProducerMethodBean.java
    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-impl/src/main/java/org/apache/webbeans/el/WebBeansELResolver.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/creation/InjectionTargetProducer.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/spi/se/DefaultContextsService.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractOwbBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractOwbBean.java?rev=937336&r1=937335&r2=937336&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractOwbBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractOwbBean.java
Fri Apr 23 15:32:55 2010
@@ -233,7 +233,7 @@ public abstract class AbstractOwbBean<T>
             e.printStackTrace();
         }finally
         {
-            CreationalContextImpl.currentRemoveObject.remove();
+            CreationalContextImpl.currentRemoveObject.set(null);
         }
     }
 

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionPointBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionPointBean.java?rev=937336&r1=937335&r2=937336&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionPointBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionPointBean.java
Fri Apr 23 15:32:55 2010
@@ -46,7 +46,7 @@ public class InjectionPointBean extends 
             
         }finally
         {
-            local.remove();
+            local.set(null);
         }
     }
 

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ProducerMethodBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ProducerMethodBean.java?rev=937336&r1=937335&r2=937336&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ProducerMethodBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ProducerMethodBean.java
Fri Apr 23 15:32:55 2010
@@ -263,7 +263,7 @@ public class ProducerMethodBean<T> exten
             }
             else
             {
-                AbstractInjectable.dependentInstanceOfProducerMethods.remove();
+                AbstractInjectable.dependentInstanceOfProducerMethods.set(null);
             }
         }
 

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=937336&r1=937335&r2=937336&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 Apr 23 15:32:55 2010
@@ -41,7 +41,7 @@ public class ConversationImpl implements
     /**Transient or not. Transient conversations are destroyed at the end of JSF request*/
     private boolean isTransient = true;
 
-    /**Default timeout is 3mins*/
+    /**Default timeout is 30mins*/
     private long timeout = 30 * 60 * 1000 ;
 
     /**Id of the session that this conversation is created*/
@@ -61,6 +61,7 @@ public class ConversationImpl implements
      */
     public ConversationImpl()
     {
+        
     }
 
     /**
@@ -72,7 +73,6 @@ public class ConversationImpl implements
     {
         Asserts.assertNotNull(sessionId);
         this.sessionId = sessionId;
-
     }
     
     /**

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=937336&r1=937335&r2=937336&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 Apr 23 15:32:55 2010
@@ -13,8 +13,8 @@
  */
 package org.apache.webbeans.conversation;
 
+import java.util.Collection;
 import java.util.Iterator;
-import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 
@@ -76,19 +76,16 @@ public class ConversationManager
      */
     public boolean isConversationExistWithGivenId(String conversationId)
     {
-        synchronized (conversations)
-        {
-            ConversationImpl conv = null;
-            Set<Conversation> set = conversations.keySet();
-            Iterator<Conversation> it = set.iterator();
+        ConversationImpl conv = null;
+        Set<Conversation> set = conversations.keySet();
+        Iterator<Conversation> it = set.iterator();
 
-            while (it.hasNext())
+        while (it.hasNext())
+        {
+            conv = (ConversationImpl) it.next();
+            if (conv.getId().equals(conversationId))
             {
-                conv = (ConversationImpl) it.next();
-                if (conv.getId().equals(conversationId))
-                {
-                    return true;
-                }
+                return true;
             }
         }
         
@@ -210,6 +207,7 @@ public class ConversationManager
                     {
                         ctx.destroy();
                     }
+
                     it.remove();
                 }
             }
@@ -221,19 +219,16 @@ public class ConversationManager
      */
     public void destroyAllConversations()
     {
-        synchronized(conversations)
+        Collection<ConversationContext> collection = this.conversations.values();
+        if(collection != null && collection.size() > 0)
         {
-            if (conversations != null)
+            for (ConversationContext context : collection) 
             {
-                Map<Conversation, ConversationContext> oldConversations = conversations;
-                conversations = new ConcurrentHashMap<Conversation, ConversationContext>();
-                
-                for (ConversationContext ctx : oldConversations.values()) 
-                {
-                    ctx.destroy();
-                }
-                conversations.clear();
-            }
+                context.destroy();
+            }            
         }
+        
+        //Clear conversations
+        conversations.clear();
     }
 }

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/el/WebBeansELResolver.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/el/WebBeansELResolver.java?rev=937336&r1=937335&r2=937336&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/el/WebBeansELResolver.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/el/WebBeansELResolver.java
Fri Apr 23 15:32:55 2010
@@ -99,7 +99,7 @@ public class WebBeansELResolver extends 
                 if(!oldContext.equals(context))
                 {
                     store.destroy();
-                    LOCAL_CONTEXT.remove();
+                    LOCAL_CONTEXT.set(null);
                 }
                 else
                 {

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/creation/InjectionTargetProducer.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/creation/InjectionTargetProducer.java?rev=937336&r1=937335&r2=937336&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/creation/InjectionTargetProducer.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/creation/InjectionTargetProducer.java
Fri Apr 23 15:32:55 2010
@@ -88,7 +88,7 @@ public class InjectionTargetProducer<T> 
             }
             else
             {
-                AbstractInjectable.instanceUnderInjection.remove();
+                AbstractInjectable.instanceUnderInjection.set(null);
             }
         }
         

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/spi/se/DefaultContextsService.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/spi/se/DefaultContextsService.java?rev=937336&r1=937335&r2=937336&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/spi/se/DefaultContextsService.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/spi/se/DefaultContextsService.java
Fri Apr 23 15:32:55 2010
@@ -211,12 +211,12 @@ public class DefaultContextsService exte
     @Override
     public void destroy(Object destroyObject)
     {
-        requestContext.remove();
-        sessionContext.remove();
-        applicationContext.remove();
-        conversationContext.remove();
-        dependentContext.remove();
-        singletonContext.remove();
+        requestContext.set(null);
+        sessionContext.set(null);
+        applicationContext.set(null);
+        conversationContext.set(null);
+        dependentContext.set(null);
+        singletonContext.set(null);
     }
     
     



Mime
View raw message