openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gerdo...@apache.org
Subject svn commit: r934722 - in /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans: component/AbstractOwbBean.java container/BeanManagerImpl.java context/creational/CreationalContextImpl.java intercept/InterceptorHandler.java
Date Fri, 16 Apr 2010 09:16:51 GMT
Author: gerdogdu
Date: Fri Apr 16 09:16:51 2010
New Revision: 934722

URL: http://svn.apache.org/viewvc?rev=934722&view=rev
Log:
update for creational context adapting

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractOwbBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/CreationalContextImpl.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorHandler.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=934722&r1=934721&r2=934722&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 16 09:16:51 2010
@@ -164,11 +164,7 @@ public abstract class AbstractOwbBean<T>
                 {
                     ((AbstractInjectionTargetBean<T>)this).afterConstructor(instance,
creationalContext);
                 }
-            }
-                        
-            //Remove proxy instance
-            ((CreationalContextImpl)creationalContext).setProxyInstance(null);
-            
+            }                                    
         }
         catch (Exception re)
         {

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java?rev=934722&r1=934721&r2=934722&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java
Fri Apr 16 09:16:51 2010
@@ -798,9 +798,6 @@ public class BeanManagerImpl implements 
             //Create Managed Bean Proxy
             instance = JavassistProxyFactory.createNormalScopedBeanProxy((AbstractOwbBean<?>)bean,creationalContext);
             
-            //push this proxy instance into creational context
-            CreationalContextImpl<Object> temp = (CreationalContextImpl<Object>)creationalContext;
-            temp.setProxyInstance(instance);
         }
         //Create Pseudo-Scope Bean Instance
         else

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/CreationalContextImpl.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/CreationalContextImpl.java?rev=934722&r1=934721&r2=934722&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/CreationalContextImpl.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/CreationalContextImpl.java
Fri Apr 16 09:16:51 2010
@@ -37,10 +37,6 @@ public class CreationalContextImpl<T> im
     //Default serial id
     private static final long serialVersionUID = 1L;
 
-    /**Bean proxy*/
-    //This will be set to null after instance creations
-    private volatile Object proxyInstance = null;
-    
     /**Contextual bean dependent instances*/
     //contextual instance --> dependents
     private Map<Object, List<DependentCreationalContext<?>>> dependentObjects
= 
@@ -124,28 +120,7 @@ public class CreationalContextImpl<T> im
     {
         //No-action
     }
-    
-    /**
-     * Sets bean instance proxy.
-     * @param proxyInstance proxy
-     */
-    public void setProxyInstance(Object proxyInstance)
-    {
-        if(this.proxyInstance == null)
-        {
-            this.proxyInstance = proxyInstance;   
-        }
-    }
-    
-    /**
-     * Gets bean proxy.
-     * @return bean proxy
-     */
-    public Object getProxyInstance()
-    {
-        return this.proxyInstance;
-    }
-    
+        
     /**
      * Adds given dependent instance to the map.
      * 

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorHandler.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorHandler.java?rev=934722&r1=934721&r2=934722&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorHandler.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorHandler.java
Fri Apr 16 09:16:51 2010
@@ -147,9 +147,6 @@ public abstract class InterceptorHandler
     /**Intercepted methods*/
     protected transient Map<Method, List<InterceptorData>> interceptedMethodMap
= new WeakHashMap<Method, List<InterceptorData>>();
     
-    /**Bean decorator objects*/
-    protected transient List<Object> decorators = null;
-    
     /**Delegate handler*/
     protected transient DelegateHandler delegateHandler;
 
@@ -196,7 +193,7 @@ public abstract class InterceptorHandler
                 if (InterceptorUtil.isWebBeansBusinessMethod(method))
                 {
                     List<Object> decorators = null;
-                    if (injectionTarget.getDecoratorStack().size() > 0 && this.decorators
== null)
+                    if (injectionTarget.getDecoratorStack().size() > 0)
                     {
                         Class<?> proxyClass = JavassistProxyFactory.getInterceptorProxyClasses().get(bean);
                         if (proxyClass == null)
@@ -214,7 +211,6 @@ public abstract class InterceptorHandler
                         //Sets decorator stack of delegate
                         this.delegateHandler.setDecorators(decorators);
                         
-                        this.decorators = decorators;
                     }
 
                     // Run around invoke chain
@@ -254,7 +250,7 @@ public abstract class InterceptorHandler
                     
                     // If there are Decorators, allow the delegate handler to
                     // manage the stack
-                    if (this.decorators != null)
+                    if (decorators != null)
                     {
                         return delegateHandler.invoke(instance, method, proceed, arguments);
                     }



Mime
View raw message