openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1436483 - in /openwebbeans/trunk/webbeans-impl/src: main/java/org/apache/webbeans/component/creation/ExtensionBeanBuilder.java test/java/org/apache/webbeans/newtests/portable/scopeextension/ExternalTestScopeExtension.java
Date Mon, 21 Jan 2013 16:58:44 GMT
Author: struberg
Date: Mon Jan 21 16:58:44 2013
New Revision: 1436483

URL: http://svn.apache.org/viewvc?rev=1436483&view=rev
Log:
OWB-755 fix Producer for ExtensionBean

Previously this did always create a fresh instance instead 
of using the picked up Extension from the container.

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/ExtensionBeanBuilder.java
    openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/portable/scopeextension/ExternalTestScopeExtension.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/ExtensionBeanBuilder.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/ExtensionBeanBuilder.java?rev=1436483&r1=1436482&r2=1436483&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/ExtensionBeanBuilder.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/ExtensionBeanBuilder.java
Mon Jan 21 16:58:44 2013
@@ -20,8 +20,10 @@ package org.apache.webbeans.component.cr
 
 import java.lang.annotation.Annotation;
 import java.lang.reflect.Type;
+import java.util.List;
 import java.util.Set;
 
+import javax.enterprise.inject.spi.AnnotatedMethod;
 import javax.enterprise.inject.spi.AnnotatedType;
 import javax.enterprise.inject.spi.InjectionPoint;
 import javax.enterprise.inject.spi.InjectionTarget;
@@ -38,9 +40,13 @@ public class ExtensionBeanBuilder<T> ext
         super(webBeansContext, webBeansContext.getAnnotatedElementFactory().newAnnotatedType(type));
     }
 
-    protected InjectionTarget<T> buildInjectionTarget(AnnotatedType<T> annotatedType,
+    protected InjectionTarget<T> buildInjectionTarget(Set<Type> types,
+                                                      Set<Annotation> qualifiers,
+                                                      AnnotatedType<T> annotatedType,
                                                       Set<InjectionPoint> points,
-                                                      WebBeansContext webBeansContext)
+                                                      WebBeansContext webBeansContext,
+                                                      List<AnnotatedMethod<?>>
postConstructMethods,
+                                                      List<AnnotatedMethod<?>>
preDestroyMethods)
     {
         return new ExtensionProducer<T>(annotatedType, points, webBeansContext);
     }

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/portable/scopeextension/ExternalTestScopeExtension.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/portable/scopeextension/ExternalTestScopeExtension.java?rev=1436483&r1=1436482&r2=1436483&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/portable/scopeextension/ExternalTestScopeExtension.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/portable/scopeextension/ExternalTestScopeExtension.java
Mon Jan 21 16:58:44 2013
@@ -29,6 +29,10 @@ import org.junit.Assert;
 
 public class ExternalTestScopeExtension implements Extension 
 {
+    public ExternalTestScopeExtension()
+    {
+        System.out.println("ExternalTestScopeExtension got created");
+    }
 
     public void addViewScoped(@Observes BeforeBeanDiscovery beforeBeanDiscovery, BeanManager
beanManager)
     {



Mime
View raw message