openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1432983 - in /openwebbeans/trunk: webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/component/ webbeans-impl/src/main/java/org/apache/webbeans/component/ webbeans-impl/src/main/java/org/apache/webbeans/component/creation/ webbeans-...
Date Mon, 14 Jan 2013 16:37:46 GMT
Author: struberg
Date: Mon Jan 14 16:37:45 2013
New Revision: 1432983

URL: http://svn.apache.org/viewvc?rev=1432983&view=rev
Log:
OWB-755 cleanup InjectionTarget

temporarily broken. Will cleanup soon

Added:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionTargetBean.java
      - copied, changed from r1432851, openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractInjectionTargetBean.java
Removed:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractInjectionTargetBean.java
Modified:
    openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/component/BaseEjbBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractOwbBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractProducerBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ConversationBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ExtensionBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InterceptorBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ManagedBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ProducerMethodBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/AbstractBeanBuilder.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/AbstractInjectionTargetBeanBuilder.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/CdiInterceptorBeanBuilder.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContext.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/DecoratorUtil.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/WebBeansDecorator.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/WebBeansDecoratorConfig.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/ObserverMethodImpl.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorHandlerPleaseRemove.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/WebBeansInterceptorConfig.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/webbeans/WebBeansInterceptorBeanPleaseRemove.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/InjectionTargetImpl.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/util/WebBeansUtil.java
    openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/contexts/session/common/PersonalDataBean.java
    openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/contexts/session/tests/SessionContextTest.java
    openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/TestContext.java
    openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/exception/ExceptionComponentTest.java
    openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/intercept/EJBInterceptorExceptionComponentTest.java

Modified: openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/component/BaseEjbBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/component/BaseEjbBean.java?rev=1432983&r1=1432982&r2=1432983&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/component/BaseEjbBean.java (original)
+++ openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/component/BaseEjbBean.java Mon Jan 14 16:37:45 2013
@@ -33,7 +33,7 @@ import javax.enterprise.context.spi.Crea
 import javax.enterprise.inject.spi.AnnotatedType;
 import javax.enterprise.inject.spi.SessionBeanType;
 
-import org.apache.webbeans.component.AbstractInjectionTargetBean;
+import org.apache.webbeans.component.InjectionTargetBean;
 import org.apache.webbeans.component.EnterpriseBeanMarker;
 import org.apache.webbeans.component.WebBeansType;
 import org.apache.webbeans.config.WebBeansContext;
@@ -44,7 +44,7 @@ import org.apache.webbeans.util.ClassUti
  * 
  * @version $Rev$ $Date$
  */
