openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gerdo...@apache.org
Subject svn commit: r925827 - in /openwebbeans/trunk: webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/util/ webbeans-impl/src/main/java/org/apache/webbeans/component/ webbeans-impl/src/main/java/org/apache/webbeans/component/creation/ webbeans-impl/s...
Date Sun, 21 Mar 2010 17:03:28 GMT
Author: gerdogdu
Date: Sun Mar 21 17:03:28 2010
New Revision: 925827

URL: http://svn.apache.org/viewvc?rev=925827&view=rev
Log:
[OWB-333] InjectionTarget and Producer Handling

Added:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionTargetWrapper.java   (with props)
Modified:
    openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/util/EjbUtility.java
    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
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractProducerBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionTargetBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/OwbBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ProducerFieldBean.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/AbstractBeanCreator.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/AbstractInjectedTargetBeanCreator.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/BeanCreator.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/InjectedTargetBeanCreator.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/ManagedBeanConfigurator.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/DependentContext.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/creation/AbstractProducer.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/portable/creation/ProducerBeansProducer.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/ProcessProducerImpl.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/generics/GProcessProducer.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.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/mock/MockManager.java
    openwebbeans/trunk/webbeans-tck/webprofile-suite.xml

Modified: openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/util/EjbUtility.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/util/EjbUtility.java?rev=925827&r1=925826&r2=925827&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/util/EjbUtility.java (original)
+++ openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/util/EjbUtility.java Sun Mar 21 17:03:28 2010
@@ -28,8 +28,8 @@ import javax.enterprise.inject.spi.Annot
 import javax.enterprise.inject.spi.AnnotatedType;
 import javax.enterprise.inject.spi.Bean;
 import javax.enterprise.inject.spi.ObserverMethod;
-import javax.enterprise.inject.spi.Producer;
 
+import org.apache.webbeans.component.InjectionTargetWrapper;
 import org.apache.webbeans.component.ProducerFieldBean;
 import org.apache.webbeans.component.ProducerMethodBean;
 import org.apache.webbeans.component.creation.BeanCreator.MetaDataProvider;
@@ -58,6 +58,7 @@ public final class EjbUtility
         
     public static <T> void fireEvents(Class<T> clazz, BaseEjbBean<T> ejbBean)
     {
+        BeanManagerImpl manager = BeanManagerImpl.getManager();
         AnnotatedType<T> annotatedType = AnnotatedElementFactory.newAnnotatedType(clazz);
         
         //Fires ProcessAnnotatedType
@@ -92,10 +93,8 @@ public final class EjbUtility
         //Fires ProcessInjectionTarget
         ProcessInjectionTargetImpl<T> processInjectionTargetEvent = WebBeansUtil.fireProcessInjectionTargetEvent(ejbBean);     
         WebBeansUtil.inspectErrorStack("There are errors that are added by ProcessInjectionTarget event observers. Look at logs for further details");
-        if(processInjectionTargetEvent.isSet())
-        {
-            ejbBeanCreator.setInjectedTarget(processInjectionTargetEvent.getInjectionTarget());
-        }
+        //Put final InjectionTarget instance
+        manager.putInjectionTargetWrapper(ejbBean, new InjectionTargetWrapper(processInjectionTargetEvent.getInjectionTarget()));
         
         Map<ProducerMethodBean<?>,AnnotatedMethod<?>> annotatedMethods = new HashMap<ProducerMethodBean<?>, AnnotatedMethod<?>>(); 
         for(ProducerMethodBean<?> producerMethod : producerMethodBeans)
@@ -105,11 +104,7 @@ public final class EjbUtility
             WebBeansUtil.inspectErrorStack("There are errors that are added by ProcessProducer event observers for ProducerMethods. Look at logs for further details");
 
             annotatedMethods.put(producerMethod, method);
-            
-            if(producerEvent.isProducerSet())
-            {
-                producerMethod.setProducer((Producer) ejbBeanCreator);
-            }
+            manager.putInjectionTargetWrapper(producerMethod, new InjectionTargetWrapper(producerEvent.getProducer()));
             
             producerEvent.setProducerSet(false);
         }
@@ -122,11 +117,8 @@ public final class EjbUtility
             WebBeansUtil.inspectErrorStack("There are errors that are added by ProcessProducer event observers for ProducerFields. Look at logs for further details");
             
             annotatedFields.put(producerField, field);
-            
-            if(producerEvent.isProducerSet())
-            {
-                producerField.setProducer((Producer) ejbBeanCreator);
-            }
+            manager.putInjectionTargetWrapper(producerField, new InjectionTargetWrapper(producerEvent.getProducer()));
+
             
             producerEvent.setProducerSet(false);
         }
@@ -158,18 +150,12 @@ public final class EjbUtility
         WebBeansUtil.fireProcessObservableMethodBeanEvent(observerMethodsMap);
         WebBeansUtil.inspectErrorStack("There are errors that are added by ProcessObserverMethod event observers for observer methods. Look at logs for further details");
 
-                
-        //Set InjectionTarget that is used by the container to inject dependencies!
-        if(ejbBeanCreator.isInjectionTargetSet())
-        {
-            ejbBean.setInjectionTarget(ejbBeanCreator);   
-        }
         
-        BeanManagerImpl.getManager().addBean(WebBeansUtil.createNewBean(ejbBean));                
-        BeanManagerImpl.getManager().addBean(ejbBean);
-        BeanManagerImpl.getManager().getBeans().addAll(producerMethodBeans);
+        manager.addBean(WebBeansUtil.createNewBean(ejbBean));                
+        manager.addBean(ejbBean);
+        manager.getBeans().addAll(producerMethodBeans);
         ejbBeanCreator.defineDisposalMethods();
-        BeanManagerImpl.getManager().getBeans().addAll(producerFieldBeans);
+        manager.getBeans().addAll(producerFieldBeans);
     }
     
     private static void checkProducerMethods(Set<ProducerMethodBean<?>> producerMethodBeans, BaseEjbBean<?> bean)

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=925827&r1=925826&r2=925827&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 Sun Mar 21 17:03:28 2010
@@ -28,7 +28,6 @@ import javax.enterprise.inject.spi.Annot
 import javax.enterprise.inject.spi.Bean;
 import javax.enterprise.inject.spi.Decorator;
 import javax.enterprise.inject.spi.InjectionPoint;
-import javax.enterprise.inject.spi.InjectionTarget;
 
 import org.apache.webbeans.annotation.DefaultLiteral;
 import org.apache.webbeans.config.OWBLogConst;
@@ -81,9 +80,6 @@ public abstract class AbstractInjectionT
     /**Annotated type for bean*/
     private AnnotatedType<T> annotatedType;
     
-    /**Fully initialize, true as default*/
-    private boolean fullyInitialize = true;
-    
     /**
      * Holds the all of the interceptor related data, contains around-invoke,
      * post-construct and pre-destroy
@@ -96,15 +92,6 @@ public abstract class AbstractInjectionT
     /**Bean inherited meta data*/
     protected IBeanInheritedMetaData inheritedMetaData;    
     
