openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1431944 - in /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context: ./ creational/
Date Fri, 11 Jan 2013 09:09:16 GMT
Author: struberg
Date: Fri Jan 11 09:09:16 2013
New Revision: 1431944

URL: http://svn.apache.org/viewvc?rev=1431944&view=rev
Log:
OWB-344 mark BeanInstanceBag and WebBeansContext as deprecated

Added:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/WebBeansContextRemove.java
  (contents, props changed)
      - copied, changed from r1431198, openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/WebBeansContext.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/BeanInstanceBagRemove.java
  (contents, props changed)
      - copied, changed from r1431198, openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/BeanInstanceBag.java
Removed:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/WebBeansContext.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/BeanInstanceBag.java
Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/AbstractContext.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/ApplicationContext.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/ConversationContext.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/RequestContext.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/SessionContext.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/SingletonContext.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/AbstractContext.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/AbstractContext.java?rev=1431944&r1=1431943&r2=1431944&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/AbstractContext.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/AbstractContext.java
Fri Jan 11 09:09:16 2013
@@ -33,10 +33,10 @@ import javax.enterprise.context.spi.Crea
 
 import org.apache.webbeans.container.SerializableBean;
 import org.apache.webbeans.container.SerializableBeanVault;
-import org.apache.webbeans.context.creational.BeanInstanceBag;
+import org.apache.webbeans.context.creational.BeanInstanceBagRemove;
 
 /**
- * Abstract implementation of the {@link WebBeansContext} interfaces.
+ * Abstract implementation of the {@link WebBeansContextRemove} interfaces.
  * 
  * @see javax.enterprise.context.spi.Context
  * @see RequestContext
@@ -45,7 +45,7 @@ import org.apache.webbeans.context.creat
  * @see ApplicationContext
  * @see ConversationContext
  */
