openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1361680 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/DelegateHandler.java
Date Sun, 15 Jul 2012 10:29:12 GMT
Author: struberg
Date: Sun Jul 15 10:29:12 2012
New Revision: 1361680

URL: http://svn.apache.org/viewvc?rev=1361680&view=rev
Log:
OWB-672 the actual instance gets passed. We do not need to serialize it

We should actually get rid of all the actualInstance storing. 
This is just needed because we wrongly inject the decorated instance
via proxy and not directly atm.

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/DelegateHandler.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/DelegateHandler.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/DelegateHandler.java?rev=1361680&r1=1361679&r2=1361680&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/DelegateHandler.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/DelegateHandler.java
Sun Jul 15 10:29:12 2012
@@ -46,7 +46,7 @@ public class DelegateHandler implements 
     private transient List<Object> decorators;
     private transient int position = 0;
 
-    private transient Object actualBean = null;
+    private transient Object actualInstance = null;
     
     private transient OwbBean<?> bean = null;
     
@@ -72,9 +72,9 @@ public class DelegateHandler implements 
     public Object invoke(Object instance, Method method, Method proceed, Object[] arguments)
throws Exception
     {
         // Tuck away a reference to the bean being Decorated
-        if (actualBean == null)
+        if (actualInstance == null)
         {
-            actualBean = instance;
+            actualInstance = instance;
         }
 
         while (position < decorators.size())
@@ -151,7 +151,7 @@ public class DelegateHandler implements 
         
         if(!(bean instanceof EnterpriseBeanMarker))
         {
-            result = method.invoke(actualBean, arguments);
+            result = method.invoke(actualInstance, arguments);
         }
         else
         {
@@ -219,7 +219,6 @@ public class DelegateHandler implements 
         if (id != null) 
         {
             out.writeObject(id);
-            out.writeObject(actualBean);
             out.writeObject(decorators);
         }
         else 
@@ -239,7 +238,6 @@ public class DelegateHandler implements 
             return;
         }
         bean = (OwbBean<?>) WebBeansContext.currentInstance().getBeanManagerImpl().getPassivationCapableBean(id);
-        actualBean = in.readObject();
         decorators = (List<Object>) in.readObject();
     }    
 }



Mime
View raw message