-    
-    /**
-     * InjectionTargt instance. If this is not null, it is used for creating
-     * instance.
-     * 
-     * @see InjectionTarget
-     */
-    protected InjectionTarget<T> injectionTarget;
-    
     /**
      * Creates a new observer owner component.
      * 
@@ -123,24 +110,8 @@ public abstract class AbstractInjectionT
     {
         T instance = null;
 
-        //If injection target is set by Exntesion Observer, use it
-        if (isInjectionTargetSet())
-        {
-            //Create instance
-            instance = getInjectionTarget().produce(creationalContext);
-            
-            //Injection Operation
-            getInjectionTarget().inject(instance, creationalContext);
-            
-            //Call @PostConstrcut
-            postConstruct(instance, creationalContext);
-        }
-        //Default operations
-        else
-        {
-            //Default creation phases
-            instance = createDefaultInstance(creationalContext);
-        }
+        //Default creation phases
+        instance = createDefaultInstance(creationalContext);
 
         return instance;
     }
@@ -167,22 +138,12 @@ public abstract class AbstractInjectionT
             //Means that Dependent Bean has interceptor/decorator
             if(JavassistProxyFactory.isProxyInstance(result))
             {
+                afterConstructor(instance, creationalContext);
                 dependentProxy = result;
                 isDependentProxy = true;
             }
         }
-        
-        //If not fully initialize instance
-        if(!isFullyInitialize())
-        {
-            if(isDependentProxy)
-            {
-                return dependentProxy;                
-            }
-            
-            return instance;
-        }
-                
+                        
         //Push instance into creational context, this is necessary because
         //Context objects look for instance in the interceptors. If we do not
         //push instance into cretional context, circular exception occurs.
@@ -194,18 +155,6 @@ public abstract class AbstractInjectionT
             cc.push(instance);
         }
         
-        //After constructor
-        afterConstructor(instance, creationalContext);
-        
-        //Clear instance from creational context
-        if(creationalContext instanceof CreationalContextImpl)
-        {
-            CreationalContextImpl<?> cc = (CreationalContextImpl<?>)creationalContext;
-            cc.remove();
-            
-            cc.setProxyInstance(null);
-        }
-        
         //If dependent proxy
         if(isDependentProxy)
         {
@@ -281,14 +230,7 @@ public abstract class AbstractInjectionT
      */
     public void postConstruct(T instance, CreationalContext<T> cretionalContext)
     {
-        if (isInjectionTargetSet())
-        {
-            getInjectionTarget().postConstruct(instance);
-        }
-        else
-        {
-            postConstructDefault(instance, cretionalContext);
-        }
+        postConstructDefault(instance, cretionalContext);
     }
 
     /**
@@ -324,14 +266,7 @@ public abstract class AbstractInjectionT
      */
     public void preDestroy(T instance, CreationalContext<T> creationalContext)
     {
-        if (isInjectionTargetSet())
-        {
-            getInjectionTarget().preDestroy(instance);
-        }
-        else
-        {
-            preDestroyDefault(instance, creationalContext);
-        }
+        preDestroyDefault(instance, creationalContext);
     }
 
     /**
@@ -572,16 +507,6 @@ public abstract class AbstractInjectionT
     }
     
     /**
-     * Sets injection target instance.
-     * 
-     * @param injectionTarget injection target instance
-     */
-    public void setInjectionTarget(InjectionTarget<T> injectionTarget)
-    {
-        this.injectionTarget = injectionTarget;
-    }
-        
-    /**
      * {@inheritDoc}
      */
     public List<InterceptorData> getInterceptorStack()
@@ -612,26 +537,6 @@ public abstract class AbstractInjectionT
     
     
     /**
-     * Returns injection target.
-     * 
-     * @return injection target
-     */
-    public InjectionTarget<T> getInjectionTarget()
-    {
-        return this.injectionTarget;
-    }
-
-    /**
-     * Returns true if injection target instance set, false otherwise.
-     * 
-     * @return true if injection target instance set, false otherwise
-     */
-    protected boolean isInjectionTargetSet()
-    {
-        return this.injectionTarget != null ? true : false;
-    }
-
-    /**
      * Returns bean logger instance.
      * 
      * @return logger
@@ -647,11 +552,6 @@ public abstract class AbstractInjectionT
     @Override
     public Set<InjectionPoint> getInjectionPoints()
     {
-        if (isInjectionTargetSet())
-        {
-            return getInjectionTarget().getInjectionPoints();
-        }
-
         return super.getInjectionPoints();
     }
     
@@ -673,24 +573,6 @@ public abstract class AbstractInjectionT
         this.annotatedType = annotatedType;
     }
     
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void setFullyInitialize(boolean initialize)
-    {
-        this.fullyInitialize = initialize;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean isFullyInitialize()
-    {
-        return this.fullyInitialize;
-    }
-
     /* (non-Javadoc)
      * @see org.apache.webbeans.component.AbstractOwbBean#validatePassivationDependencies()
      */

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=925827&r1=925826&r2=925827&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 Sun Mar 21 17:03:28 2010
@@ -27,7 +27,6 @@ import javax.enterprise.context.spi.Crea
 import javax.enterprise.inject.CreationException;
 import javax.enterprise.inject.Disposes;
 import javax.enterprise.inject.spi.Bean;
-import javax.enterprise.inject.spi.BeanManager;
 import javax.enterprise.inject.spi.InjectionPoint;
 
 import org.apache.webbeans.config.OWBLogConst;
@@ -97,7 +96,7 @@ public abstract class AbstractOwbBean<T>
     private String passivatingId = null;
     
     /**Bean Manager*/
-    private final BeanManager manager;
+    private final BeanManagerImpl manager;
 
     
             
@@ -130,7 +129,7 @@ public abstract class AbstractOwbBean<T>
      * 
      * @return manager instance
      */
-    protected BeanManager getManager()
+    protected BeanManagerImpl getManager()
     {
         return manager;
     }
@@ -149,8 +148,24 @@ public abstract class AbstractOwbBean<T>
             {                
                 creationalContext = CreationalContextFactory.getInstance().wrappedCreationalContext(creationalContext, this); 
             }
+           
+            InjectionTargetWrapper<T> wrapper = getManager().getInjectionTargetWrapper(this);
+            //If wrapper not null
+            if(wrapper != null)
+            {
+                instance = wrapper.produce(creationalContext);
+                wrapper.inject(instance, creationalContext);
+                wrapper.postConstruct(instance);
+            }
+            else
+            {
+                instance = createInstance(creationalContext); 
+                if(this instanceof AbstractInjectionTargetBean)
+                {
+                    ((AbstractInjectionTargetBean<T>)this).afterConstructor(instance, creationalContext);
+                }
+            }
             
