openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1432815 - in /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component: AbstractInjectionTargetBean.java AbstractOwbBean.java
Date Mon, 14 Jan 2013 07:22:39 GMT
Author: arne
Date: Mon Jan 14 07:22:38 2013
New Revision: 1432815

URL: http://svn.apache.org/viewvc?rev=1432815&view=rev
Log:
OWB-747: Removed afterConstructor

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractInjectionTargetBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractOwbBean.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractInjectionTargetBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractInjectionTargetBean.java?rev=1432815&r1=1432814&r2=1432815&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractInjectionTargetBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractInjectionTargetBean.java
Mon Jan 14 07:22:38 2013
@@ -207,23 +207,6 @@ public abstract class AbstractInjectionT
     }
 
     /**
-     * Called after bean instance is created.
-     * 
-     * @param instance bean instance
-     * @param creationalContext cretional context object
-     */
-    protected void afterConstructor(T instance, CreationalContext<T> creationalContext)
-    {
-        //Inject resources
-        injectResources(instance, creationalContext);
-        
-        new InjectionTargetImpl<T>(getAnnotatedType(), getInjectionPoints(), webBeansContext).inject(instance,
creationalContext); 
-        
-        //Post construct
-        postConstruct(instance, creationalContext);
-    }
-
-    /**
      * {@inheritDoc}
      */
     public void postConstruct(T instance, CreationalContext<T> cretionalContext)

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=1432815&r1=1432814&r2=1432815&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
Mon Jan 14 07:22:38 2013
@@ -43,6 +43,7 @@ import org.apache.webbeans.container.Bea
 import org.apache.webbeans.context.creational.CreationalContextImpl;
 import org.apache.webbeans.exception.WebBeansConfigurationException;
 import org.apache.webbeans.logger.WebBeansLoggerFacade;
+import org.apache.webbeans.portable.InjectionTargetImpl;
 
 /**
  * Abstract implementation of the {@link OwbBean} contract. 
@@ -171,7 +172,14 @@ public abstract class AbstractOwbBean<T>
                 instance = createInstance(creationalContext); 
                 if(this instanceof AbstractInjectionTargetBean)
                 {
-                    ((AbstractInjectionTargetBean<T>)this).afterConstructor(instance,
creationalContext);
+                    AbstractInjectionTargetBean<T> injectionTargetBean = (AbstractInjectionTargetBean<T>)this;
+                    //Inject resources
+                    injectionTargetBean.injectResources(instance, creationalContext);
+                    
+                    new InjectionTargetImpl<T>(injectionTargetBean.getAnnotatedType(),
getInjectionPoints(), webBeansContext).inject(instance, creationalContext); 
+                    
+                    //Post construct
+                    injectionTargetBean.postConstruct(instance, creationalContext);
                 }
             }                                    
         }



Mime
View raw message