openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1433709 - in /openwebbeans/trunk/webbeans-impl/src: main/java/org/apache/webbeans/container/ main/java/org/apache/webbeans/portable/creation/ test/java/org/apache/webbeans/test/
Date Tue, 15 Jan 2013 22:29:46 GMT
Author: arne
Date: Tue Jan 15 22:29:45 2013
New Revision: 1433709

URL: http://svn.apache.org/viewvc?rev=1433709&view=rev
Log:
OWB-755: Removed InjectionTargetProducerRemove

Removed:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/creation/InjectionTargetProducerRemove.java
Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java
    openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/TestContext.java

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=1433709&r1=1433708&r2=1433709&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
Tue Jan 15 22:29:45 2013
@@ -32,6 +32,8 @@ import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.CopyOnWriteArraySet;
 
+import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
 import javax.el.ELResolver;
 import javax.el.ExpressionFactory;
 import javax.enterprise.context.ContextNotActiveException;
@@ -42,6 +44,7 @@ import javax.enterprise.context.spi.Cont
 import javax.enterprise.context.spi.CreationalContext;
 import javax.enterprise.inject.Default;
 import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.spi.AnnotatedMethod;
 import javax.enterprise.inject.spi.AnnotatedType;
 import javax.enterprise.inject.spi.Bean;
 import javax.enterprise.inject.spi.BeanManager;
@@ -78,7 +81,7 @@ import org.apache.webbeans.exception.def
 import org.apache.webbeans.exception.inject.DefinitionException;
 import org.apache.webbeans.plugins.OpenWebBeansJmsPlugin;
 import org.apache.webbeans.portable.AnnotatedElementFactory;
-import org.apache.webbeans.portable.creation.InjectionTargetProducerRemove;
+import org.apache.webbeans.portable.InjectionTargetImpl;
 import org.apache.webbeans.portable.events.discovery.ErrorStack;
 import org.apache.webbeans.spi.ScannerService;
 import org.apache.webbeans.spi.adaptor.ELAdaptor;
@@ -935,8 +938,12 @@ public class BeanManagerImpl implements 
         {
             throw new DefinitionException("Could not create InjectionTargetBean for type
" + type.getJavaClass());
         }
+        List<AnnotatedMethod<?>> postConstructMethods
+            = webBeansContext.getInterceptorUtil().getLifecycleMethods(bean.getAnnotatedType(),
PostConstruct.class, true);
+        List<AnnotatedMethod<?>> preDestroyMethods
+            = webBeansContext.getInterceptorUtil().getLifecycleMethods(bean.getAnnotatedType(),
PreDestroy.class, false);
 
-        return new InjectionTargetProducerRemove<T>(bean);
+        return new InjectionTargetImpl<T>(bean.getAnnotatedType(), bean.getInjectionPoints(),
webBeansContext, postConstructMethods, preDestroyMethods);
     }
 
     public <T> Set<ObserverMethod<? super T>> resolveObserverMethods( T
event, Annotation... qualifiers ) 

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=1433709&r1=1433708&r2=1433709&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
Tue Jan 15 22:29:45 2013
@@ -27,10 +27,13 @@ import java.util.List;
 import java.util.Set;
 import java.util.logging.Logger;
 
+import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
 import javax.decorator.Decorator;
 import javax.enterprise.context.Dependent;
 import javax.enterprise.context.spi.Context;
 import javax.enterprise.inject.Typed;
+import javax.enterprise.inject.spi.AnnotatedMethod;
 import javax.enterprise.inject.spi.AnnotatedType;
 import javax.enterprise.inject.spi.Bean;
 import javax.enterprise.inject.spi.BeanManager;
@@ -53,7 +56,7 @@ import org.apache.webbeans.deployment.St
 import org.apache.webbeans.exception.WebBeansConfigurationException;
 import org.apache.webbeans.logger.WebBeansLoggerFacade;
 import org.apache.webbeans.newtests.AbstractUnitTest;
-import org.apache.webbeans.portable.creation.InjectionTargetProducerRemove;
+import org.apache.webbeans.portable.InjectionTargetImpl;
 import org.apache.webbeans.portable.creation.ProducerBeansProducerRemove;
 import org.apache.webbeans.portable.events.generics.GProcessAnnotatedType;
 import org.apache.webbeans.test.component.decorator.broken.DelegateAttributeIsnotInterface;
@@ -535,7 +538,11 @@ public abstract class TestContext implem
         managedBeanCreator.defineInjectedMethods();
         managedBeanCreator.defineDisposalMethods();
         ManagedBean<T> component = managedBeanCreator.getBean();
-        component.setProducer(new InjectionTargetProducerRemove(component));
+        List<AnnotatedMethod<?>> postConstructMethods
+            = webBeansContext.getInterceptorUtil().getLifecycleMethods(component.getAnnotatedType(),
PostConstruct.class, true);
+        List<AnnotatedMethod<?>> preDestroyMethods
+            = webBeansContext.getInterceptorUtil().getLifecycleMethods(component.getAnnotatedType(),
PreDestroy.class, false);
+        component.setProducer(new InjectionTargetImpl<T>(component.getAnnotatedType(),
component.getInjectionPoints(), webBeansContext, postConstructMethods, preDestroyMethods));
 
         webBeansContext.getWebBeansUtil().setInjectionTargetBeanEnableFlag(component);
 



Mime
View raw message