-            instance = createInstance(creationalContext);
         }
         catch (Exception re)
         {
@@ -174,6 +189,15 @@ public abstract class AbstractOwbBean<T>
      * @return instance of the bean
      */
     protected abstract T createInstance(CreationalContext<T> creationalContext);
+    
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public T createNewInstance(CreationalContext<T> creationalContext)
+    {
+        return createInstance(creationalContext);
+    }
 
     /*
      * (non-Javadoc)
@@ -183,13 +207,22 @@ public abstract class AbstractOwbBean<T>
     public void destroy(T instance, CreationalContext<T> creationalContext)
     {
         try
-        {            
-            //Destroy instance, call @PreDestroy
-            destroyInstance(instance,creationalContext);
+        {  
+            InjectionTargetWrapper<T> wrapper = getManager().getInjectionTargetWrapper(this);
+            if(wrapper != null)
+            {
+                wrapper.preDestroy(instance);
+                wrapper.dispose(instance);
+            }
+            else
+            {
+                //Destroy instance, call @PreDestroy
+                destroyInstance(instance,creationalContext);
+            }
             
             //Destory dependent instances
-            creationalContext.release();
-                        
+            creationalContext.release();                
+                                    
         }catch(Exception e)
         {
             logger.fatal(OWBLogConst.FATAL_0001, new Object[]{toString()});
@@ -210,6 +243,15 @@ public abstract class AbstractOwbBean<T>
     }
     
     /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void destroyCreatedInstance(T instance, CreationalContext<T> creationalContext)
+    {
+        destroyInstance(instance, creationalContext);
+    }
+    
+    /**
      * TODO there are probably other infos which must get added to make the id unique!
      * If not, it will crash in {@link BeanManagerImpl#addPassivationInfo(javax.enterprise.inject.spi.Bean)}
      * anyway. 

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=925827&r1=925826&r2=925827&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 Sun Mar 21 17:03:28 2010
@@ -20,7 +20,6 @@ import java.util.Set;
 import javax.enterprise.context.spi.CreationalContext;
 import javax.enterprise.inject.spi.Bean;
 import javax.enterprise.inject.spi.InjectionPoint;
-import javax.enterprise.inject.spi.Producer;
 
 import org.apache.webbeans.util.ClassUtil;
 import org.apache.webbeans.util.WebBeansUtil;
@@ -36,9 +35,6 @@ public abstract class AbstractProducerBe
     /** Owner of the producer field component */
     protected InjectionTargetBean<?> ownerComponent;
 
-    /** Producer instance responsible for produce and dispose */
-    protected Producer<T> producer;
-
     /**
      * Create a new instance.
      * 
@@ -69,36 +65,6 @@ public abstract class AbstractProducerBe
     }
 
     /**
-     * Sets producer instance.
-     * 
-     * @param producer producer instance
-     */
-    public void setProducer(Producer<T> producer)
-    {
-        this.producer = producer;
-    }
-
-    /**
-     * Gets producer instance.
-     * 
-     * @return producer instance
-     */
-    public Producer<T> getProducer()
-    {
-        return this.producer;
-    }
-
-    /**
-     * Returns true if producer is set.
-     * 
-     * @return true if producer instance is set
-     */
-    protected boolean isProducerSet()
-    {
-        return producer != null ? true : false;
-    }
-
-    /**
      * {@inheritDoc}
      */
     @Override
@@ -195,11 +161,6 @@ public abstract class AbstractProducerBe
     @Override
     public Set<InjectionPoint> getInjectionPoints()
     {
-        if (isProducerSet())
-        {
-            return getProducer().getInjectionPoints();
-        }
-
         return super.getInjectionPoints();
     }
     

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionTargetBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionTargetBean.java?rev=925827&r1=925826&r2=925827&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionTargetBean.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionTargetBean.java Sun Mar 21 17:03:28 2010
@@ -21,8 +21,6 @@ import java.util.Set;
 import javax.enterprise.context.spi.CreationalContext;
 import javax.enterprise.inject.spi.AnnotatedType;
 import javax.enterprise.inject.spi.Decorator;
-import javax.enterprise.inject.spi.InjectionTarget;
-import javax.enterprise.inject.spi.ProcessInjectionTarget;
 
 import org.apache.webbeans.config.inheritance.IBeanInheritedMetaData;
 import org.apache.webbeans.intercept.InterceptorData;
@@ -91,21 +89,6 @@ public interface InjectionTargetBean<T> 
     public void injectSuperMethods(T instance, CreationalContext<T> creationalContext);
         
     /**
-     * Sets injection target for this bean. This
-     * is generally set by {@link ProcessInjectionTarget}
-     * event.
-     * @param injectionTarget injection target
-     */
-    public void setInjectionTarget(InjectionTarget<T> injectionTarget);
-    
-    /**
-     * Gets injection target or null if not
-     * set.
-     * @return injection target
-     */
-    public InjectionTarget<T> getInjectionTarget();
-    
-    /**
      * Gets all injected fields of bean.
      * @return all injected fields
      */
@@ -195,18 +178,5 @@ public interface InjectionTargetBean<T> 
      * Gets annotated type.
      * @return annotated type
      */
-    public AnnotatedType<T> getAnnotatedType();    
-    
-    /**
-     * If fully initialize then fully initialize instance
-     * otherwise just create instance.
-     * @param initialize fully initialize
-     */
-    public void setFullyInitialize(boolean initialize);
-    
-    /**
-     * Gets fully initialize.
-     * @return fully initialize
-     */
-    public boolean isFullyInitialize();
+    public AnnotatedType<T> getAnnotatedType();        
 }