-public abstract class BaseEjbBean<T> extends AbstractInjectionTargetBean<T> implements EnterpriseBeanMarker
+public abstract class BaseEjbBean<T> extends InjectionTargetBean<T> implements EnterpriseBeanMarker
 {
     public static final Object[] OBJECT_EMPTY = new Object[0];
 

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=1432983&r1=1432982&r2=1432983&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 16:37:45 2013
@@ -104,7 +104,6 @@ public abstract class AbstractOwbBean<T>
      * Constructor definiton. Each subclass redefines its own constructor with
      * calling this.
      * 
-     * @param returnType of the bean
      * @param webBeansContext
      * @param webBeansType web beans type
      */
@@ -173,14 +172,16 @@ public abstract class AbstractOwbBean<T>
             }
             else
             {
-                if(this instanceof AbstractInjectionTargetBean)
+                if(this instanceof InjectionTargetBean)
                 {
+                    //X TODO holy shit. this is completely against the whole bean hierarchy!
+
                     instance = createInstance(creationalContext); 
-                    AbstractInjectionTargetBean<T> injectionTargetBean = (AbstractInjectionTargetBean<T>)this;
+                    InjectionTargetBean<T> injectionTargetBean = (InjectionTargetBean<T>)this;
                     //Inject resources
                     injectionTargetBean.injectResources(instance, creationalContext);
                     
-                    new InjectionTargetImpl<T>(injectionTargetBean.getAnnotatedType(), getInjectionPoints(), webBeansContext).inject(instance, creationalContext); 
+                    new InjectionTargetImpl<T>(injectionTargetBean.getAnnotatedType(), getInjectionPoints(), webBeansContext, null, null).inject(instance, creationalContext);
                     
                     //Post construct
                     if(getWebBeansType().equals(WebBeansType.MANAGED))

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractProducerBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractProducerBean.java?rev=1432983&r1=1432982&r2=1432983&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractProducerBean.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractProducerBean.java Mon Jan 14 16:37:45 2013
@@ -44,7 +44,6 @@ public abstract class AbstractProducerBe
     /**
      * Create a new instance.
      * 
-     * @param type webbeans typr
      * @param returnType bean type info
      * @param ownerComponent owner bean
      */

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ConversationBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ConversationBean.java?rev=1432983&r1=1432982&r2=1432983&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ConversationBean.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ConversationBean.java Mon Jan 14 16:37:45 2013
@@ -37,7 +37,7 @@ import org.apache.webbeans.util.Collecti
  * @version $Rev$ $Date$
  *
  */
-public class ConversationBean extends AbstractInjectionTargetBean<Conversation>
+public class ConversationBean extends InjectionTargetBean<Conversation>
 {
     /**
      * Default constructor.

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ExtensionBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ExtensionBean.java?rev=1432983&r1=1432982&r2=1432983&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ExtensionBean.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ExtensionBean.java Mon Jan 14 16:37:45 2013
@@ -35,7 +35,7 @@ import org.apache.webbeans.util.Annotati
  *
  * @param <T> type info
  */
-public class ExtensionBean<T> extends AbstractInjectionTargetBean<T>
+public class ExtensionBean<T> extends InjectionTargetBean<T>
 {
     /**
      * Creates a new extesion bean.
@@ -46,13 +46,13 @@ public class ExtensionBean<T> extends Ab
     public ExtensionBean(WebBeansContext webBeansContext, Class<T> returnType)
     {
         super(webBeansContext,
-              WebBeansType.EXTENSION,
-              webBeansContext.getAnnotatedElementFactory().newAnnotatedType(returnType),
-              webBeansContext.getAnnotatedElementFactory().newAnnotatedType(returnType).getTypeClosure(),
-              AnnotationUtil.DEFAULT_AND_ANY_ANNOTATION,
-              ApplicationScoped.class,
-              returnType,
-              Collections.<Class<? extends Annotation>>emptySet());
+                WebBeansType.EXTENSION,
+                webBeansContext.getAnnotatedElementFactory().newAnnotatedType(returnType),
+                webBeansContext.getAnnotatedElementFactory().newAnnotatedType(returnType).getTypeClosure(),
+                AnnotationUtil.DEFAULT_AND_ANY_ANNOTATION,
+                ApplicationScoped.class,
+                returnType,
+                Collections.<Class<? extends Annotation>>emptySet());
         setEnabled(true);
     }
     

Copied: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionTargetBean.java (from r1432851, 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/InjectionTargetBean.java?p2=openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionTargetBean.java&p1=openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractInjectionTargetBean.java&r1=1432851&r2=1432983&rev=1432983&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/InjectionTargetBean.java Mon Jan 14 16:37:45 2013
@@ -38,12 +38,13 @@ import org.apache.webbeans.decorator.Web
 import org.apache.webbeans.exception.WebBeansConfigurationException;
 import org.apache.webbeans.exception.WebBeansException;
 import org.apache.webbeans.intercept.InterceptorData;
+
+import javax.enterprise.inject.spi.InjectionTarget;
 import javax.enterprise.inject.spi.InterceptionType;
 
 import org.apache.webbeans.intercept.InvocationContextImpl;
 import org.apache.webbeans.intercept.webbeans.WebBeansInterceptorBeanPleaseRemove;
 import org.apache.webbeans.logger.WebBeansLoggerFacade;
-import org.apache.webbeans.portable.InjectionTargetImpl;
 import org.apache.webbeans.proxy.ProxyFactory;
 import org.apache.webbeans.spi.ResourceInjectionService;
 import org.apache.webbeans.util.Asserts;
@@ -55,7 +56,7 @@ import org.apache.webbeans.util.WebBeans
  * @version $Rev$ $Date$
  * @param <T> bean class
  */
-public abstract class AbstractInjectionTargetBean<T> extends AbstractOwbBean<T> implements InjectionTargetBean<T>
+public abstract class InjectionTargetBean<T> extends AbstractOwbBean<T>
 {    
     /**Annotated type for bean*/
     private AnnotatedType<T> annotatedType;
@@ -67,48 +68,56 @@ public abstract class AbstractInjectionT
      */
     protected List<InterceptorData> interceptorStack = new ArrayList<InterceptorData>();
 
+    private InjectionTarget<T> injectionTarget = null;
+
     /**
      * Decorators
      * @deprecated will be replaced by InterceptorResolution logic
      */
     protected List<Decorator<?>> decorators = new ArrayList<Decorator<?>>();
     
-    protected AbstractInjectionTargetBean(WebBeansContext webBeansContext,
-                                          WebBeansType webBeansType,
-                                          AnnotatedType<T> annotatedType,
-                                          Set<Type> types,
-                                          Set<Annotation> qualifiers,
-                                          Class<? extends Annotation> scope,
-                                          Class<T> beanClass,
-                                          Set<Class<? extends Annotation>> stereotypes)
+    protected InjectionTargetBean(WebBeansContext webBeansContext,
+                                  WebBeansType webBeansType,
+                                  AnnotatedType<T> annotatedType,
+                                  Set<Type> types,
+                                  Set<Annotation> qualifiers,
+                                  Class<? extends Annotation> scope,
+                                  Class<T> beanClass,
+                                  Set<Class<? extends Annotation>> stereotypes)
     {
         this(webBeansContext, webBeansType, annotatedType, types, qualifiers, scope, null, beanClass, stereotypes, false);
         setEnabled(true);
     }
 
     /**
-     * Creates a new observer owner component.
-     * 
-     * @param webBeansType webbean type
-     * @param returnType bean class type
-     * @param webBeansContext
-     */
-    protected AbstractInjectionTargetBean(WebBeansContext webBeansContext,
-                                          WebBeansType webBeansType,
-                                          AnnotatedType<T> annotatedType,
-                                          Set<Type> types,
-                                          Set<Annotation> qualifiers,
-                                          Class<? extends Annotation> scope,
-                                          String name,
-                                          Class<T> beanClass,
-                                          Set<Class<? extends Annotation>> stereotypes,
-                                          boolean alternative)
+     * Initializes the InjectionTarget Bean part.
+     */
+    protected InjectionTargetBean(WebBeansContext webBeansContext,
+                                  WebBeansType webBeansType,
+                                  AnnotatedType<T> annotatedType,
+                                  Set<Type> types,
+                                  Set<Annotation> qualifiers,
+                                  Class<? extends Annotation> scope,
+                                  String name,
+                                  Class<T> beanClass,
+                                  Set<Class<? extends Annotation>> stereotypes,
+                                  boolean alternative)
     {
         super(webBeansContext, webBeansType, types, qualifiers, scope, name, false, beanClass, stereotypes, alternative);
         Asserts.assertNotNull(annotatedType, "AnnotatedType may not be null");
         this.annotatedType = annotatedType;
     }
 
+    public InjectionTarget<T> getInjectionTarget()
+    {
+        return injectionTarget;
+    }
+
+    public void setInjectionTarget(InjectionTarget<T> injectionTarget)
+    {
+        this.injectionTarget = injectionTarget;
+    }
+
     /**
      * {@inheritDoc}
      */
@@ -130,7 +139,7 @@ public abstract class AbstractInjectionT
                 //Therefore we inject dependencies of this instance
                 //Otherwise we loose injection
                 injectResources(instance, creationalContext);
-                new InjectionTargetImpl<T>(getAnnotatedType(), getInjectionPoints(), webBeansContext).inject(instance, creationalContext);                
+                getInjectionTarget().inject(instance, creationalContext);
 
                 //Dependent proxy
                 dependentProxy = result;
@@ -155,7 +164,7 @@ public abstract class AbstractInjectionT
      */
     protected void destroyInstance(T instance, CreationalContext<T> creationalContext)
     {
-        destroyComponentInstance(instance,creationalContext);
+        destroyComponentInstance(instance, creationalContext);
     }
 
     /**

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InterceptorBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InterceptorBean.java?rev=1432983&r1=1432982&r2=1432983&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InterceptorBean.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InterceptorBean.java Mon Jan 14 16:37:45 2013
@@ -36,7 +36,6 @@ import org.apache.webbeans.config.WebBea
 import org.apache.webbeans.context.creational.CreationalContextImpl;
 import org.apache.webbeans.exception.WebBeansException;
 import org.apache.webbeans.inject.InjectableConstructor;
-import org.apache.webbeans.portable.InjectionTargetImpl;
 import org.apache.webbeans.util.ExceptionUtil;
 
 /**
@@ -45,7 +44,7 @@ import org.apache.webbeans.util.Exceptio
  * <p>Any Interceptor is also an InjectionTarget as they can contain
  * &#064;Inject InjectionPoints.</p>
  */
-public abstract class InterceptorBean<T> extends AbstractInjectionTargetBean<T> implements Interceptor<T>, EnterpriseBeanMarker
+public abstract class InterceptorBean<T> extends InjectionTargetBean<T> implements Interceptor<T>, EnterpriseBeanMarker
 {
    /**
      * Constructor of the web bean component
@@ -80,8 +79,7 @@ public abstract class InterceptorBean<T>
     protected T createComponentInstance(CreationalContext<T> creationalContext)
     {
         Constructor<T> con = getConstructor();
-        InjectionTargetImpl<T> injectionTarget = new InjectionTargetImpl<T>(getAnnotatedType(), getInjectionPoints(), getWebBeansContext());
-        InjectableConstructor<T> ic = new InjectableConstructor<T>(con, injectionTarget, (CreationalContextImpl<T>) creationalContext);
+        InjectableConstructor<T> ic = new InjectableConstructor<T>(con, getInjectionTarget(), (CreationalContextImpl<T>) creationalContext);
 
         T instance = ic.doInjection();
 

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ManagedBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ManagedBean.java?rev=1432983&r1=1432982&r2=1432983&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ManagedBean.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ManagedBean.java Mon Jan 14 16:37:45 2013
@@ -33,14 +33,13 @@ import org.apache.webbeans.context.creat
 import org.apache.webbeans.decorator.AbstractDecoratorMethodHandler;
 import org.apache.webbeans.inject.InjectableConstructor;
 import org.apache.webbeans.intercept.InterceptorData;
-import org.apache.webbeans.portable.InjectionTargetImpl;
 
 /**
  * Managed bean implementation of the {@link javax.enterprise.inject.spi.Bean}.
  * 
  * @version $Rev$ $Date$
  */
-public class ManagedBean<T> extends AbstractInjectionTargetBean<T> implements InterceptedMarker
+public class ManagedBean<T> extends InjectionTargetBean<T> implements InterceptedMarker
 {
     /** Constructor of the web bean component */
     private Constructor<T> constructor;
@@ -84,8 +83,7 @@ public class ManagedBean<T> extends Abst
         {
             con = webBeansContext.getWebBeansUtil().getNoArgConstructor(getReturnType());
         }
-        InjectionTargetImpl<T> injectionTarget = new InjectionTargetImpl<T>(getAnnotatedType(), getInjectionPoints(), getWebBeansContext());
-        InjectableConstructor<T> ic = new InjectableConstructor<T>(con, injectionTarget, (CreationalContextImpl<T>) creationalContext);
+        InjectableConstructor<T> ic = new InjectableConstructor<T>(con, getInjectionTarget(), (CreationalContextImpl<T>) creationalContext);
 
         T instance = ic.doInjection();
         

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=1432983&r1=1432982&r2=1432983&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 Mon Jan 14 16:37:45 2013
@@ -32,6 +32,7 @@ import javax.enterprise.context.Dependen
 import javax.enterprise.context.spi.Contextual;
 import javax.enterprise.context.spi.CreationalContext;
 import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.InjectionTarget;
 
 import org.apache.webbeans.context.creational.CreationalContextImpl;
 import org.apache.webbeans.context.creational.DependentCreationalContext;
@@ -39,7 +40,6 @@ import org.apache.webbeans.context.creat
 import org.apache.webbeans.exception.WebBeansConfigurationException;
 import org.apache.webbeans.inject.AbstractInjectable;
 import org.apache.webbeans.inject.InjectableMethod;
-import org.apache.webbeans.portable.InjectionTargetImpl;
 import org.apache.webbeans.util.ClassUtil;
 import org.apache.webbeans.util.WebBeansUtil;
 
@@ -65,7 +65,7 @@ public class ProducerMethodBean<T> exten
     /**
      * Creates a new instance.
      * 
-     * @param parent parent bean
+     * @param ownerComponent parent bean
      * @param returnType producer method return type
      */
     public ProducerMethodBean(InjectionTargetBean<?> ownerComponent,
@@ -151,7 +151,6 @@ public class ProducerMethodBean<T> exten
      * @param creationalContext creational context
      * @return producer method instance
      */
-    @SuppressWarnings("unchecked")
     protected T createDefaultInstance(CreationalContext<T> creationalContext)
     {
         T instance = null;
@@ -172,8 +171,9 @@ public class ProducerMethodBean<T> exten
                 parentInstance = getParentInstance(parentCreational);
             }
 
-            InjectionTargetImpl injectionTarget = new InjectionTargetImpl(getParent().getAnnotatedType(), getInjectionPoints(), getWebBeansContext());
-            m = new InjectableMethod<T>(creatorMethod, parentInstance, injectionTarget, (CreationalContextImpl<T>) creationalContext);
+            //X TODO get the InjectionTargetImpl from the parent bean
+            InjectionTarget ownerBeanInjectionTarget = getParent().getInjectionTarget();
+            m = new InjectableMethod<T>(creatorMethod, parentInstance, ownerBeanInjectionTarget, (CreationalContextImpl<T>) creationalContext);
             //Injection of parameters
             instance = m.doInjection();
             
@@ -312,8 +312,7 @@ public class ProducerMethodBean<T> exten
                     parentInstance = getParentInstance(parentCreational);
                 }
 
-                InjectionTargetImpl<T> injectionTarget
-                    = new InjectionTargetImpl(ownerComponent.getAnnotatedType(), ownerComponent.getInjectionPoints(), ownerComponent.getWebBeansContext());
+                InjectionTarget injectionTarget = ownerComponent.getInjectionTarget();
                 m = new InjectableMethod<T>(disposalMethod, parentInstance, injectionTarget, (CreationalContextImpl<T>) creationalContext);
                 m.setDisposable(true);
                 m.setProducerMethodInstance(instance);

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/AbstractBeanBuilder.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/AbstractBeanBuilder.java?rev=1432983&r1=1432982&r2=1432983&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/AbstractBeanBuilder.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/AbstractBeanBuilder.java Mon Jan 14 16:37:45 2013
@@ -87,7 +87,6 @@ public abstract class AbstractBeanBuilde
     /**
      * Creates a bean instance.
      * 
-     * @param bean bean instance
      * @param annotated
      */
     public AbstractBeanBuilder(WebBeansContext webBeansContext, A annotated)
@@ -616,8 +615,8 @@ public abstract class AbstractBeanBuilde
     
     protected <X> void addMethodInjectionPointMetaData(OwbBean<T> bean, AnnotatedMethod<X> method)
     {
-        List<InjectionPoint> injectionPoints = webBeansContext.getInjectionPointFactory().getMethodInjectionPointData(bean, method);
-        for (InjectionPoint injectionPoint : injectionPoints)
+        List<InjectionPoint> methodInjectionPoints = webBeansContext.getInjectionPointFactory().getMethodInjectionPointData(bean, method);
+        for (InjectionPoint injectionPoint : methodInjectionPoints)
         {
             addImplicitComponentForInjectionPoint(injectionPoint);
             bean.addInjectionPoint(injectionPoint);
@@ -659,6 +658,7 @@ public abstract class AbstractBeanBuilde
                 addMethodInjectionPointMetaData((OwbBean<T>)bean, (AnnotatedMethod<?>) member);
             }
         }
+
         return bean;
     }
 

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/AbstractInjectionTargetBeanBuilder.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/AbstractInjectionTargetBeanBuilder.java?rev=1432983&r1=1432982&r2=1432983&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/AbstractInjectionTargetBeanBuilder.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/AbstractInjectionTargetBeanBuilder.java Mon Jan 14 16:37:45 2013
@@ -44,12 +44,12 @@ import javax.enterprise.inject.spi.Annot
 import javax.enterprise.inject.spi.AnnotatedType;
 import javax.enterprise.inject.spi.Bean;
 import javax.enterprise.inject.spi.InjectionPoint;
+import javax.enterprise.inject.spi.InjectionTarget;
 import javax.enterprise.inject.spi.ObserverMethod;
 import javax.inject.Inject;
 import javax.inject.Named;
 
 import org.apache.webbeans.annotation.AnnotationManager;
-import org.apache.webbeans.component.AbstractInjectionTargetBean;
 import org.apache.webbeans.component.InjectionTargetBean;
 import org.apache.webbeans.component.ProducerFieldBean;
 import org.apache.webbeans.component.ProducerMethodBean;
@@ -58,6 +58,7 @@ import org.apache.webbeans.config.WebBea
 import org.apache.webbeans.container.InjectionResolver;
 import org.apache.webbeans.exception.WebBeansConfigurationException;
 import org.apache.webbeans.exception.inject.DefinitionException;
+import org.apache.webbeans.portable.InjectionTargetImpl;
 import org.apache.webbeans.spi.api.ResourceReference;
 import org.apache.webbeans.util.AnnotationUtil;
 import org.apache.webbeans.util.Asserts;
@@ -80,7 +81,6 @@ public abstract class AbstractInjectionT
     /**
      * Creates a new instance.
      * 
-     * @param bean bean instance
      */
     public AbstractInjectionTargetBeanBuilder(WebBeansContext webBeansContext, AnnotatedType<T> annotatedType)
     {
@@ -516,7 +516,7 @@ public abstract class AbstractInjectionT
     /**
      * {@inheritDoc}
      */
-    public Set<ProducerFieldBean<?>> defineProducerFields(AbstractInjectionTargetBean<T> bean)
+    public Set<ProducerFieldBean<?>> defineProducerFields(InjectionTargetBean<T> bean)
     {
         Set<ProducerFieldBean<?>> producerBeans = new HashSet<ProducerFieldBean<?>>();
         Set<AnnotatedField<? super T>> annotatedFields = getAnnotated().getFields();        
@@ -600,7 +600,7 @@ public abstract class AbstractInjectionT
     /**
      * {@inheritDoc}
      */
-    public Set<ProducerMethodBean<?>> defineProducerMethods(AbstractInjectionTargetBean<T> bean)
+    public Set<ProducerMethodBean<?>> defineProducerMethods(InjectionTargetBean<T> bean)
     {
         Set<ProducerMethodBean<?>> producerBeans = new HashSet<ProducerMethodBean<?>>();
         Set<AnnotatedMethod<? super T>> annotatedMethods = getAnnotated().getMethods();
@@ -695,7 +695,13 @@ public abstract class AbstractInjectionT
                            Set<Class<? extends Annotation>> stereotypes,
                            boolean alternative)
     {
-        return createBean(types, qualifiers, scope, name, nullable, beanClass, stereotypes, alternative, enabled);
+        I bean =  createBean(types, qualifiers, scope, name, nullable, beanClass, stereotypes, alternative, enabled);
+
+        //X TODO hack to set the InjectionTarget
+        InjectionTarget<T> injectionTarget = new InjectionTargetImpl<T>(bean.getAnnotatedType(), bean.getInjectionPoints(), webBeansContext, null, null);
+        bean.setInjectionTarget(injectionTarget);
+
+        return bean;
     }
 
     protected boolean isEnabled()

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/CdiInterceptorBeanBuilder.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/CdiInterceptorBeanBuilder.java?rev=1432983&r1=1432982&r2=1432983&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/CdiInterceptorBeanBuilder.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/CdiInterceptorBeanBuilder.java Mon Jan 14 16:37:45 2013
@@ -51,7 +51,6 @@ public class CdiInterceptorBeanBuilder<T
         checkInterceptorConditions();
         defineInterceptorBindings();
         defineInterceptorRules();
-
     }
 
     public boolean isInterceptorEnabled()

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java?rev=1432983&r1=1432982&r2=1432983&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java Mon Jan 14 16:37:45 2013
@@ -43,14 +43,15 @@ import javax.enterprise.inject.spi.Injec
 import javax.enterprise.inject.spi.ProcessAnnotatedType;
 
 import org.apache.webbeans.annotation.AnnotationManager;
-import org.apache.webbeans.component.AbstractInjectionTargetBean;
+import org.apache.webbeans.component.InjectionTargetBean;
 import org.apache.webbeans.component.AbstractProducerBean;
+import org.apache.webbeans.component.CdiInterceptorBean;
 import org.apache.webbeans.component.EnterpriseBeanMarker;
-import org.apache.webbeans.component.InjectionTargetBean;
 import org.apache.webbeans.component.InterceptedMarker;
 import org.apache.webbeans.component.ManagedBean;
 import org.apache.webbeans.component.NewBean;
 import org.apache.webbeans.component.OwbBean;
+import org.apache.webbeans.component.creation.CdiInterceptorBeanBuilder;
 import org.apache.webbeans.component.creation.ManagedBeanBuilder;
 import org.apache.webbeans.container.BeanManagerImpl;
 import org.apache.webbeans.container.InjectableBeanManager;
@@ -399,13 +400,13 @@ public class BeansDeployer
                        !(bean instanceof javax.enterprise.inject.spi.Interceptor) &&
                        !(bean instanceof NewBean))
                     {
-                        WebBeansDecoratorConfig.configureDecorators((AbstractInjectionTargetBean<Object>)bean);
+                        WebBeansDecoratorConfig.configureDecorators((InjectionTargetBean<Object>)bean);
                     }
                     
                     //If intercepted marker
                     if(bean instanceof InterceptedMarker)
                     {
-                        webBeansContext.getWebBeansInterceptorConfig().defineBeanInterceptorStack((AbstractInjectionTargetBean<Object>) bean);
+                        webBeansContext.getWebBeansInterceptorConfig().defineBeanInterceptorStack((InjectionTargetBean<Object>) bean);
                     }                                                            
                 }                
                 
@@ -868,23 +869,35 @@ public class BeansDeployer
                 {
                     logger.log(Level.FINE, "Found Managed Bean Interceptor with class name : [{0}]", annotatedType.getJavaClass().getName());
                 }
-/*X TODO remove this old code*/
-                if(annotationTypeSet)
+
+                if (WebBeansContext.TODO_USING_NEW_INTERCEPTORS)
                 {
-                    bean = webBeansContext.getWebBeansUtil().defineInterceptor(annotatedType);
+                    CdiInterceptorBeanBuilder<T> ibb
+                            = new CdiInterceptorBeanBuilder<T>(webBeansContext, annotatedType);
+                    if (ibb.isInterceptorEnabled())
+                    {
+                        ibb.defineCdiInterceptorRules();
+                        CdiInterceptorBean<T> interceptor = ibb.getBean();
+                        webBeansContext.getInterceptorsManager().addCdiInterceptor(interceptor);
+                        bean = interceptor;
+                    }
+                    else
+                    {
+                        bean = null;
+                    }
+
                 }
                 else
                 {
-                    bean = managedBeanCreator.defineInterceptor(processInjectionTargetEvent);
-                }
-/*X TODO enable again:
-                CdiInterceptorBeanBuilder<T> ibb
-                        = new CdiInterceptorBeanBuilder<T>(webBeansContext, annotatedType);
-                if (ibb.isInterceptorEnabled()) {
-                    Interceptor<T> interceptor = ibb.getBean();
-                    webBeansContext.getInterceptorsManager().addCdiInterceptor(interceptor);
+                    if(annotationTypeSet)
+                    {
+                        bean = webBeansContext.getWebBeansUtil().defineInterceptor(annotatedType);
+                    }
+                    else
+                    {
+                        bean = managedBeanCreator.defineInterceptor(processInjectionTargetEvent);
+                    }
                 }
-*/
             }
             else
             {

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContext.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContext.java?rev=1432983&r1=1432982&r2=1432983&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContext.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContext.java Mon Jan 14 16:37:45 2013
@@ -63,6 +63,9 @@ import org.apache.webbeans.util.WebBeans
  */
 public class WebBeansContext
 {
+    //X TODO REMOVE, only used while implementing the new Interceptor handling
+    public static final boolean TODO_USING_NEW_INTERCEPTORS = false;
+
     private final Map<Class<?>, Object> managerMap = new HashMap<Class<?>, Object>();
 
     private final Map<Class<?>, Object> serviceMap = new HashMap<Class<?>, Object>();

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/DecoratorUtil.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/DecoratorUtil.java?rev=1432983&r1=1432982&r2=1432983&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/DecoratorUtil.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/DecoratorUtil.java Mon Jan 14 16:37:45 2013
@@ -31,7 +31,7 @@ import javax.enterprise.event.Observes;
 import javax.enterprise.inject.Produces;
 import javax.enterprise.inject.spi.Decorator;
 
-import org.apache.webbeans.component.AbstractInjectionTargetBean;
+import org.apache.webbeans.component.InjectionTargetBean;
 import org.apache.webbeans.config.OWBLogConst;
 import org.apache.webbeans.exception.WebBeansConfigurationException;
 import org.apache.webbeans.exception.WebBeansException;
@@ -79,7 +79,7 @@ public final class DecoratorUtil
         }
     }
    
-    public static void checkManagedBeanDecoratorConditions(AbstractInjectionTargetBean<?> bean, List<Decorator<?>> decoratorList)
+    public static void checkManagedBeanDecoratorConditions(InjectionTargetBean<?> bean, List<Decorator<?>> decoratorList)
     {
         Asserts.assertNotNull("bean", "bean parameter can not be null");
 

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/WebBeansDecorator.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/WebBeansDecorator.java?rev=1432983&r1=1432982&r2=1432983&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/WebBeansDecorator.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/WebBeansDecorator.java Mon Jan 14 16:37:45 2013
@@ -18,18 +18,14 @@
  */
 package org.apache.webbeans.decorator;
 
-import org.apache.webbeans.component.AbstractInjectionTargetBean;
+import org.apache.webbeans.component.InjectionTargetBean;
 import org.apache.webbeans.component.WebBeansType;
 import org.apache.webbeans.config.OWBLogConst;
 import org.apache.webbeans.config.OwbParametrizedTypeImpl;
 import org.apache.webbeans.config.WebBeansContext;
-import org.apache.webbeans.context.creational.CreationalContextImpl;
 import org.apache.webbeans.exception.WebBeansConfigurationException;
 import org.apache.webbeans.exception.WebBeansException;
-import org.apache.webbeans.inject.InjectableField;
-import org.apache.webbeans.inject.InjectableMethod;
 import org.apache.webbeans.logger.WebBeansLoggerFacade;
-import org.apache.webbeans.portable.InjectionTargetImpl;
 import org.apache.webbeans.util.AnnotationUtil;
 import org.apache.webbeans.util.ClassUtil;
 
@@ -46,7 +42,6 @@ import java.lang.annotation.Annotation;
 import java.lang.reflect.AnnotatedElement;
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Field;
-import java.lang.reflect.Method;
 import java.lang.reflect.Type;
 import java.lang.reflect.TypeVariable;
 import java.util.HashSet;
@@ -63,7 +58,7 @@ import java.util.logging.Level;
  *
  * @param <T> decorator type info
  */
-public class WebBeansDecorator<T> extends AbstractInjectionTargetBean<T> implements OwbDecorator<T>
+public class WebBeansDecorator<T> extends InjectionTargetBean<T> implements OwbDecorator<T>
 {
     /** Decorator class */
     private Class<?> clazz;
@@ -83,7 +78,7 @@ public class WebBeansDecorator<T> extend
     protected Field delegateField;
 
     /** Wrapped bean*/
-    private AbstractInjectionTargetBean<T> wrappedBean;
+    private InjectionTargetBean<T> wrappedBean;
     
     /**Custom Decorator*/
     private Decorator<T> customDecorator = null;
@@ -95,7 +90,7 @@ public class WebBeansDecorator<T> extend
      * @param wrappedBean wrapped bean instance
      * @param customDecorator custom decorator
      */
-    public WebBeansDecorator(AbstractInjectionTargetBean<T> wrappedBean, Decorator<T> customDecorator)
+    public WebBeansDecorator(InjectionTargetBean<T> wrappedBean, Decorator<T> customDecorator)
     {
         super(wrappedBean.getWebBeansContext(),
               WebBeansType.DECORATOR,
@@ -115,7 +110,7 @@ public class WebBeansDecorator<T> extend
      * Creates a new decorator bean instance with the given wrapped bean.
      * @param wrappedBean wrapped bean instance
      */
-    public WebBeansDecorator(AbstractInjectionTargetBean<T> wrappedBean)
+    public WebBeansDecorator(InjectionTargetBean<T> wrappedBean)
     {
         super(wrappedBean.getWebBeansContext(),
               WebBeansType.DECORATOR,
@@ -133,7 +128,7 @@ public class WebBeansDecorator<T> extend
         init();
     }
 
-    private static <T> Set<String> getIgnoredDecoratorInterfaces(AbstractInjectionTargetBean<T> wrappedBean)
+    private static <T> Set<String> getIgnoredDecoratorInterfaces(InjectionTargetBean<T> wrappedBean)
     {
         Set<String> result = new HashSet<String>(wrappedBean.getWebBeansContext().getOpenWebBeansConfiguration().getIgnoredInterfaces());
         result.add(Serializable.class.getName());
@@ -423,21 +418,7 @@ public class WebBeansDecorator<T> extend
     {
         this.decoratorGenericType = decoratorGenericType;
     }
-    private void injectField(Field field, Object instance, CreationalContext<?> creationalContext)
-    {
-        InjectionTargetImpl<T> injectionTarget = new InjectionTargetImpl<T>(wrappedBean.getAnnotatedType(), wrappedBean.getInjectionPoints(), wrappedBean.getWebBeansContext());
-        InjectableField f = new InjectableField(field, instance, injectionTarget, (CreationalContextImpl) creationalContext);
-        f.doInjection();        
-    }
 
-    @SuppressWarnings("unchecked")
-    private void injectMethod(Method method, Object instance, CreationalContext<?> creationalContext)
-    {
-        InjectionTargetImpl<T> injectionTarget = new InjectionTargetImpl<T>(wrappedBean.getAnnotatedType(), wrappedBean.getInjectionPoints(), wrappedBean.getWebBeansContext());
-        InjectableMethod m = new InjectableMethod(method, instance, injectionTarget, (CreationalContextImpl) creationalContext);
-        m.doInjection();        
-    }
-        
     @Override
     public Set<Annotation> getQualifiers()
     {

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/WebBeansDecoratorConfig.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/WebBeansDecoratorConfig.java?rev=1432983&r1=1432982&r2=1432983&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/WebBeansDecoratorConfig.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/WebBeansDecoratorConfig.java Mon Jan 14 16:37:45 2013
@@ -29,7 +29,6 @@ import java.util.logging.Logger;
 import javax.enterprise.context.Dependent;
 import javax.enterprise.inject.spi.BeanManager;
 import javax.enterprise.inject.spi.Decorator;
-import org.apache.webbeans.component.AbstractInjectionTargetBean;
 import org.apache.webbeans.component.InjectionTargetBean;
 import org.apache.webbeans.config.OWBLogConst;
 import org.apache.webbeans.context.creational.CreationalContextImpl;
@@ -46,7 +45,7 @@ public final class WebBeansDecoratorConf
 
     }
 
-    public static <T> void configureDecoratorClass(AbstractInjectionTargetBean<T> delegate)
+    public static <T> void configureDecoratorClass(InjectionTargetBean<T> delegate)
     {
         if(delegate.getScope() != Dependent.class)
         {
@@ -81,7 +80,7 @@ public final class WebBeansDecoratorConf
         delegate.getWebBeansContext().getDecoratorsManager().addDecorator(decorator);
     }
 
-    public static void configureDecorators(AbstractInjectionTargetBean<?> component)
+    public static void configureDecorators(InjectionTargetBean<?> component)
     {
         if (!component.getDecoratorStack().isEmpty())
         {
@@ -109,7 +108,7 @@ public final class WebBeansDecoratorConf
         }
     }
     
-    private static void filterDecoratorsPerBDA(AbstractInjectionTargetBean<?> component, List<Decorator<?>> stack)
+    private static void filterDecoratorsPerBDA(InjectionTargetBean<?> component, List<Decorator<?>> stack)
     {
 
         ScannerService scannerService = component.getWebBeansContext().getScannerService();

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/ObserverMethodImpl.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/ObserverMethodImpl.java?rev=1432983&r1=1432982&r2=1432983&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/ObserverMethodImpl.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/ObserverMethodImpl.java Mon Jan 14 16:37:45 2013
@@ -48,10 +48,9 @@ import javax.enterprise.inject.spi.Obser
 import org.apache.webbeans.annotation.AnnotationManager;
 import org.apache.webbeans.annotation.DefaultLiteral;
 import org.apache.webbeans.component.AbstractOwbBean;
-import org.apache.webbeans.component.AbstractInjectionTargetBean;
+import org.apache.webbeans.component.InjectionTargetBean;
 import org.apache.webbeans.component.EventBean;
 import org.apache.webbeans.component.InjectionPointBean;
-import org.apache.webbeans.component.InjectionTargetBean;
 import org.apache.webbeans.component.WebBeansType;
 import org.apache.webbeans.config.OWBLogConst;
 import org.apache.webbeans.config.WebBeansContext;
@@ -524,7 +523,7 @@ public class ObserverMethodImpl<T> imple
     @SuppressWarnings("unchecked")
     public Class<?> getBeanClass()
     {
-        AbstractInjectionTargetBean<T> abs = (AbstractInjectionTargetBean<T>) bean;
+        InjectionTargetBean<T> abs = (InjectionTargetBean<T>) bean;
         return abs.getBeanClass();
     }
 

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorHandlerPleaseRemove.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorHandlerPleaseRemove.java?rev=1432983&r1=1432982&r2=1432983&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorHandlerPleaseRemove.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorHandlerPleaseRemove.java Mon Jan 14 16:37:45 2013
@@ -97,7 +97,7 @@ import org.apache.webbeans.util.ClassUti
  * configuration is done by the
  * {@link WebBeansInterceptorConfig#defineBeanInterceptorStack
  *        (org.apache.webbeans.component.AbstractInjectionTargetBean)} and
- * {@link WebBeansDecoratorConfig#configureDecorators(org.apache.webbeans.component.AbstractInjectionTargetBean)}}. In
+ * {@link WebBeansDecoratorConfig#configureDecorators(org.apache.webbeans.component.InjectionTargetBean)}}. In
  * "webBeansContext.getWebBeansInterceptorConfig().defineBeanInterceptorStack", firstly it configures
  * "EJB spec. interceptors" after that configures "JSR-299 spec. interceptors."
  * In "DefinitionUtil.defineDecoratorStack", it configures

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/WebBeansInterceptorConfig.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/WebBeansInterceptorConfig.java?rev=1432983&r1=1432982&r2=1432983&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/WebBeansInterceptorConfig.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/WebBeansInterceptorConfig.java Mon Jan 14 16:37:45 2013
@@ -19,7 +19,7 @@
 package org.apache.webbeans.intercept;
 
 import org.apache.webbeans.annotation.AnnotationManager;
-import org.apache.webbeans.component.AbstractInjectionTargetBean;
+import org.apache.webbeans.component.InjectionTargetBean;
 import org.apache.webbeans.component.EnterpriseBeanMarker;
 import org.apache.webbeans.config.OWBLogConst;
 import org.apache.webbeans.config.WebBeansContext;
@@ -79,8 +79,10 @@ public final class WebBeansInterceptorCo
      * @param bean bean instance
      * @deprecated old InterceptorData based config
      */
-    public void defineBeanInterceptorStack(AbstractInjectionTargetBean<?> bean)
+    public void defineBeanInterceptorStack(InjectionTargetBean<?> bean)
     {
+        if (WebBeansContext.TODO_USING_NEW_INTERCEPTORS) return; //X TODO
+
         Asserts.assertNotNull(bean, "bean parameter can no be null");
         if (!bean.getInterceptorStack().isEmpty())
         {
@@ -128,7 +130,7 @@ public final class WebBeansInterceptorCo
      *
      * @param interceptorBindingTypes interceptor class
      */
-    public <T> void configureInterceptorClass(AbstractInjectionTargetBean<T> delegate, Annotation[] interceptorBindingTypes)
+    public <T> void configureInterceptorClass(InjectionTargetBean<T> delegate, Annotation[] interceptorBindingTypes)
     {
         if(delegate.getScope() != Dependent.class)
         {
@@ -189,7 +191,7 @@ public final class WebBeansInterceptorCo
      * Configures the given class for applicable interceptors.
      *
      */
-    public void configure(AbstractInjectionTargetBean<?> component, List<InterceptorData> stack)
+    public void configure(InjectionTargetBean<?> component, List<InterceptorData> stack)
     {
         AnnotatedType<?> annotatedType = component.getAnnotatedType();
         Set<Annotation> annotations = annotatedType.getAnnotations();
@@ -227,7 +229,7 @@ public final class WebBeansInterceptorCo
 
     }
 
-    private void filterInterceptorsPerBDA(AbstractInjectionTargetBean<?> component, List<InterceptorData> stack)
+    private void filterInterceptorsPerBDA(InjectionTargetBean<?> component, List<InterceptorData> stack)
     {
 
         ScannerService scannerService = component.getWebBeansContext().getScannerService();

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/webbeans/WebBeansInterceptorBeanPleaseRemove.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/webbeans/WebBeansInterceptorBeanPleaseRemove.java?rev=1432983&r1=1432982&r2=1432983&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/webbeans/WebBeansInterceptorBeanPleaseRemove.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/webbeans/WebBeansInterceptorBeanPleaseRemove.java Mon Jan 14 16:37:45 2013
@@ -19,17 +19,13 @@
 package org.apache.webbeans.intercept.webbeans;
 
 import org.apache.webbeans.annotation.AnnotationManager;
-import org.apache.webbeans.component.AbstractInjectionTargetBean;
+import org.apache.webbeans.component.InjectionTargetBean;
 import org.apache.webbeans.component.AbstractOwbBean;
 import org.apache.webbeans.component.WebBeansType;
 import org.apache.webbeans.config.WebBeansContext;
-import org.apache.webbeans.context.creational.CreationalContextImpl;
 import org.apache.webbeans.exception.WebBeansConfigurationException;
 import org.apache.webbeans.exception.WebBeansException;
-import org.apache.webbeans.inject.InjectableField;
-import org.apache.webbeans.inject.InjectableMethod;
 import org.apache.webbeans.intercept.OwbInterceptor;
-import org.apache.webbeans.portable.InjectionTargetImpl;
 import org.apache.webbeans.util.AnnotationUtil;
 
 import javax.enterprise.context.Dependent;
@@ -45,7 +41,6 @@ import javax.interceptor.AroundInvoke;
 import javax.interceptor.AroundTimeout;
 import javax.interceptor.InvocationContext;
 import java.lang.annotation.Annotation;
-import java.lang.reflect.Field;
 import java.lang.reflect.Method;
 import java.lang.reflect.Type;
 import java.util.HashMap;
@@ -82,11 +77,11 @@ public class WebBeansInterceptorBeanPlea
      * OWB currently scans any &#064;Interceptor class as standard bean and then 'wraps'
      * it with this Bean. Imo this is wrong as an InterceptorBean has different rules alltogether.
      */
-    private AbstractInjectionTargetBean<T> delegateBean;
+    private InjectionTargetBean<T> delegateBean;
 
     private final WebBeansContext webBeansContext;
 
-    public WebBeansInterceptorBeanPleaseRemove(AbstractInjectionTargetBean<T> delegateBean)
+    public WebBeansInterceptorBeanPleaseRemove(InjectionTargetBean<T> delegateBean)
     {
         super(delegateBean.getWebBeansContext(),
               WebBeansType.INTERCEPTOR,
@@ -301,21 +296,7 @@ public class WebBeansInterceptorBeanPlea
         return proxy;
     }
     
-    private void injectField(Field field, Object instance, CreationalContext<?> creationalContext)
-    {
-        InjectionTargetImpl<T> injectionTarget = new InjectionTargetImpl<T>(getAnnotatedType(), getInjectionPoints(), getWebBeansContext());
-        InjectableField f = new InjectableField(field, instance, injectionTarget, (CreationalContextImpl) creationalContext);
-        f.doInjection();        
-    }
 
-    @SuppressWarnings("unchecked")
-    private void injectMethod(Method method, Object instance, CreationalContext<?> creationalContext)
-    {
-        InjectionTargetImpl<T> injectionTarget = new InjectionTargetImpl<T>(getAnnotatedType(), getInjectionPoints(), getWebBeansContext());
-        InjectableMethod m = new InjectableMethod(method, instance, injectionTarget, (CreationalContextImpl) creationalContext);
-        m.doInjection();        
-    }
-    
     @Override
     public Set<Annotation> getQualifiers()
     {

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/InjectionTargetImpl.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/InjectionTargetImpl.java?rev=1432983&r1=1432982&r2=1432983&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/InjectionTargetImpl.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/InjectionTargetImpl.java Mon Jan 14 16:37:45 2013
@@ -45,6 +45,7 @@ import org.apache.webbeans.inject.Inject
 import org.apache.webbeans.inject.InjectableField;
 import org.apache.webbeans.inject.InjectableMethod;
 import org.apache.webbeans.util.Asserts;
+import org.apache.webbeans.util.ExceptionUtil;
 
 
 public class InjectionTargetImpl<T> extends AbstractProducer<T> implements InjectionTarget<T>
@@ -54,13 +55,30 @@ public class InjectionTargetImpl<T> exte
     private AnnotatedConstructor<T> constructor;
     private WebBeansContext context;
 
-    public InjectionTargetImpl(AnnotatedType<T> annotatedType, Set<InjectionPoint> points, WebBeansContext webBeansContext)
+    /**
+     * If the InjectionTarget has a &#064;PostConstruct method, <code>null</code> if not.
+     * This method only gets used if the produced instance is not intercepted.
+     * This method must have the signature <code>void METHOD();</code>
+     */
+    private Method postConstructMethod;
+
+    /**
+     * If the InjectionTarget has a &#064;PreDestroy method, <code>null</code> if not.
+     * This method only gets used if the produced instance is not intercepted.
+     * This method must have the signature <code>void METHOD();</code>
+     */
+    private Method preDestroyMethod;
+
+    public InjectionTargetImpl(AnnotatedType<T> annotatedType, Set<InjectionPoint> points, WebBeansContext webBeansContext,
+                               Method postConstructMethod, Method preDestroyMethod)
     {
         super(points);
         Asserts.assertNotNull(annotatedType);
         Asserts.assertNotNull(webBeansContext);
         type = annotatedType;
         context = webBeansContext;
+        this.postConstructMethod = postConstructMethod;
+        this.preDestroyMethod = preDestroyMethod;
     }
 
     @Override
@@ -144,11 +162,49 @@ public class InjectionTargetImpl<T> exte
     @Override
     public void postConstruct(T instance)
     {
+        if (postConstructMethod != null)
+        {
+            try
+            {
+                if (!postConstructMethod.isAccessible())
+                {
+                    postConstructMethod.setAccessible(true);
+                }
+                postConstructMethod.invoke(instance);
+            }
+            catch (Exception e)
+            {
+                ExceptionUtil.throwAsRuntimeException(e);
+            }
+        }
+        else
+        {
+            //X TODO check if there is an interceptor
+        }
     }
 
     @Override
     public void preDestroy(T instance)
     {
+        if (preDestroyMethod != null)
+        {
+            try
+            {
+                if (!preDestroyMethod.isAccessible())
+                {
+                    preDestroyMethod.setAccessible(true);
+                }
+                preDestroyMethod.invoke(instance);
+            }
+            catch (Exception e)
+            {
+                ExceptionUtil.throwAsRuntimeException(e);
+            }
+        }
+        else
+        {
+            //X TODO check if there is an interceptor
+        }
     }
 
     private AnnotatedConstructor<T> getConstructor()

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=1432983&r1=1432982&r2=1432983&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 Mon Jan 14 16:37:45 2013
@@ -36,7 +36,6 @@ import org.apache.webbeans.exception.Web
 import org.apache.webbeans.inject.AbstractInjectable;
 import org.apache.webbeans.intercept.InvocationContextImpl;
 import org.apache.webbeans.logger.WebBeansLoggerFacade;
-import org.apache.webbeans.portable.InjectionTargetImpl;
 import org.apache.webbeans.proxy.ProxyFactory;
 import org.apache.webbeans.util.WebBeansUtil;
 
@@ -79,7 +78,7 @@ public class InjectionTargetProducer<T> 
             if(ctx instanceof CreationalContextImpl)
             {
                 contextual = ((CreationalContextImpl)ctx).getBean();
-                isInjectionToAnotherBean = contextual == getBean(InjectionTargetBean.class) ? false : true;
+                isInjectionToAnotherBean = contextual != getBean(InjectionTargetBean.class);
             }
             
             if(!isInjectionToAnotherBean)
@@ -103,8 +102,8 @@ public class InjectionTargetProducer<T> 
                 }
                 
                 bean.injectResources(instance, ctx);
-                new InjectionTargetImpl<T>(bean.getAnnotatedType(), bean.getInjectionPoints(), bean.getWebBeansContext()).inject(instance, ctx);
-            }                    
+                bean.getInjectionTarget().inject(instance, ctx);
+            }
         }
         finally
         {

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java?rev=1432983&r1=1432982&r2=1432983&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java Mon Jan 14 16:37:45 2013
@@ -89,7 +89,7 @@ import javax.interceptor.AroundTimeout;
 import javax.interceptor.InvocationContext;
 
 import org.apache.webbeans.annotation.AnnotationManager;
-import org.apache.webbeans.component.AbstractInjectionTargetBean;
+import org.apache.webbeans.component.InjectionTargetBean;
 import org.apache.webbeans.component.AbstractOwbBean;
 import org.apache.webbeans.component.AbstractProducerBean;
 import org.apache.webbeans.component.BeanManagerBean;
@@ -98,7 +98,6 @@ import org.apache.webbeans.component.Ent
 import org.apache.webbeans.component.EventBean;
 import org.apache.webbeans.component.ExtensionBean;
 import org.apache.webbeans.component.InjectionPointBean;
-import org.apache.webbeans.component.InjectionTargetBean;
 import org.apache.webbeans.component.InstanceBean;
 import org.apache.webbeans.component.ManagedBean;
 import org.apache.webbeans.component.NewBean;
@@ -1864,7 +1863,7 @@ public final class WebBeansUtil
      * @param bean bean instance
      * @return event
      */
-    public <T> GProcessInjectionTarget fireProcessInjectionTargetEvent(AbstractInjectionTargetBean<T> bean)
+    public <T> GProcessInjectionTarget fireProcessInjectionTargetEvent(InjectionTargetBean<T> bean)
     {
         GProcessInjectionTarget processInjectionTargetEvent = createProcessInjectionTargetEvent(bean);
         return fireProcessInjectionTargetEvent(processInjectionTargetEvent);
@@ -1880,7 +1879,7 @@ public final class WebBeansUtil
         return processInjectionTargetEvent;
     }
 
-    public <T> GProcessInjectionTarget createProcessInjectionTargetEvent(AbstractInjectionTargetBean<T> bean)
+    public <T> GProcessInjectionTarget createProcessInjectionTargetEvent(InjectionTargetBean<T> bean)
     {
         InjectionTargetProducer<T> injectionTarget = new InjectionTargetProducer<T>(bean);
         return new GProcessInjectionTarget(injectionTarget, bean.getAnnotatedType());

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/contexts/session/common/PersonalDataBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/contexts/session/common/PersonalDataBean.java?rev=1432983&r1=1432982&r2=1432983&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/contexts/session/common/PersonalDataBean.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/contexts/session/common/PersonalDataBean.java Mon Jan 14 16:37:45 2013
@@ -24,12 +24,10 @@ import javax.annotation.PostConstruct;
 import javax.annotation.PreDestroy;
 import javax.enterprise.context.SessionScoped;
 import javax.inject.Inject;
-import javax.inject.Named;
 
 import org.apache.webbeans.newtests.injection.circular.beans.CircularDependentScopedBean;
 import org.apache.webbeans.test.component.event.normal.Transactional;
 
-@Named("org.apache.webbeans.newtests.contexts.session.common.PersonalDataBean")
 @SessionScoped
 public class PersonalDataBean implements Serializable
 {

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/contexts/session/tests/SessionContextTest.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/contexts/session/tests/SessionContextTest.java?rev=1432983&r1=1432982&r2=1432983&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/contexts/session/tests/SessionContextTest.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/contexts/session/tests/SessionContextTest.java Mon Jan 14 16:37:45 2013
@@ -22,7 +22,6 @@ import java.util.ArrayList;
 import java.util.Collection;
 
 import javax.enterprise.context.SessionScoped;
-import javax.enterprise.inject.spi.Bean;
 
 import junit.framework.Assert;
 
@@ -50,10 +49,10 @@ public class SessionContextTest extends 
         
         startContainer(classes);
         
-        Bean<?> bean = getBeanManager().getBeans("org.apache.webbeans.newtests.contexts.session.common.PersonalDataBean").iterator().next();
-        Object instance = getBeanManager().getReference(bean, PersonalDataBean.class, getBeanManager().createCreationalContext(bean));
-        
-        PersonalDataBean dataBean = (PersonalDataBean)instance;
+        PersonalDataBean.POST_CONSTRUCT = false;
+        PersonalDataBean.PRE_DESTROY = false;
+
+        PersonalDataBean dataBean = getInstance(PersonalDataBean.class);
         Assert.assertNotNull(dataBean);
         
         dataBean.business();

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/TestContext.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/TestContext.java?rev=1432983&r1=1432982&r2=1432983&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/TestContext.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/TestContext.java Mon Jan 14 16:37:45 2013
@@ -19,7 +19,6 @@
 package org.apache.webbeans.test;
 
 import java.lang.annotation.Annotation;
-import java.lang.reflect.Constructor;
 import java.lang.reflect.Modifier;
 import java.lang.reflect.Type;
 import java.util.HashSet;
@@ -38,7 +37,7 @@ import javax.enterprise.inject.spi.BeanM
 import javax.interceptor.Interceptor;
 
 import org.apache.webbeans.component.AbstractOwbBean;
-import org.apache.webbeans.component.AbstractInjectionTargetBean;
+import org.apache.webbeans.component.InjectionTargetBean;
 import org.apache.webbeans.component.AbstractProducerBean;
 import org.apache.webbeans.component.ManagedBean;
 import org.apache.webbeans.component.ProducerFieldBean;
@@ -75,7 +74,6 @@ import org.apache.webbeans.test.sterotyp
 import org.apache.webbeans.test.sterotype.StereoWithSessionScope2;
 import org.apache.webbeans.util.AnnotationUtil;
 import org.apache.webbeans.util.ClassUtil;
-import org.apache.webbeans.util.WebBeansUtil;
 import org.apache.webbeans.xml.WebBeansXMLConfigurator;
 
 /**
@@ -273,7 +271,7 @@ public abstract class TestContext implem
      * @param clazz simple webbeans class
      * @return simple webbean
      */
-    protected <T> AbstractInjectionTargetBean<T> defineManagedBean(Class<T> clazz)
+    protected <T> InjectionTargetBean<T> defineManagedBean(Class<T> clazz)
     {
         ManagedBean<T> bean;
 

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/exception/ExceptionComponentTest.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/exception/ExceptionComponentTest.java?rev=1432983&r1=1432982&r2=1432983&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/exception/ExceptionComponentTest.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/exception/ExceptionComponentTest.java Mon Jan 14 16:37:45 2013
@@ -24,7 +24,7 @@ import javax.enterprise.inject.spi.Bean;
 import junit.framework.Assert;
 
 import org.apache.webbeans.component.AbstractOwbBean;
-import org.apache.webbeans.component.AbstractInjectionTargetBean;
+import org.apache.webbeans.component.InjectionTargetBean;
 import org.apache.webbeans.exception.WebBeansConfigurationException;
 import org.apache.webbeans.test.TestContext;
 import org.apache.webbeans.test.component.exception.AroundInvokeWithFinalMethodComponent;
@@ -209,7 +209,7 @@ public class ExceptionComponentTest exte
         try
         {
             clear();
-            AbstractInjectionTargetBean<MoreThanOnePostConstructComponent> component = defineManagedBean(MoreThanOnePostConstructComponent.class);
+            InjectionTargetBean<MoreThanOnePostConstructComponent> component = defineManagedBean(MoreThanOnePostConstructComponent.class);
             AnnotatedType annotatedType = getWebBeansContext().getAnnotatedElementFactory().newAnnotatedType(component.getReturnType());
             getWebBeansContext().getEJBInterceptorConfig().configure(annotatedType, component.getInterceptorStack());
         }
@@ -227,7 +227,7 @@ public class ExceptionComponentTest exte
         try
         {
             clear();
-            AbstractInjectionTargetBean<PostContructMethodHasParameterComponent> component = defineManagedBean(PostContructMethodHasParameterComponent.class);
+            InjectionTargetBean<PostContructMethodHasParameterComponent> component = defineManagedBean(PostContructMethodHasParameterComponent.class);
             AnnotatedType annotatedType = getWebBeansContext().getAnnotatedElementFactory().newAnnotatedType(component.getReturnType());
             getWebBeansContext().getEJBInterceptorConfig().configure(annotatedType, component.getInterceptorStack());
         }
@@ -245,7 +245,7 @@ public class ExceptionComponentTest exte
         try
         {
             clear();
-            AbstractInjectionTargetBean<?> component = defineManagedBean(PostContructMethodHasReturnTypeComponent.class);
+            InjectionTargetBean<?> component = defineManagedBean(PostContructMethodHasReturnTypeComponent.class);
             AnnotatedType annotatedType = getWebBeansContext().getAnnotatedElementFactory().newAnnotatedType(component.getReturnType());
             getWebBeansContext().getEJBInterceptorConfig().configure(annotatedType, component.getInterceptorStack());
         }
@@ -263,7 +263,7 @@ public class ExceptionComponentTest exte
         try
         {
             clear();
-            AbstractInjectionTargetBean<?> component = defineManagedBean(PostContructMethodHasCheckedExceptionComponent.class);
+            InjectionTargetBean<?> component = defineManagedBean(PostContructMethodHasCheckedExceptionComponent.class);
             AnnotatedType annotatedType = getWebBeansContext().getAnnotatedElementFactory().newAnnotatedType(component.getReturnType());
             getWebBeansContext().getEJBInterceptorConfig().configure(annotatedType, component.getInterceptorStack());
         }
@@ -281,7 +281,7 @@ public class ExceptionComponentTest exte
         try
         {
             clear();
-            AbstractInjectionTargetBean<?> component = defineManagedBean(PostContructMethodHasStaticComponent.class);
+            InjectionTargetBean<?> component = defineManagedBean(PostContructMethodHasStaticComponent.class);
             AnnotatedType annotatedType = getWebBeansContext().getAnnotatedElementFactory().newAnnotatedType(component.getReturnType());
             getWebBeansContext().getEJBInterceptorConfig().configure(annotatedType, component.getInterceptorStack());
         }
@@ -299,7 +299,7 @@ public class ExceptionComponentTest exte
         try
         {
             clear();
-            AbstractInjectionTargetBean<?> component = defineManagedBean(MoreThanOneAroundInvokeComponent.class);
+            InjectionTargetBean<?> component = defineManagedBean(MoreThanOneAroundInvokeComponent.class);
             AnnotatedType annotatedType = getWebBeansContext().getAnnotatedElementFactory().newAnnotatedType(component.getReturnType());
             getWebBeansContext().getEJBInterceptorConfig().configure(annotatedType, component.getInterceptorStack());
         }
@@ -318,7 +318,7 @@ public class ExceptionComponentTest exte
         defineManagedBean(AroundInvokeWithSameMethodNameComponent.class);
         Bean<?> comp = getComponents().get(0);
 
-        Assert.assertEquals(0, ((AbstractInjectionTargetBean<?>) comp).getInterceptorStack().size());
+        Assert.assertEquals(0, ((InjectionTargetBean<?>) comp).getInterceptorStack().size());
     }
 
     @Test
@@ -327,7 +327,7 @@ public class ExceptionComponentTest exte
         try
         {
             clear();
-            AbstractInjectionTargetBean<?> component = defineManagedBean(AroundInvokeWithoutParameterComponent.class);
+            InjectionTargetBean<?> component = defineManagedBean(AroundInvokeWithoutParameterComponent.class);
             AnnotatedType annotatedType = getWebBeansContext().getAnnotatedElementFactory().newAnnotatedType(component.getReturnType());
             getWebBeansContext().getEJBInterceptorConfig().configure(annotatedType, component.getInterceptorStack());
         }
@@ -345,7 +345,7 @@ public class ExceptionComponentTest exte
         try
         {
             clear();
-            AbstractInjectionTargetBean<?> component = defineManagedBean(AroundInvokeWithoutReturnTypeComponent.class);
+            InjectionTargetBean<?> component = defineManagedBean(AroundInvokeWithoutReturnTypeComponent.class);
             AnnotatedType annotatedType = getWebBeansContext().getAnnotatedElementFactory().newAnnotatedType(component.getReturnType());
             getWebBeansContext().getEJBInterceptorConfig().configure(annotatedType, component.getInterceptorStack());
         }
@@ -363,7 +363,7 @@ public class ExceptionComponentTest exte
         try
         {
             clear();
-            AbstractInjectionTargetBean<?> component = defineManagedBean(AroundInvokeWithWrongReturnTypeComponent.class);
+            InjectionTargetBean<?> component = defineManagedBean(AroundInvokeWithWrongReturnTypeComponent.class);
             AnnotatedType annotatedType = getWebBeansContext().getAnnotatedElementFactory().newAnnotatedType(component.getReturnType());
             getWebBeansContext().getEJBInterceptorConfig().configure(annotatedType, component.getInterceptorStack());
         }
@@ -381,7 +381,7 @@ public class ExceptionComponentTest exte
         try
         {
             clear();
-            AbstractInjectionTargetBean<?> component = defineManagedBean(AroundInvokeWithStaticMethodComponent.class);
+            InjectionTargetBean<?> component = defineManagedBean(AroundInvokeWithStaticMethodComponent.class);
             AnnotatedType annotatedType = getWebBeansContext().getAnnotatedElementFactory().newAnnotatedType(component.getReturnType());
             getWebBeansContext().getEJBInterceptorConfig().configure(annotatedType, component.getInterceptorStack());
         }
@@ -399,7 +399,7 @@ public class ExceptionComponentTest exte
         try
         {
             clear();
-            AbstractInjectionTargetBean<?> component = defineManagedBean(AroundInvokeWithFinalMethodComponent.class);
+            InjectionTargetBean<?> component = defineManagedBean(AroundInvokeWithFinalMethodComponent.class);
             AnnotatedType annotatedType = getWebBeansContext().getAnnotatedElementFactory().newAnnotatedType(component.getReturnType());
             getWebBeansContext().getEJBInterceptorConfig().configure(annotatedType, component.getInterceptorStack());
         }
@@ -417,7 +417,7 @@ public class ExceptionComponentTest exte
         try
         {
             clear();
-            AbstractInjectionTargetBean<?> component = defineManagedBean(NoArgConstructorInterceptorComponent.class);
+            InjectionTargetBean<?> component = defineManagedBean(NoArgConstructorInterceptorComponent.class);
             AnnotatedType annotatedType = getWebBeansContext().getAnnotatedElementFactory().newAnnotatedType(component.getReturnType());
             getWebBeansContext().getEJBInterceptorConfig().configure(annotatedType, component.getInterceptorStack());
         }

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/intercept/EJBInterceptorExceptionComponentTest.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/intercept/EJBInterceptorExceptionComponentTest.java?rev=1432983&r1=1432982&r2=1432983&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/intercept/EJBInterceptorExceptionComponentTest.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/intercept/EJBInterceptorExceptionComponentTest.java Mon Jan 14 16:37:45 2013
@@ -22,7 +22,7 @@ import javax.enterprise.inject.spi.Annot
 
 import junit.framework.Assert;
 
-import org.apache.webbeans.component.AbstractInjectionTargetBean;
+import org.apache.webbeans.component.InjectionTargetBean;
 import org.apache.webbeans.exception.WebBeansConfigurationException;
 import org.apache.webbeans.test.TestContext;
 import org.apache.webbeans.test.component.intercept.MultpleInterceptor;
@@ -48,7 +48,7 @@ public class EJBInterceptorExceptionComp
     {
         try
         {
-            AbstractInjectionTargetBean<MultpleInterceptor> component = defineManagedBean(MultpleInterceptor.class);
+            InjectionTargetBean<MultpleInterceptor> component = defineManagedBean(MultpleInterceptor.class);
 
             AnnotatedType annotatedType = getWebBeansContext().getAnnotatedElementFactory().newAnnotatedType(component.getReturnType());
             getWebBeansContext().getEJBInterceptorConfig().configure(annotatedType, component.getInterceptorStack());



Mime
View raw message