-public abstract class AbstractContext implements WebBeansContext, Serializable
+public abstract class AbstractContext implements WebBeansContextRemove, Serializable
 {
     private static final long serialVersionUID = 2357678967444477818L;
     /**Context status, active or not*/
@@ -53,7 +53,7 @@ public abstract class AbstractContext im
 
 
     /**Context contextual instances*/
-    protected Map<Contextual<?>, BeanInstanceBag<?>> componentInstanceMap
= null;
+    protected Map<Contextual<?>, BeanInstanceBagRemove<?>> componentInstanceMap
= null;
 
     /**Contextual Scope Type*/
     protected Class<? extends Annotation> scopeType;
@@ -75,7 +75,7 @@ public abstract class AbstractContext im
     @SuppressWarnings("unchecked")
     private <T> void createContextualBag(Contextual<T> contextual, CreationalContext<T>
creationalContext)
     {
-        BeanInstanceBag<T> bag = new BeanInstanceBag<T>(creationalContext);
+        BeanInstanceBagRemove<T> bag = new BeanInstanceBagRemove<T>(creationalContext);
         
         if(componentInstanceMap instanceof ConcurrentMap)
         {
@@ -112,7 +112,7 @@ public abstract class AbstractContext im
     {
         checkActive();
 
-        BeanInstanceBag bag = componentInstanceMap.get(component);
+        BeanInstanceBagRemove bag = componentInstanceMap.get(component);
         
         if(bag != null)
         {
@@ -141,11 +141,11 @@ public abstract class AbstractContext im
         T instance;
         
         //Look for bag
-        BeanInstanceBag<T> bag = (BeanInstanceBag<T>)componentInstanceMap.get(contextual);
       
+        BeanInstanceBagRemove<T> bag = (BeanInstanceBagRemove<T>)componentInstanceMap.get(contextual);
         if(bag == null)
         {
             createContextualBag(contextual, creationalContext);
-            bag = (BeanInstanceBag<T>)componentInstanceMap.get(contextual);
+            bag = (BeanInstanceBagRemove<T>)componentInstanceMap.get(contextual);
         }
 
         //Look for instance
@@ -177,7 +177,7 @@ public abstract class AbstractContext im
     @SuppressWarnings("unchecked")
     public <T> CreationalContext<T> getCreationalContext(Contextual<T>
contextual)
     {
-        BeanInstanceBag<?> bag = componentInstanceMap.get(contextual);
+        BeanInstanceBagRemove<?> bag = componentInstanceMap.get(contextual);
         if (bag != null)
         {
             return (CreationalContext<T>) bag.getBeanCreationalContext();
@@ -205,15 +205,15 @@ public abstract class AbstractContext im
     @SuppressWarnings("unchecked")
     public void destroy()
     {
-        Set<Entry<Contextual<?>, BeanInstanceBag<?>>> entrySet =
componentInstanceMap.entrySet();
-        Iterator<Entry<Contextual<?>, BeanInstanceBag<?>>> it = entrySet.iterator();
+        Set<Entry<Contextual<?>, BeanInstanceBagRemove<?>>> entrySet
= componentInstanceMap.entrySet();
+        Iterator<Entry<Contextual<?>, BeanInstanceBagRemove<?>>>
it = entrySet.iterator();
 
         Contextual<?> contextual;
         while (it.hasNext())
         {
             contextual = it.next().getKey();
             
-            BeanInstanceBag<?> instance = componentInstanceMap.get(contextual);
+            BeanInstanceBagRemove<?> instance = componentInstanceMap.get(contextual);
             //Get creational context
             CreationalContext<Object> cc = (CreationalContext<Object>)instance.getBeanCreationalContext();
 
@@ -284,10 +284,10 @@ public abstract class AbstractContext im
         {
             SerializableBeanVault sbv = org.apache.webbeans.config.WebBeansContext.getInstance().getSerializableBeanVault();
 
-            Map<Contextual<?>, BeanInstanceBag<?>> serializableInstanceMap
=
-                    new HashMap<Contextual<?>, BeanInstanceBag<?>>();
+            Map<Contextual<?>, BeanInstanceBagRemove<?>> serializableInstanceMap
=
+                    new HashMap<Contextual<?>, BeanInstanceBagRemove<?>>();
 
-            for (Map.Entry<Contextual<?>, BeanInstanceBag<?>> componentInstanceMapEntry
: componentInstanceMap.entrySet())
+            for (Map.Entry<Contextual<?>, BeanInstanceBagRemove<?>> componentInstanceMapEntry
: componentInstanceMap.entrySet())
             {
                 serializableInstanceMap.put(sbv.getSerializableBean(componentInstanceMapEntry.getKey()),
                                             componentInstanceMapEntry.getValue());
@@ -310,8 +310,8 @@ public abstract class AbstractContext im
     {
         scopeType = (Class<? extends Annotation>) s.readObject();
 
-        HashMap<Contextual<?>, BeanInstanceBag<?>> serializableInstanceMap
=
-                (HashMap<Contextual<?>, BeanInstanceBag<?>>) s.readObject();
+        HashMap<Contextual<?>, BeanInstanceBagRemove<?>> serializableInstanceMap
=
+                (HashMap<Contextual<?>, BeanInstanceBagRemove<?>>) s.readObject();
 
         if (serializableInstanceMap != null)
         {
@@ -321,7 +321,7 @@ public abstract class AbstractContext im
                 throw new NotSerializableException("componentInstanceMap not initialized!");
             }
 
-            for (Map.Entry<Contextual<?>, BeanInstanceBag<?>> serializableInstanceMapEntry
: serializableInstanceMap.entrySet())
+            for (Map.Entry<Contextual<?>, BeanInstanceBagRemove<?>> serializableInstanceMapEntry
: serializableInstanceMap.entrySet())
             {
                 Contextual<?> bean = serializableInstanceMapEntry.getKey();
                 if (bean instanceof SerializableBean)

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/ApplicationContext.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/ApplicationContext.java?rev=1431944&r1=1431943&r2=1431944&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/ApplicationContext.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/ApplicationContext.java
Fri Jan 11 09:09:16 2013
@@ -23,7 +23,7 @@ import java.util.concurrent.ConcurrentHa
 import javax.enterprise.context.ApplicationScoped;
 import javax.enterprise.context.spi.Contextual;
 
-import org.apache.webbeans.context.creational.BeanInstanceBag;
+import org.apache.webbeans.context.creational.BeanInstanceBagRemove;
 
 /**
  * Application context implementation.
@@ -41,7 +41,7 @@ public class ApplicationContext extends 
     @Override
     public void setComponentInstanceMap()
     {
-        componentInstanceMap = new ConcurrentHashMap<Contextual<?>, BeanInstanceBag<?>>();
+        componentInstanceMap = new ConcurrentHashMap<Contextual<?>, BeanInstanceBagRemove<?>>();
 
     }
 

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/ConversationContext.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/ConversationContext.java?rev=1431944&r1=1431943&r2=1431944&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/ConversationContext.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/ConversationContext.java
Fri Jan 11 09:09:16 2013
@@ -32,7 +32,7 @@ import java.util.concurrent.ConcurrentHa
 import javax.enterprise.context.ConversationScoped;
 import javax.enterprise.context.spi.Contextual;
 
-import org.apache.webbeans.context.creational.BeanInstanceBag;
+import org.apache.webbeans.context.creational.BeanInstanceBagRemove;
 import org.apache.webbeans.util.WebBeansUtil;
 
 /**
@@ -53,14 +53,14 @@ public class ConversationContext extends
     @Override
     public void setComponentInstanceMap()
     {
-        componentInstanceMap = new ConcurrentHashMap<Contextual<?>, BeanInstanceBag<?>>();
+        componentInstanceMap = new ConcurrentHashMap<Contextual<?>, BeanInstanceBagRemove<?>>();
     }
 
     public void readExternal(ObjectInput in) throws IOException,
             ClassNotFoundException 
     {
         scopeType = (Class<? extends Annotation>) in.readObject();
-        Map<String, BeanInstanceBag<?>> map = (Map<String, BeanInstanceBag<?>>)in.readObject();
+        Map<String, BeanInstanceBagRemove<?>> map = (Map<String, BeanInstanceBagRemove<?>>)in.readObject();
         setComponentInstanceMap();
         Iterator<String> it = map.keySet().iterator();
         Contextual<?> contextual = null;
@@ -82,7 +82,7 @@ public class ConversationContext extends
     {
             out.writeObject(scopeType);
             Iterator<Contextual<?>> it = componentInstanceMap.keySet().iterator();
-            Map<String, BeanInstanceBag<?>> map = new HashMap<String, BeanInstanceBag<?>>();
+            Map<String, BeanInstanceBagRemove<?>> map = new HashMap<String,
BeanInstanceBagRemove<?>>();
             while(it.hasNext()) 
             {
                 Contextual<?>contextual = it.next();

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/RequestContext.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/RequestContext.java?rev=1431944&r1=1431943&r2=1431944&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/RequestContext.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/RequestContext.java
Fri Jan 11 09:09:16 2013
@@ -23,7 +23,7 @@ import java.util.concurrent.ConcurrentHa
 import javax.enterprise.context.RequestScoped;
 import javax.enterprise.context.spi.Contextual;
 
-import org.apache.webbeans.context.creational.BeanInstanceBag;
+import org.apache.webbeans.context.creational.BeanInstanceBagRemove;
 
 /**
  * Request context implementation.
@@ -46,7 +46,7 @@ public class RequestContext extends Abst
     @Override
     public void setComponentInstanceMap()
     {
-        componentInstanceMap = new ConcurrentHashMap<Contextual<?>, BeanInstanceBag<?>>();
+        componentInstanceMap = new ConcurrentHashMap<Contextual<?>, BeanInstanceBagRemove<?>>();
 
     }
 

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/SessionContext.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/SessionContext.java?rev=1431944&r1=1431943&r2=1431944&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/SessionContext.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/SessionContext.java
Fri Jan 11 09:09:16 2013
@@ -34,7 +34,7 @@ import javax.enterprise.context.SessionS
 import javax.enterprise.context.spi.Contextual;
 
 import org.apache.webbeans.config.WebBeansContext;
-import org.apache.webbeans.context.creational.BeanInstanceBag;
+import org.apache.webbeans.context.creational.BeanInstanceBagRemove;
 import org.apache.webbeans.util.WebBeansUtil;
 
 /**
@@ -52,7 +52,7 @@ public class SessionContext extends Abst
     @Override
     public void setComponentInstanceMap()
     {
-        componentInstanceMap = new ConcurrentHashMap<Contextual<?>, BeanInstanceBag<?>>();
+        componentInstanceMap = new ConcurrentHashMap<Contextual<?>, BeanInstanceBagRemove<?>>();
     }
 
     public void readExternal(ObjectInput in) throws IOException,
@@ -61,7 +61,7 @@ public class SessionContext extends Abst
         WebBeansContext webBeansContext = WebBeansContext.currentInstance();
 
         scopeType = (Class<? extends Annotation>) in.readObject();
-        Map<String, BeanInstanceBag<?>> map = (Map<String, BeanInstanceBag<?>>)in.readObject();
+        Map<String, BeanInstanceBagRemove<?>> map = (Map<String, BeanInstanceBagRemove<?>>)in.readObject();
         setComponentInstanceMap();
         Iterator<String> it = map.keySet().iterator();
         Contextual<?> contextual = null;
@@ -83,7 +83,7 @@ public class SessionContext extends Abst
     {
         out.writeObject(scopeType);
         Iterator<Contextual<?>> it = componentInstanceMap.keySet().iterator();
-        Map<String, BeanInstanceBag<?>> map = new HashMap<String, BeanInstanceBag<?>>();
+        Map<String, BeanInstanceBagRemove<?>> map = new HashMap<String, BeanInstanceBagRemove<?>>();
         while(it.hasNext()) 
         {
             Contextual<?>contextual = it.next();

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/SingletonContext.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/SingletonContext.java?rev=1431944&r1=1431943&r2=1431944&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/SingletonContext.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/SingletonContext.java
Fri Jan 11 09:09:16 2013
@@ -23,7 +23,7 @@ import java.util.concurrent.ConcurrentHa
 import javax.enterprise.context.spi.Contextual;
 import javax.inject.Singleton;
 
-import org.apache.webbeans.context.creational.BeanInstanceBag;
+import org.apache.webbeans.context.creational.BeanInstanceBagRemove;
 
 /**
  * Application context implementation.
@@ -41,6 +41,6 @@ public class SingletonContext extends Ab
     @Override
     public void setComponentInstanceMap()
     {
-        componentInstanceMap = new ConcurrentHashMap<Contextual<?>, BeanInstanceBag<?>>();
+        componentInstanceMap = new ConcurrentHashMap<Contextual<?>, BeanInstanceBagRemove<?>>();
     }
 }

Copied: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/WebBeansContextRemove.java
(from r1431198, openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/WebBeansContext.java)
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/WebBeansContextRemove.java?p2=openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/WebBeansContextRemove.java&p1=openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/WebBeansContext.java&r1=1431198&r2=1431944&rev=1431944&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/WebBeansContext.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/WebBeansContextRemove.java
Fri Jan 11 09:09:16 2013
@@ -26,8 +26,9 @@ import javax.enterprise.context.spi.Crea
  * Defines spi for contexts.
  *
  * @version $Rev$ $Date$
+ * @deprecated we don't need the ContextualBag anymore
  */
-public interface WebBeansContext extends javax.enterprise.context.spi.Context
+public interface WebBeansContextRemove extends javax.enterprise.context.spi.Context
 {   
     /**
      * Initializes this contextual bag with

Propchange: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/WebBeansContextRemove.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/WebBeansContextRemove.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Copied: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/BeanInstanceBagRemove.java
(from r1431198, openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/BeanInstanceBag.java)
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/BeanInstanceBagRemove.java?p2=openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/BeanInstanceBagRemove.java&p1=openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/BeanInstanceBag.java&r1=1431198&r2=1431944&rev=1431944&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/BeanInstanceBag.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/BeanInstanceBagRemove.java
Fri Jan 11 09:09:16 2013
@@ -24,7 +24,10 @@ import java.io.Serializable;
 import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReentrantLock;
 
-public class BeanInstanceBag<T> implements Serializable
+/**
+ * @deprecated we don't need the ContextualBag anymore once we have the new Interceptor handling
+ */
+public class BeanInstanceBagRemove<T> implements Serializable
 {
     private static final long serialVersionUID = 1656996021599122499L;
     private final CreationalContext<T> beanCreationalContext;
@@ -33,7 +36,7 @@ public class BeanInstanceBag<T> implemen
     
     private final Lock lock = new ReentrantLock();
     
-    public BeanInstanceBag(CreationalContext<T> beanCreationalContext)
+    public BeanInstanceBagRemove(CreationalContext<T> beanCreationalContext)
     {
         this.beanCreationalContext = beanCreationalContext;
     }

Propchange: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/BeanInstanceBagRemove.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message