Added: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionTargetWrapper.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionTargetWrapper.java?rev=925827&view=auto
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionTargetWrapper.java (added)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionTargetWrapper.java Sun Mar 21 17:03:28 2010
@@ -0,0 +1,169 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.webbeans.component;
+
+import java.util.Set;
+
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.spi.InjectionPoint;
+import javax.enterprise.inject.spi.InjectionTarget;
+import javax.enterprise.inject.spi.Producer;
+
+import org.apache.webbeans.portable.creation.InjectionTargetProducer;
+import org.apache.webbeans.portable.creation.ProducerBeansProducer;
+
+/**
+ * Reponsible for producing, injection etc.
+ * of beans. Delegate operations to the wrapped
+ * instance.
+ * <p>
+ * Container uses final InjectionTarget or Producer instance
+ * to use while doing operations on beans.
+ * </p> 
+ * @version $Rev$ $Date$
+ *
+ * @param <T>
+ */
+public class InjectionTargetWrapper<T> implements InjectionTarget<T>
+{
+    /**Wrapped injection target*/
+    //This defaults to InjectionTargetProducer
+    private InjectionTarget<T> wrapped = null;
+    
+    /**Wrapped producer*/
+    //This default to ProducerBeansProducer
+    private Producer<T> wrappedProducer = null;
+    
+    /**
+     * New instance.
+     * @param wrapped wrapped injection target
+     */
+    public InjectionTargetWrapper(InjectionTarget<T> wrapped)
+    {
+        this.wrapped = wrapped;
+    }
+
+    
+    /**
+     * New instance.
+     * @param wrappedProducer wrapped producer.
+     */
+    public InjectionTargetWrapper(Producer<T> wrappedProducer)
+    {
+        this.wrappedProducer = wrappedProducer;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void inject(T instance, CreationalContext<T> ctx)
+    {
+        if(this.wrapped != null)
+        {
+            wrapped.inject(instance, ctx);   
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void postConstruct(T instance)
+    {
+        if(this.wrapped != null)
+        {
+            wrapped.postConstruct(instance);   
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */    
+    @Override
+    public void preDestroy(T instance)
+    {
+        if(this.wrapped != null)
+        {
+            wrapped.preDestroy(instance);   
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */    
+    @Override
+    public void dispose(T instance)
+    {
+        if(this.wrappedProducer != null)
+        {
+            wrappedProducer.dispose(instance);   
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */    
+    @Override
+    public Set<InjectionPoint> getInjectionPoints()
+    {
+        if(this.wrappedProducer != null)
+        {
+            return this.wrappedProducer.getInjectionPoints();
+        }
+        
+        return wrapped.getInjectionPoints();
+    }
+
+    /**
+     * {@inheritDoc}
+     */    
+    @Override
+    public T produce(CreationalContext<T> creationalContext)
+    {
+        if(this.wrappedProducer != null)
+        {
+            return this.wrappedProducer.produce(creationalContext);
+        }
+        
+        return wrapped.produce(creationalContext);
+    }
+    
+    public boolean isOwbProvided()
+    {
+        if(this.wrapped != null)
+        {
+            if(InjectionTargetProducer.class.isAssignableFrom(this.wrapped.getClass()))
+            {
+                return true;
+            }
+        }
+        
+        else if(this.wrappedProducer != null)
+        {
+            if(ProducerBeansProducer.class.isAssignableFrom(this.wrappedProducer.getClass()))
+            {
+                return true;
+            }
+        }
+     
+        return false;
+    }
+
+}

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

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/OwbBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/OwbBean.java?rev=925827&r1=925826&r2=925827&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/OwbBean.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/OwbBean.java Sun Mar 21 17:03:28 2010
@@ -18,6 +18,7 @@ import java.lang.reflect.Member;
 import java.util.List;
 import java.util.Set;
 
+import javax.enterprise.context.spi.CreationalContext;
 import javax.enterprise.inject.spi.*;
 
 import org.apache.webbeans.exception.WebBeansConfigurationException;
@@ -53,8 +54,22 @@ public interface OwbBean<T> extends Bean
      * @see WebBeansType
      */
     public WebBeansType getWebBeansType();
+    
+    /**
+     * Create an instance.
+     * @param creationalContext creaitonal context
+     * @return instance
+     */
+    public T createNewInstance(CreationalContext<T> creationalContext);
 
     /**
+     * Destroys instance.
+     * @param instance instance
+     * @param creationalContext creational
+     */
+    public void destroyCreatedInstance(T instance, CreationalContext<T> creationalContext);
+    
+    /**
      * Adds qualifier.
      * 
      * @param qualifier bean qualifier

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ProducerFieldBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ProducerFieldBean.java?rev=925827&r1=925826&r2=925827&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ProducerFieldBean.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ProducerFieldBean.java Sun Mar 21 17:03:28 2010
@@ -51,16 +51,8 @@ public class ProducerFieldBean<T> extend
     protected T createInstance(CreationalContext<T> creationalContext)
     {
         T instance = null;
-
-        if (isProducerSet())
-        {
-            instance = producer.produce(creationalContext);
-        }
-        else
-        {
-            instance = createDefaultInstance(creationalContext);
-        }
-
+        
+        instance = createDefaultInstance(creationalContext);
         checkNullInstance(instance);
         checkScopeType();
 

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=925827&r1=925826&r2=925827&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 Sun Mar 21 17:03:28 2010
@@ -141,16 +141,7 @@ public class ProducerMethodBean<T> exten
     protected T createInstance(CreationalContext<T> creationalContext)
     {
         T instance = null;
-
-        if (isProducerSet())
-        {
-            instance = getProducer().produce(creationalContext);
-        }
-        else
-        {
-            instance = createDefaultInstance(creationalContext);
-        }
-
+        instance = createDefaultInstance(creationalContext);
         // Check null instance
         checkNullInstance(instance);
 
@@ -214,14 +205,7 @@ public class ProducerMethodBean<T> exten
      */
     public void dispose(T instance, CreationalContext<T> creationalContext)
     {
-        if (isProducerSet())
-        {
-            getProducer().dispose(instance);
-        }
-        else
-        {
-            disposeDefault(instance, creationalContext);
-        }
+        disposeDefault(instance, creationalContext);
     }
 
     /**

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/AbstractBeanCreator.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/AbstractBeanCreator.java?rev=925827&r1=925826&r2=925827&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/AbstractBeanCreator.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/AbstractBeanCreator.java Sun Mar 21 17:03:28 2010
@@ -17,10 +17,7 @@ import java.lang.annotation.Annotation;
 import java.lang.reflect.Type;
 import java.util.Set;
 
-import javax.enterprise.context.spi.CreationalContext;
 import javax.enterprise.inject.spi.AnnotatedType;
-import javax.enterprise.inject.spi.InjectionPoint;
-import javax.enterprise.inject.spi.Producer;
 
 import org.apache.webbeans.component.AbstractOwbBean;
 import org.apache.webbeans.config.DefinitionUtil;
@@ -42,9 +39,6 @@ public class AbstractBeanCreator<T> impl
     /**Default metadata provider*/
     private MetaDataProvider metadataProvider = MetaDataProvider.DEFAULT;
     
-    /**Third party producer or null if not set*/
-    private Producer<T> producer;
-    
     /**Bean annotations*/
     private final Annotation[] beanAnnotations;
     
@@ -53,9 +47,6 @@ public class AbstractBeanCreator<T> impl
      */
     private AnnotatedType<T> annotatedType;
     
-    /**Producer set or not*/
-    private boolean producerSet = false;
-    
     /**
      * Creates a bean instance.
      * 
@@ -72,15 +63,6 @@ public class AbstractBeanCreator<T> impl
      * {@inheritDoc}
      */
     @Override
-    public boolean isProducerSet()
-    {
-        return this.producerSet;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
     public void checkCreateConditions()
     {
         //Sub-class can override this
@@ -215,60 +197,12 @@ public class AbstractBeanCreator<T> impl
     /**
      * {@inheritDoc}
      */
-    @Override
-    public Producer<T> getProducer()
-    {
-        return this.producer;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void setProducer(Producer<T> producer)
-    {
-        this.producer = producer;
-        this.producerSet = true;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
     public AbstractOwbBean<T> getBean()
     {
         return this.bean;
     }
 
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void dispose(T instance)
-    {
-        producer.dispose(instance);
-        
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public Set<InjectionPoint> getInjectionPoints()
-    {
-        return producer.getInjectionPoints();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public T produce(CreationalContext<T> creationalContext)
-    {
-        return producer.produce(creationalContext);
-    }
-    
-    protected AnnotatedType<T> getAnnotatedType()
+   protected AnnotatedType<T> getAnnotatedType()
     {
         return this.annotatedType;
     }

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/AbstractInjectedTargetBeanCreator.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/AbstractInjectedTargetBeanCreator.java?rev=925827&r1=925826&r2=925827&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/AbstractInjectedTargetBeanCreator.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/AbstractInjectedTargetBeanCreator.java Sun Mar 21 17:03:28 2010
@@ -15,8 +15,6 @@ package org.apache.webbeans.component.cr
 
 import java.util.Set;
 
-import javax.enterprise.context.spi.CreationalContext;
-import javax.enterprise.inject.spi.InjectionTarget;
 import javax.enterprise.inject.spi.ObserverMethod;
 
 import org.apache.webbeans.component.AbstractInjectionTargetBean;
@@ -34,12 +32,6 @@ import org.apache.webbeans.util.WebBeans
  */
 public abstract class AbstractInjectedTargetBeanCreator<T> extends AbstractBeanCreator<T> implements InjectedTargetBeanCreator<T>
 {    
-    /**Injection target instance. Null if not set by the ProcessInjectionTarget event*/
-    private InjectionTarget<T> injectionTarget; 
-
-    /**Set or not*/
-    private boolean injectionTargetSet = false;
-    
     /**
      * Creates a new instance.
      * 
@@ -50,15 +42,7 @@ public abstract class AbstractInjectedTa
         super(bean, bean.getReturnType().getDeclaredAnnotations());
     }
     
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean isInjectionTargetSet()
-    {
-        return this.injectionTargetSet;
-    }
-    
+ 
     /**
      * {@inheritDoc}
      */
@@ -165,52 +149,4 @@ public abstract class AbstractInjectedTa
     {
         return (AbstractInjectionTargetBean<T>)super.getBean();
     }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public InjectionTarget<T> getInjectedTarget()
-    {
-        return this.injectionTarget;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void setInjectedTarget(InjectionTarget<T> injectionTarget)
-    {
-        this.injectionTarget = injectionTarget;
-        this.injectionTargetSet = true;
-        //super.setProducer(injectionTarget);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void inject(T instance, CreationalContext<T> ctx)
-    {
-        this.injectionTarget.inject(instance, ctx);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void postConstruct(T instance)
-    {
-        this.injectionTarget.postConstruct(instance);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void preDestroy(T instance)
-    {
-        this.injectionTarget.preDestroy(instance);
-    }
-
 }
\ No newline at end of file

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/BeanCreator.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/BeanCreator.java?rev=925827&r1=925826&r2=925827&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/BeanCreator.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/BeanCreator.java Sun Mar 21 17:03:28 2010
@@ -14,7 +14,6 @@
 package org.apache.webbeans.component.creation;
 
 import javax.enterprise.inject.spi.Bean;
-import javax.enterprise.inject.spi.Producer;
 
 import org.apache.webbeans.component.AbstractOwbBean;
 
@@ -28,7 +27,7 @@ import org.apache.webbeans.component.Abs
  * @version $Rev$ $Date$
  *
  */
-public interface BeanCreator<T> extends Producer<T>
+public interface BeanCreator<T>
 {
     /**
      * MetaDataProvider. 
@@ -75,22 +74,7 @@ public interface BeanCreator<T> extends 
      * @param metadataProvider metadata provider
      */
     public void setMetaDataProvider(MetaDataProvider metadataProvider);
-    
-    /**
-     * Returns producer instance.
-     * 
-     * @return producer instance
-     */
-    public Producer<T> getProducer();
-    
-    /**
-     * Sets producer. If set, it is responsible
-     * for creating bean instance.
-     * 
-     * @param producer set producer
-     */
-    public void setProducer(Producer<T> producer);
-    
+        
     /**
      * Define scope type of the bean.
      * 
@@ -117,12 +101,5 @@ public interface BeanCreator<T> extends 
      * 
      * @return bean instance
      */
-    public AbstractOwbBean<T> getBean();
-    
-    /**
-     * Returns producer instance is set or not.
-     * 
-     * @return producer instance is set or not
-     */
-    public boolean isProducerSet();
+    public AbstractOwbBean<T> getBean();    
 }
\ No newline at end of file

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/InjectedTargetBeanCreator.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/InjectedTargetBeanCreator.java?rev=925827&r1=925826&r2=925827&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/InjectedTargetBeanCreator.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/InjectedTargetBeanCreator.java Sun Mar 21 17:03:28 2010
@@ -15,7 +15,6 @@ package org.apache.webbeans.component.cr
 
 import java.util.Set;
 
-import javax.enterprise.inject.spi.InjectionTarget;
 import javax.enterprise.inject.spi.ObserverMethod;
 
 import org.apache.webbeans.component.InjectionTargetBean;
@@ -33,7 +32,7 @@ import org.apache.webbeans.component.Pro
  *
  * @param <T> bean class info
  */
-public interface InjectedTargetBeanCreator<T> extends InjectionTarget<T>
+public interface InjectedTargetBeanCreator<T>
 {
     /**
      * Defines bean's producer methods.
@@ -67,32 +66,5 @@ public interface InjectedTargetBeanCreat
     /**
      * Define observer methods, a.k.a method parameter with <code>@Observes</code>
      */
-    public Set<ObserverMethod<?>> defineObserverMethods();    
-    
-    /**
-     * Gets injection target.
-     * 
-     * @return injection target
-     */
-    public InjectionTarget<T> getInjectedTarget();
-    
-    /**
-     * Sets injection target.
-     * 
-     * @param injectionTarget injection target
-     */
-    public void setInjectedTarget(InjectionTarget<T> injectionTarget);
-    
-    /**
-     * Returns whether injection target set or not.
-     * 
-     * <p>
-     * If {@link InjectionTarget} instance is set, it is used
-     * for creating bean instance, calling post construct and pre-destroy
-     * methods.
-     * </p>
-     * 
-     * @return injection target set or not
-     */
-    public boolean isInjectionTargetSet();
+    public Set<ObserverMethod<?>> defineObserverMethods();        
 }
\ No newline at end of file

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/ManagedBeanConfigurator.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/ManagedBeanConfigurator.java?rev=925827&r1=925826&r2=925827&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/ManagedBeanConfigurator.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/ManagedBeanConfigurator.java Sun Mar 21 17:03:28 2010
@@ -17,6 +17,7 @@ import java.util.Set;
 import javax.decorator.Decorator;
 import javax.interceptor.Interceptor;
 
+import org.apache.webbeans.component.InjectionTargetWrapper;
 import org.apache.webbeans.component.ManagedBean;
 import org.apache.webbeans.component.ProducerFieldBean;
 import org.apache.webbeans.component.ProducerMethodBean;
@@ -24,6 +25,8 @@ import org.apache.webbeans.component.Web
 import org.apache.webbeans.container.BeanManagerImpl;
 import org.apache.webbeans.exception.WebBeansConfigurationException;
 import org.apache.webbeans.intercept.InterceptorUtil;
+import org.apache.webbeans.portable.creation.InjectionTargetProducer;
+import org.apache.webbeans.portable.creation.ProducerBeansProducer;
 import org.apache.webbeans.util.AnnotationUtil;
 import org.apache.webbeans.util.ClassUtil;
 import org.apache.webbeans.util.WebBeansUtil;
@@ -102,6 +105,7 @@ public final class ManagedBeanConfigurat
      * @throws WebBeansConfigurationException if any configuration exception occurs
      * @deprecated
      */
+    @SuppressWarnings("unchecked")
     public static <T> ManagedBean<T> define(Class<T> clazz, WebBeansType type) throws WebBeansConfigurationException
     {
         BeanManagerImpl manager = BeanManagerImpl.getManager();
@@ -109,6 +113,7 @@ public final class ManagedBeanConfigurat
         checkManagedBeanCondition(clazz);
 
         ManagedBean<T> component = new ManagedBean<T>(clazz, type);
+        manager.putInjectionTargetWrapper(component, new InjectionTargetWrapper(new InjectionTargetProducer(component)));
         
         WebBeansUtil.setInjectionTargetBeanEnableFlag(component);   
         
@@ -136,6 +141,7 @@ public final class ManagedBeanConfigurat
         {
             // add them one after the other to enable serialization handling et al
             manager.addBean(producerMethod);
+            manager.putInjectionTargetWrapper(producerMethod, new InjectionTargetWrapper(new ProducerBeansProducer(producerMethod)));
         }
         
         Set<ProducerFieldBean<?>> producerFields = DefinitionUtil.defineProduerFields(component);
@@ -143,6 +149,7 @@ public final class ManagedBeanConfigurat
         {
             // add them one after the other to enable serialization handling et al
             manager.addBean(producerField);
+            manager.putInjectionTargetWrapper(producerField, new InjectionTargetWrapper(new ProducerBeansProducer(producerField)));
         }
         
 

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=925827&r1=925826&r2=925827&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 Sun Mar 21 17:03:28 2010
@@ -26,6 +26,7 @@ import java.lang.reflect.Type;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashSet;
+import java.util.IdentityHashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
@@ -57,6 +58,7 @@ import javax.naming.StringRefAddr;
 import org.apache.webbeans.component.AbstractOwbBean;
 import org.apache.webbeans.component.EnterpriseBeanMarker;
 import org.apache.webbeans.component.InjectionTargetBean;
+import org.apache.webbeans.component.InjectionTargetWrapper;
 import org.apache.webbeans.component.JmsBeanMarker;
 import org.apache.webbeans.component.NewBean;
 import org.apache.webbeans.component.OwbBean;
@@ -153,6 +155,9 @@ public class BeanManagerImpl implements 
      * This is used as a reference for serialization.
      */
     private ConcurrentHashMap<String, Bean<?>> passivationBeans = new ConcurrentHashMap<String, Bean<?>>(); 
+    
+    private Map<Contextual<?>, InjectionTargetWrapper<?>> injectionTargetWrappers = 
+        Collections.synchronizedMap(new IdentityHashMap<Contextual<?>, InjectionTargetWrapper<?>>());
 
     /**
      * The parent Manager this child is depending from.
@@ -170,6 +175,20 @@ public class BeanManagerImpl implements 
         notificationManager = new NotificationManager();
     }    
     
+    public <T> void putInjectionTargetWrapper(Contextual<T> contextual, InjectionTargetWrapper<T> wrapper)
+    {
+        Asserts.assertNotNull(contextual);
+        Asserts.assertNotNull(wrapper);
+        
+        this.injectionTargetWrappers.put(contextual, wrapper);
+    }
+    
+    public <T> InjectionTargetWrapper<T> getInjectionTargetWrapper(Contextual<T> contextual)
+    {
+        Asserts.assertNotNull(contextual);
+        return (InjectionTargetWrapper<T>)this.injectionTargetWrappers.get(contextual);
+    }
+    
     public ErrorStack getErrorStack()
     {
         return this.errorStack;
@@ -1014,8 +1033,7 @@ public class BeanManagerImpl implements 
     public <T> InjectionTarget<T> createInjectionTarget(AnnotatedType<T> type)
     {
         InjectionTargetBean<T> bean = WebBeansAnnotatedTypeUtil.defineManagedBean(type);
-        bean.setFullyInitialize(false);
-        
+
         return new InjectionTargetProducer<T>(bean);
     }
 

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/DependentContext.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/DependentContext.java?rev=925827&r1=925826&r2=925827&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/DependentContext.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/DependentContext.java Sun Mar 21 17:03:28 2010
@@ -62,7 +62,7 @@ public class DependentContext extends Ab
         }
         else
         {
-            object = component.create(creationalContext);
+            object = component.create(creationalContext);   
         }
         
 

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/creation/AbstractProducer.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/creation/AbstractProducer.java?rev=925827&r1=925826&r2=925827&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/creation/AbstractProducer.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/creation/AbstractProducer.java Sun Mar 21 17:03:28 2010
@@ -20,6 +20,8 @@ import javax.enterprise.inject.spi.Injec
 import javax.enterprise.inject.spi.Producer;
 
 import org.apache.webbeans.component.OwbBean;
+import org.apache.webbeans.context.creational.CreationalContextFactory;
+import org.apache.webbeans.context.creational.CreationalContextImpl;
 
 /**
  * Abstract implementation of {@link Producer} contract.
@@ -31,8 +33,11 @@ import org.apache.webbeans.component.Owb
 public abstract class AbstractProducer<T> implements Producer<T> 
 {
     /**Bean instance*/
-    private OwbBean<T> bean;
+    protected OwbBean<T> bean;
 
+    /**Passing creational context*/
+    protected CreationalContext<T> creationalContext = null;
+    
     /**
      * Create a new producer with given bean.
      * 
@@ -56,9 +61,22 @@ public abstract class AbstractProducer<T
      * {@inheritDoc}
      */
     @Override
+    @SuppressWarnings("unchecked")
     public T produce(CreationalContext<T> creationalContext)
     {
-        return bean.create(creationalContext);
+        T instance = null;
+        if(!(creationalContext instanceof CreationalContextImpl))
+        {
+            creationalContext = CreationalContextFactory.getInstance().wrappedCreationalContext(creationalContext, this.bean);
+        }
+        
+        //Save it
+        this.creationalContext = creationalContext;
+        
+        //Create an instance of the bean
+        instance = bean.createNewInstance(this.creationalContext);
+                
+        return instance; 
     }
     
     /**
@@ -66,7 +84,7 @@ public abstract class AbstractProducer<T
      */
     public void dispose(T instance)
     {
-        //Do nothing as default
+        this.bean.destroyCreatedInstance(instance, this.creationalContext);
     }
 
     /**

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=925827&r1=925826&r2=925827&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 Sun Mar 21 17:03:28 2010
@@ -17,6 +17,8 @@ import javax.enterprise.context.spi.Crea
 import javax.enterprise.inject.spi.InjectionTarget;
 
 import org.apache.webbeans.component.InjectionTargetBean;
+import org.apache.webbeans.context.creational.CreationalContextFactory;
+import org.apache.webbeans.context.creational.CreationalContextImpl;
 
 /**
  * InjectionTargetProducer implementation.
@@ -25,42 +27,56 @@ import org.apache.webbeans.component.Inj
  *
  * @param <T> bean type info
  */
+@SuppressWarnings("unchecked")
 public class InjectionTargetProducer<T> extends AbstractProducer<T> implements InjectionTarget<T>
 {
+    /**
+     * Creates a new injection target producer.
+     * @param bean injection target bean
+     */
     public InjectionTargetProducer(InjectionTargetBean<T> bean)
     {
         super(bean);
     }
-    
-    
-    
+        
+    /**
+     * {@inheritDoc}
+     */
     @Override
     public void inject(T instance, CreationalContext<T> ctx)
     {
-        @SuppressWarnings("unchecked")
+        if(!(ctx instanceof CreationalContextImpl))
+        {
+            ctx = CreationalContextFactory.getInstance().wrappedCreationalContext(ctx, this.bean);
+        }
+        
         InjectionTargetBean<T> bean = getBean(InjectionTargetBean.class);
         
         bean.injectResources(instance, ctx);
+        bean.injectSuperFields(instance, ctx);
+        bean.injectSuperMethods(instance, ctx);
         bean.injectFields(instance, ctx);
         bean.injectMethods(instance, ctx);
     }
-
+    
+    /**
+     * {@inheritDoc}
+     */
     @Override
     public void postConstruct(T instance)
     {
-        @SuppressWarnings("unchecked")
-        InjectionTargetBean<T> bean = getBean(InjectionTargetBean.class);
-        
-        bean.postConstruct(instance,null);
+        InjectionTargetBean<T> bean = getBean(InjectionTargetBean.class);        
+        bean.postConstruct(instance,this.creationalContext);
     }
 
+    /**
+     * {@inheritDoc}
+     */
     @Override
     public void preDestroy(T instance)
     {
-        @SuppressWarnings("unchecked")
-        InjectionTargetBean<T> bean = getBean(InjectionTargetBean.class);
-        
-        bean.preDestroy(instance,null);
+        InjectionTargetBean<T> bean = getBean(InjectionTargetBean.class);        
+        bean.preDestroy(instance,this.creationalContext);
     }
 
 }
\ No newline at end of file

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/creation/ProducerBeansProducer.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/creation/ProducerBeansProducer.java?rev=925827&r1=925826&r2=925827&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/creation/ProducerBeansProducer.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/creation/ProducerBeansProducer.java Sun Mar 21 17:03:28 2010
@@ -32,17 +32,5 @@ public class ProducerBeansProducer<T> ex
     public ProducerBeansProducer(AbstractProducerBean<T> bean)
     {
         super(bean);
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    @SuppressWarnings("unchecked")
-    public void dispose(T instance)
-    {
-        AbstractProducer<T> producer = getBean(AbstractProducer.class);
-        producer.dispose(instance);
-    }
-    
+    }    
 }
\ No newline at end of file

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/ProcessProducerImpl.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/ProcessProducerImpl.java?rev=925827&r1=925826&r2=925827&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/ProcessProducerImpl.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/ProcessProducerImpl.java Sun Mar 21 17:03:28 2010
@@ -38,9 +38,10 @@ public class ProcessProducerImpl<X,T> im
     /**Set or not*/
     private boolean set;
 
-    public ProcessProducerImpl(AnnotatedMember<X> annotateMember)
+    public ProcessProducerImpl(Producer<T> producer,AnnotatedMember<X> annotateMember)
     {
         this.annotateMember = annotateMember;
+        this.producer = producer;
     }
     
     /**

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/generics/GProcessProducer.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/generics/GProcessProducer.java?rev=925827&r1=925826&r2=925827&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/generics/GProcessProducer.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/generics/GProcessProducer.java Sun Mar 21 17:03:28 2010
@@ -14,6 +14,7 @@
 package org.apache.webbeans.portable.events.generics;
 
 import javax.enterprise.inject.spi.AnnotatedMember;
+import javax.enterprise.inject.spi.Producer;
 
 import org.apache.webbeans.portable.events.ProcessProducerImpl;
 import org.apache.webbeans.util.ClassUtil;
@@ -21,9 +22,9 @@ import org.apache.webbeans.util.ClassUti
 @SuppressWarnings("unchecked")
 public class GProcessProducer extends ProcessProducerImpl implements GenericProducerObserverEvent
 {
-    public GProcessProducer(AnnotatedMember<?> annotateMember)
+    public GProcessProducer(Producer<?> producer, AnnotatedMember<?> annotateMember)
     {
-        super(annotateMember);
+        super(producer,annotateMember);
     }
 
     @Override

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=925827&r1=925826&r2=925827&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 Sun Mar 21 17:03:28 2010
@@ -85,7 +85,6 @@ import javax.enterprise.inject.spi.Proce
 import javax.enterprise.inject.spi.ProcessProducerField;
 import javax.enterprise.inject.spi.ProcessProducerMethod;
 import javax.enterprise.inject.spi.ProcessSessionBean;
-import javax.enterprise.inject.spi.Producer;
 import javax.enterprise.util.TypeLiteral;
 import javax.inject.Inject;
 import javax.inject.Named;
@@ -104,6 +103,7 @@ import org.apache.webbeans.annotation.Re
 import org.apache.webbeans.component.AbstractOwbBean;
 import org.apache.webbeans.component.AbstractInjectionTargetBean;
 import org.apache.webbeans.component.AbstractProducerBean;
+import org.apache.webbeans.component.InjectionTargetWrapper;
 import org.apache.webbeans.component.OwbBean;
 import org.apache.webbeans.component.BeanManagerBean;
 import org.apache.webbeans.component.ConversationBean;
@@ -150,6 +150,7 @@ import org.apache.webbeans.plugins.OpenW
 import org.apache.webbeans.plugins.PluginLoader;
 import org.apache.webbeans.portable.AnnotatedElementFactory;
 import org.apache.webbeans.portable.creation.InjectionTargetProducer;
+import org.apache.webbeans.portable.creation.ProducerBeansProducer;
 import org.apache.webbeans.portable.events.ProcessBeanImpl;
 import org.apache.webbeans.portable.events.ProcessInjectionTargetImpl;
 import org.apache.webbeans.portable.events.ProcessProducerImpl;
@@ -2425,7 +2426,7 @@ public final class WebBeansUtil
     
     public static GProcessProducer fireProcessProducerEventForMethod(ProducerMethodBean<?> producerMethod,AnnotatedMethod<?> method)
     {         
-        GProcessProducer producerEvent = new GProcessProducer(method);
+        GProcessProducer producerEvent = new GProcessProducer(new ProducerBeansProducer(producerMethod),method);
         
         //Fires ProcessProducer for methods
         BeanManagerImpl.getManager().fireEvent(producerEvent, AnnotationUtil.EMPTY_ANNOTATION_ARRAY);
@@ -2435,7 +2436,7 @@ public final class WebBeansUtil
     
     public static GProcessProducer fireProcessProducerEventForField(ProducerFieldBean<?> producerField,AnnotatedField<?> field)
     {         
-        GProcessProducer producerEvent = new GProcessProducer(field);
+        GProcessProducer producerEvent = new GProcessProducer(new ProducerBeansProducer(producerField),field);
         
         //Fires ProcessProducer for fields
         BeanManagerImpl.getManager().fireEvent(producerEvent, AnnotationUtil.EMPTY_ANNOTATION_ARRAY);
@@ -2810,6 +2811,7 @@ public final class WebBeansUtil
  
     public static <T> ManagedBean<T> defineManagedBean(ManagedBeanCreatorImpl<T> managedBeanCreator,AnnotatedType<T> annotatedType)
     {
+        BeanManagerImpl manager = BeanManagerImpl.getManager();        
         ManagedBean<T> managedBean = managedBeanCreator.getBean();
         
         Class<T> clazz = annotatedType.getJavaClass();
@@ -2843,10 +2845,8 @@ public final class WebBeansUtil
         ProcessInjectionTargetImpl<T> processInjectionTargetEvent = WebBeansUtil.fireProcessInjectionTargetEvent(managedBean);    
         WebBeansUtil.inspectErrorStack("There are errors that are added by ProcessInjectionTarget event observers. Look at logs for further details");
         
-        if(processInjectionTargetEvent.isSet())
-        {
-            managedBeanCreator.setInjectedTarget(processInjectionTargetEvent.getInjectionTarget());
-        }
+        //Put final InjectionTarget instance
+        manager.putInjectionTargetWrapper(managedBean, new InjectionTargetWrapper(processInjectionTargetEvent.getInjectionTarget()));
         
         Map<ProducerMethodBean<?>,AnnotatedMethod<?>> annotatedMethods = new HashMap<ProducerMethodBean<?>, AnnotatedMethod<?>>(); 
         for(ProducerMethodBean<?> producerMethod : producerMethods)
@@ -2856,12 +2856,8 @@ public final class WebBeansUtil
             WebBeansUtil.inspectErrorStack("There are errors that are added by ProcessProducer event observers for ProducerMethods. Look at logs for further details");
 
             annotatedMethods.put(producerMethod, method);
-            
-            if(producerEvent.isProducerSet())
-            {
-                producerMethod.setProducer((Producer)managedBeanCreator);
-            }
-            
+            manager.putInjectionTargetWrapper(producerMethod, new InjectionTargetWrapper(producerEvent.getProducer()));
+                        
             producerEvent.setProducerSet(false);
         }
         
@@ -2873,11 +2869,7 @@ public final class WebBeansUtil
             WebBeansUtil.inspectErrorStack("There are errors that are added by ProcessProducer event observers for ProducerFields. Look at logs for further details");
             
             annotatedFields.put(producerField, field);
-            
-            if(producerEvent.isProducerSet())
-            {
-                producerField.setProducer((Producer) managedBeanCreator);
-            }
+            manager.putInjectionTargetWrapper(producerField, new InjectionTargetWrapper(producerEvent.getProducer()));
             
             producerEvent.setProducerSet(false);
         }
@@ -2910,12 +2902,6 @@ public final class WebBeansUtil
         WebBeansUtil.fireProcessObservableMethodBeanEvent(observerMethodsMap);
         WebBeansUtil.inspectErrorStack("There are errors that are added by ProcessObserverMethod event observers for observer methods. Look at logs for further details");
         
-        //Set InjectionTarget that is used by the container to inject dependencies!
-        if(managedBeanCreator.isInjectionTargetSet())
-        {
-            managedBean.setInjectionTarget(managedBeanCreator);   
-        }
-
         if(!WebBeansAnnotatedTypeUtil.isAnnotatedTypeDecoratorOrInterceptor(annotatedType))
         {
             beanManager.addBean(WebBeansUtil.createNewBean(managedBean));                
@@ -2992,6 +2978,5 @@ public final class WebBeansUtil
         }
         
         throw new RuntimeException(e);
-    }
-    
+    }    
 }
\ No newline at end of file

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=925827&r1=925826&r2=925827&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 Sun Mar 21 17:03:28 2010
@@ -33,6 +33,7 @@ import junit.framework.Assert;
 
 import org.apache.webbeans.component.AbstractOwbBean;
 import org.apache.webbeans.component.AbstractInjectionTargetBean;
+import org.apache.webbeans.component.InjectionTargetWrapper;
 import org.apache.webbeans.component.ManagedBean;
 import org.apache.webbeans.component.WebBeansType;
 import org.apache.webbeans.component.xml.XMLManagedBean;
@@ -52,6 +53,7 @@ import org.apache.webbeans.logger.WebBea
 import org.apache.webbeans.newtests.AbstractUnitTest;
 import org.apache.webbeans.plugins.PluginLoader;
 import org.apache.webbeans.portable.AnnotatedElementFactory;
+import org.apache.webbeans.portable.creation.InjectionTargetProducer;
 import org.apache.webbeans.portable.events.generics.GProcessAnnotatedType;
 import org.apache.webbeans.test.component.decorator.broken.DelegateAttributeIsnotInterface;
 import org.apache.webbeans.test.component.decorator.broken.DelegateAttributeMustImplementAllDecoratedTypes;
@@ -319,7 +321,7 @@ public abstract class TestContext implem
             manager.addBean(bean);
             
             GProcessAnnotatedType type = new GProcessAnnotatedType(AnnotatedElementFactory.newAnnotatedType(clazz));
-            manager.fireEvent(type, new Annotation[0]);
+            manager.fireEvent(type, new Annotation[0]);            
         }
 
         return bean;

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/mock/MockManager.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/mock/MockManager.java?rev=925827&r1=925826&r2=925827&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/mock/MockManager.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/mock/MockManager.java Sun Mar 21 17:03:28 2010
@@ -84,7 +84,7 @@ public class MockManager implements Bean
         manager.addBean(bean);
         return this;
     }
-
+    
     public BeanManager addContext(Context context)
     {
         return manager.addContext(context);

Modified: openwebbeans/trunk/webbeans-tck/webprofile-suite.xml
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-tck/webprofile-suite.xml?rev=925827&r1=925826&r2=925827&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-tck/webprofile-suite.xml (original)
+++ openwebbeans/trunk/webbeans-tck/webprofile-suite.xml Sun Mar 21 17:03:28 2010
@@ -41,6 +41,64 @@
             <exclude name="integration"></exclude>
          </run>
       </groups>
+      
+      <classes>
+     	<!-- ERROR IN CDI-TCK-134 -->
+     	<class name="org.jboss.jsr299.tck.tests.context.passivating.broken.decoratorWithNonPassivatingBeanConstructor.DecoratorWithNonPassivatingBeanConstructorTest">
+     		<methods>
+     			<exclude name="testPassivationCapableBeanWithNonPassivatingDecoratorBeanConstructorFails"></exclude>
+     		</methods>
+     	</class>     	
+     	
+     	<!-- ERROR IN CDI-TCK-134 -->
+     	<class name="org.jboss.jsr299.tck.tests.context.passivating.broken.decoratorWithNonPassivatingInitializerMethod.DecoratorWithNonPassivatingInitializerMethodTest">
+     		<methods>
+     			<exclude name="testPassivationCapableBeanWithNonPassivatingInitializerInDecoratorFails"></exclude>
+     		</methods>
+     	</class>     	
+
+     	<!-- ERROR IN CDI-TCK-134 -->
+     	<class name="org.jboss.jsr299.tck.tests.context.passivating.broken.decoratorWithNonPassivatingInjectedField.DecoratorWithNonPassivatingInjectedFieldTest">
+     		<methods>
+     			<exclude name="testPassivationCapableBeanWithNonPassivatingDecoratorInjectedFieldFails"></exclude>
+     		</methods>
+     	</class>     	
+     	
+     	<!-- ERROR IN CDI-TCK-137 -->
+     	<class name="org.jboss.jsr299.tck.tests.decorators.invocation.DecoratorInvocationTest">
+     		<methods>
+     			<exclude name="testChainedDecoratorInvocation"></exclude>
+     		</methods>
+     	</class>     	
+
+     	<!-- ERROR IN CDI-TCK-121 -->
+     	<class name="org.jboss.jsr299.tck.tests.extensions.beanManager.BeanManagerTest">
+     		<methods>
+     			<exclude name="testGetPassivationCapableBeanById"></exclude>
+     		</methods>
+     	</class>     
+     	
+     	<!-- ERROR IN CDITCK-138 -->
+     	<class name="org.jboss.jsr299.tck.tests.lookup.injectionpoint.InjectionPointTest">
+     		<methods>
+     			<exclude name="testIsDelegate"></exclude>
+     		</methods>
+     	</class>     
+
+     	<!-- ERROR IN CDITCK-139 -->
+     	<class name="org.jboss.jsr299.tck.tests.decorators.resolution.DecoratorResolutionTest">
+     		<methods>
+     			<exclude name="testDelegateTypeVariableBeanTypeVariable"></exclude>
+     		</methods>
+     	</class>     
+
+     	<!-- TODO EL-RESOLVER PROBLEM -->
+     	<class name="org.jboss.jsr299.tck.tests.context.dependent.DependentContextTest">
+     		<methods>
+     			<exclude name="testDependentsDestroyedWhenElEvaluationCompletes"></exclude>
+     		</methods>
+     	</class>     
+      </classes>
    
       <packages>         
          <package name="org.jboss.jsr299.tck.tests.*"></package>



Mime
View raw message