aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rotty3...@apache.org
Subject svn commit: r1807424 [7/8] - in /aries/trunk/cdi: ./ cdi-extender/ cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/ cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/bean/ cdi-extender/src/main/java/org/apache/aries/...
Date Tue, 05 Sep 2017 22:01:15 GMT
Added: aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/MockCdiContainer.java
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/MockCdiContainer.java?rev=1807424&view=auto
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/MockCdiContainer.java (added)
+++ aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/MockCdiContainer.java Tue Sep  5 22:01:11 2017
@@ -0,0 +1,89 @@
+/**
+ * Licensed 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.aries.cdi.container.test;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Set;
+
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.Extension;
+
+import org.apache.aries.cdi.container.internal.container.ContainerDeployment;
+import org.apache.aries.cdi.container.internal.container.ContainerEnvironment;
+import org.apache.aries.cdi.container.internal.literal.AnyLiteral;
+import org.jboss.weld.bootstrap.WeldBootstrap;
+import org.jboss.weld.bootstrap.spi.BeanDeploymentArchive;
+import org.jboss.weld.bootstrap.spi.Deployment;
+import org.jboss.weld.bootstrap.spi.Metadata;
+import org.jboss.weld.manager.BeanManagerImpl;
+import org.junit.Assert;
+
+public class MockCdiContainer implements AutoCloseable {
+
+	public MockCdiContainer(String name, String... beanClasses) {
+		this(name, Collections.emptyList(), beanClasses);
+	}
+
+	public MockCdiContainer(String name, List<Metadata<Extension>> extensions, String... beanClasses) {
+		_bda = new MockBeanDeploymentArchive(name, beanClasses);
+
+		Deployment deployment = new ContainerDeployment(extensions, _bda);
+
+		WeldBootstrap bootstrap = new WeldBootstrap();
+
+		bootstrap.startExtensions(extensions);
+		bootstrap.startContainer(new ContainerEnvironment(), deployment);
+		bootstrap.startInitialization();
+		bootstrap.deployBeans();
+		bootstrap.validateBeans();
+		bootstrap.endInitialization();
+
+		_bootstrap = bootstrap;
+	}
+
+	@Override
+	public void close() {
+		_bootstrap.shutdown();
+	}
+
+	public Bean<?> getBean(Class<?> clazz) {
+		final BeanManagerImpl managerImpl = getBeanManager();
+
+		Set<javax.enterprise.inject.spi.Bean<?>> beans =
+			managerImpl.getBeans(clazz, AnyLiteral.INSTANCE);
+
+		Assert.assertFalse(beans.isEmpty());
+
+		return managerImpl.resolve(beans);
+	}
+
+	public BeanManagerImpl getBeanManager() {
+		if (_beanManagerImpl != null) {
+			return _beanManagerImpl;
+		}
+
+		return _beanManagerImpl = _bootstrap.getManager(_bda);
+	}
+
+	public WeldBootstrap getBootstrap() {
+		return _bootstrap;
+	}
+
+	private final BeanDeploymentArchive _bda;
+	private BeanManagerImpl _beanManagerImpl;
+	private final WeldBootstrap _bootstrap;
+
+}
\ No newline at end of file

Added: aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/MockCdiContainerAndComponents.java
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/MockCdiContainerAndComponents.java?rev=1807424&view=auto
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/MockCdiContainerAndComponents.java (added)
+++ aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/MockCdiContainerAndComponents.java Tue Sep  5 22:01:11 2017
@@ -0,0 +1,65 @@
+/**
+ * Licensed 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.aries.cdi.container.test;
+
+import static org.apache.aries.cdi.container.test.TestUtil.*;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.aries.cdi.container.internal.component.ComponentModel;
+import org.apache.aries.cdi.container.internal.container.ContainerDiscovery;
+import org.apache.aries.cdi.container.internal.container.ContainerState;
+import org.apache.aries.cdi.container.internal.model.BeansModel;
+import org.apache.aries.cdi.container.internal.phase.Phase;
+import org.apache.aries.cdi.container.internal.phase.Phase_Configuration;
+
+public class MockCdiContainerAndComponents implements AutoCloseable {
+
+	public MockCdiContainerAndComponents(String name, String... beanClasses) throws Exception {
+		Map<String, ComponentModel> components = new HashMap<>();
+
+		for (String className : beanClasses) {
+			Class<?> clazz = Class.forName(className);
+
+			components.put(className, new ComponentModel.Builder(clazz).build());
+		}
+
+		_beansModel = new BeansModel(components, Collections.emptyList());
+
+		_containerState = getContainerState(_beansModel);
+
+		ContainerDiscovery.discover(_containerState);
+
+		_nextPhase = new Phase_Configuration(_containerState, Collections.emptyList());
+
+		_nextPhase.open();
+	}
+
+	@Override
+	public void close() throws Exception {
+		_nextPhase.close();
+	}
+
+	public ContainerState containerState() {
+		return _containerState;
+	}
+
+	private final BeansModel _beansModel;
+	private ContainerState _containerState;
+	private final Phase _nextPhase;
+
+}
\ No newline at end of file

Copied: aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/MockInjectionPoint.java (from r1806482, aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/ReferenceInjectionPoint.java)
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/MockInjectionPoint.java?p2=aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/MockInjectionPoint.java&p1=aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/ReferenceInjectionPoint.java&r1=1806482&r2=1807424&rev=1807424&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/ReferenceInjectionPoint.java (original)
+++ aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/MockInjectionPoint.java Tue Sep  5 22:01:11 2017
@@ -12,37 +12,35 @@
  * limitations under the License.
  */
 
-package org.apache.aries.cdi.container.internal.model;
+package org.apache.aries.cdi.container.test;
 
 import java.lang.annotation.Annotation;
 import java.lang.reflect.Member;
 import java.lang.reflect.Type;
+import java.util.Collections;
 import java.util.Set;
 
 import javax.enterprise.inject.spi.Annotated;
 import javax.enterprise.inject.spi.Bean;
 import javax.enterprise.inject.spi.InjectionPoint;
 
-import org.apache.aries.cdi.container.internal.literal.AnyLiteral;
-import org.apache.aries.cdi.container.internal.literal.DefaultLiteral;
-import org.apache.aries.cdi.container.internal.literal.ReferenceLiteral;
-import org.apache.aries.cdi.container.internal.util.Sets;
-
-public class ReferenceInjectionPoint implements InjectionPoint {
-
-	public ReferenceInjectionPoint(Class<?> beanClass, String target) {
-		_beanClass = beanClass;
-		_qualifiers = Sets.hashSet(DefaultLiteral.INSTANCE, AnyLiteral.INSTANCE, ReferenceLiteral.from(target));
+import org.jboss.weld.annotated.slim.unbacked.UnbackedAnnotated;
+
+public class MockInjectionPoint implements InjectionPoint {
+
+	public MockInjectionPoint(Type type) {
+		_type = type;
+		_annotated = new UnbackedAnnotated(_type, Collections.emptySet(), Collections.emptySet());
 	}
 
 	@Override
 	public Type getType() {
-		return _beanClass;
+		return _type;
 	}
 
 	@Override
 	public Set<Annotation> getQualifiers() {
-		return _qualifiers;
+		return Collections.emptySet();
 	}
 
 	@Override
@@ -57,7 +55,7 @@ public class ReferenceInjectionPoint imp
 
 	@Override
 	public Annotated getAnnotated() {
-		return null;
+		return _annotated;
 	}
 
 	@Override
@@ -70,7 +68,12 @@ public class ReferenceInjectionPoint imp
 		return false;
 	}
 
-	private final Class<?> _beanClass;
-	private final Set<Annotation> _qualifiers;
+	@Override
+	public String toString() {
+		return getClass().getSimpleName() + "[" + _type + "]";
+	}
+
+	private final Type _type;
+	private final Annotated _annotated;
 
-}
\ No newline at end of file
+}

Added: aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/MockServiceReference.java
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/MockServiceReference.java?rev=1807424&view=auto
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/MockServiceReference.java (added)
+++ aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/MockServiceReference.java Tue Sep  5 22:01:11 2017
@@ -0,0 +1,131 @@
+package org.apache.aries.cdi.container.test;
+
+import java.util.Collections;
+import java.util.Dictionary;
+import java.util.Hashtable;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.osgi.framework.Bundle;
+import org.osgi.framework.Constants;
+import org.osgi.framework.ServiceReference;
+
+public class MockServiceReference<S> implements ServiceReference<S> {
+
+	public MockServiceReference(S service) {
+		_service = service;
+		_properties.put(Constants.SERVICE_ID, _serviceIds.incrementAndGet());
+	}
+
+	@Override
+	public int compareTo(Object other) {
+		if (!(other instanceof ServiceReference)) {
+			return -1;
+		}
+
+		ServiceReference otherReference = (ServiceReference)other;
+
+		Long id = (Long)getProperty(Constants.SERVICE_ID);
+		Long otherId = (Long)otherReference.getProperty(Constants.SERVICE_ID);
+
+		if (id.equals(otherId)) {
+
+			// same service
+
+			return 0;
+		}
+
+		Object rankingObj = getProperty(Constants.SERVICE_RANKING);
+		Object otherRankingObj = otherReference.getProperty(Constants.SERVICE_RANKING);
+
+		// If no rank, then spec says it defaults to zero.
+
+		if (rankingObj == null) {
+			rankingObj = _ZERO;
+		}
+
+		if (otherRankingObj == null) {
+			otherRankingObj = _ZERO;
+		}
+
+		// If rank is not Integer, then spec says it defaults to zero.
+
+		Integer ranking = _ZERO;
+
+		if (rankingObj instanceof Integer) {
+			ranking = (Integer)rankingObj;
+		}
+
+		Integer otherRanking = _ZERO;
+
+		if (otherRankingObj instanceof Integer) {
+			otherRanking = (Integer)otherRankingObj;
+		}
+
+		// Sort by rank in ascending order.
+
+		if (ranking.compareTo(otherRanking) < 0) {
+
+			// lower rank
+
+			return -1;
+		}
+		else if (ranking.compareTo(otherRanking) > 0) {
+
+			// higher rank
+
+			return 1;
+		}
+
+		// If ranks are equal, then sort by service id in descending order.
+
+		if (id.compareTo(otherId) < 0) {
+			return 1;
+		}
+
+		return -1;
+	}
+
+	@Override
+	public Bundle getBundle() {
+		return null;
+	}
+
+	@Override
+	public Object getProperty(String key) {
+		return _properties.get(key);
+	}
+
+	@Override
+	public String[] getPropertyKeys() {
+		return Collections.list(_properties.keys()).toArray(new String[0]);
+	}
+
+	public S getService() {
+		return _service;
+	}
+
+	@Override
+	public Bundle[] getUsingBundles() {
+		return null;
+	}
+
+	@Override
+	public boolean isAssignableTo(Bundle bundle, String className) {
+		return true;
+	}
+
+	public void setProperty(String key, Object value) {
+		if (Constants.SERVICE_ID.equals(key)) {
+			return;
+		}
+		_properties.put(key, value);
+	}
+
+	public static final AtomicInteger _serviceIds = new AtomicInteger();
+
+	private static final Integer _ZERO = new Integer(0);
+
+	private final Dictionary<String, Object> _properties = new Hashtable<>();
+	private final S _service;
+
+}

Added: aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/TestUtil.java
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/TestUtil.java?rev=1807424&view=auto
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/TestUtil.java (added)
+++ aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/TestUtil.java Tue Sep  5 22:01:11 2017
@@ -0,0 +1,249 @@
+/**
+ * Licensed 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.aries.cdi.container.test;
+
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Dictionary;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+import javax.enterprise.inject.spi.BeanManager;
+
+import org.apache.aries.cdi.container.internal.configuration.ConfigurationCallback;
+import org.apache.aries.cdi.container.internal.container.ContainerState;
+import org.apache.aries.cdi.container.internal.model.AbstractModelBuilder;
+import org.apache.aries.cdi.container.internal.model.BeansModel;
+import org.apache.aries.cdi.container.internal.model.Context;
+import org.apache.aries.cdi.container.internal.model.Registrator;
+import org.apache.aries.cdi.container.internal.model.Tracker;
+import org.apache.aries.cdi.container.internal.reference.ReferenceCallback;
+import org.jboss.weld.resources.spi.ResourceLoader;
+import org.jboss.weld.serialization.spi.ProxyServices;
+import org.osgi.framework.ServiceObjects;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.cdi.CdiConstants;
+import org.osgi.service.cdi.annotations.ConfigurationPolicy;
+import org.osgi.service.cm.ManagedService;
+import org.osgi.util.tracker.ServiceTrackerCustomizer;
+
+public class TestUtil {
+
+	public static ConfigurationCallback getCallback(ConfigurationPolicy policy) {
+		return new ConfigurationCallback.Builder().policy(policy).build();
+	}
+
+	public static AbstractModelBuilder getModelBuilder(final String osgiBeansFile) {
+		return getModelBuilder(
+			Arrays.asList(
+				"OSGI-INF/cdi/beans-configuration.xml",
+				"OSGI-INF/cdi/beans-only.xml",
+				"OSGI-INF/cdi/beans-references.xml",
+				"OSGI-INF/cdi/beans-services.xml"
+			),  osgiBeansFile);
+	}
+
+	public static AbstractModelBuilder getModelBuilder(
+		final List<String> defaultResources, final String osgiBeansFile) {
+
+		return new AbstractModelBuilder() {
+
+			@Override
+			public List<String> getDefaultResources() {
+				return defaultResources;
+			}
+
+			@Override
+			public URL getResource(String resource) {
+				return getClassLoader().getResource(resource);
+			}
+
+			@Override
+			public ClassLoader getClassLoader() {
+				return getClass().getClassLoader();
+			}
+
+			@Override
+			public Map<String, Object> getAttributes() {
+				if (osgiBeansFile == null) {
+					return Collections.emptyMap();
+				}
+
+				return Collections.singletonMap(
+					CdiConstants.REQUIREMENT_OSGI_BEANS_ATTRIBUTE, Arrays.asList(osgiBeansFile));
+			}
+		};
+	}
+
+	public static <T> Collection<T> sort(Collection<T> set) {
+		return sort(set, (c1, c2) -> c1.getClass().getName().compareTo(c2.getClass().getName()));
+	}
+
+	public static <T> Collection<T> sort(Collection<T> set, Comparator<T> comparator) {
+		List<T> list = new ArrayList<>(set);
+
+		Collections.sort(list, comparator);
+
+		return list;
+	}
+
+	public static ContainerState getContainerState(BeansModel beansModel) {
+		final TContext context = new TContext();
+		final TBMRegistrator bmRegistrator = new TBMRegistrator();
+		final TMSRegistrator msRegistrator = new TMSRegistrator();
+		final TRegistrator serviceRegistrator = new TRegistrator();
+		final TTracker tracker = new TTracker();
+
+		return new ContainerState(null, null) {
+
+			@Override
+			public BeansModel beansModel() {
+				return beansModel;
+			}
+
+			public <T extends ResourceLoader & ProxyServices> T loader() {
+				return null;
+			}
+
+			@Override
+			public Context context() {
+				return context;
+			}
+
+			@Override
+			public Registrator<BeanManager> beanManagerRegistrator() {
+				return bmRegistrator;
+			}
+
+			@Override
+			public Registrator<ManagedService> managedServiceRegistrator() {
+				return msRegistrator;
+			}
+
+			@Override
+			public Registrator<Object> serviceRegistrator() {
+				return serviceRegistrator;
+			}
+
+			@Override
+			public Tracker tracker() {
+				return tracker;
+			}
+
+		};
+	}
+
+	public static class TContext extends Context {
+
+		@Override
+		public <T> T getService(ServiceReference<T> reference) {
+			if (reference instanceof MockServiceReference) {
+				return ((MockServiceReference<T>)reference).getService();
+			}
+			return null;
+		}
+
+		@Override
+		public <T> ServiceObjects<T> getServiceObjects(ServiceReference<T> reference) {
+			return null;
+		}
+
+		@Override
+		public <T> boolean ungetService(ServiceReference<T> reference) {
+			return false;
+		}
+
+	}
+
+	public static class TBMRegistrator extends Registrator<BeanManager> {
+
+		@Override
+		public void close() {
+			registrations.clear();
+		}
+
+		@Override
+		public void registerService(String[] classNames, BeanManager service, Dictionary<String, ?> properties) {
+			registrations.put(properties, service);
+		}
+
+		@Override
+		public int size() {
+			return registrations.size();
+		}
+
+		public final Map<Dictionary<String, ?>, BeanManager> registrations = new ConcurrentHashMap<>();
+
+	}
+
+	public static class TMSRegistrator extends Registrator<ManagedService> {
+
+		@Override
+		public void close() {
+			registrations.clear();
+		}
+
+		@Override
+		public void registerService(String[] classNames, ManagedService service, Dictionary<String, ?> properties) {
+			registrations.put(properties, service);
+		}
+
+		@Override
+		public int size() {
+			return registrations.size();
+		}
+
+		public final Map<Dictionary<String, ?>, ManagedService> registrations = new ConcurrentHashMap<>();
+
+	}
+
+	public static class TRegistrator extends Registrator<Object> {
+
+		@Override
+		public void close() {
+			registrations.clear();
+		}
+
+		@Override
+		public void registerService(String[] classNames, Object service, Dictionary<String, ?> properties) {
+			registrations.put(properties, service);
+		}
+
+		@Override
+		public int size() {
+			return registrations.size();
+		}
+
+		public final Map<Dictionary<String, ?>, Object> registrations = new ConcurrentHashMap<>();
+
+	}
+
+	public static class TTracker extends Tracker {
+
+		@Override
+		public <T> void track(String targetFilter, ReferenceCallback callback) {
+			trackers.put(targetFilter, callback);
+		}
+
+		public final Map<String, ServiceTrackerCustomizer<Object, ?>> trackers = new ConcurrentHashMap<>();
+
+	}
+
+}
\ No newline at end of file

Copied: aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/ArrayListFooProducer.java (from r1806482, aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java)
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/ArrayListFooProducer.java?p2=aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/ArrayListFooProducer.java&p1=aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java&r1=1806482&r2=1807424&rev=1807424&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java (original)
+++ aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/ArrayListFooProducer.java Tue Sep  5 22:01:11 2017
@@ -12,12 +12,20 @@
  * limitations under the License.
  */
 
-package org.apache.aries.cdi.container.internal.container;
+package org.apache.aries.cdi.container.test.beans;
 
-public interface Phase {
+import java.util.ArrayList;
 
-	public void close();
+import javax.enterprise.inject.Produces;
 
-	public void open();
+import org.osgi.service.cdi.annotations.Reference;
 
-}
+public class ArrayListFooProducer {
+	@Produces
+	@Reference
+	public ArrayList<Foo> getFoo() {
+		ArrayList<Foo> al = new ArrayList<>();
+		al.add(new Foo() {});
+		return al;
+	}
+}
\ No newline at end of file

Copied: aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/Bar.java (from r1806482, aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/BindType.java)
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/Bar.java?p2=aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/Bar.java&p1=aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/BindType.java&r1=1806482&r2=1807424&rev=1807424&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/BindType.java (original)
+++ aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/Bar.java Tue Sep  5 22:01:11 2017
@@ -12,8 +12,6 @@
  * limitations under the License.
  */
 
-package org.apache.aries.cdi.container.internal.container;
+package org.apache.aries.cdi.container.test.beans;
 
-public enum BindType {
-	SERVICE, SERVICE_PROPERTIES, SERVICE_REFERENCE
-}
\ No newline at end of file
+public interface Bar {}
\ No newline at end of file

Added: aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/BarAnnotated.java
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/BarAnnotated.java?rev=1807424&view=auto
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/BarAnnotated.java (added)
+++ aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/BarAnnotated.java Tue Sep  5 22:01:11 2017
@@ -0,0 +1,61 @@
+/**
+ * Licensed 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.aries.cdi.container.test.beans;
+
+import java.util.Collection;
+import java.util.Map;
+
+import javax.enterprise.inject.Instance;
+import javax.inject.Inject;
+
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.cdi.annotations.Configuration;
+import org.osgi.service.cdi.annotations.Reference;
+import org.osgi.service.cdi.annotations.ReferenceCardinality;
+import org.osgi.service.cdi.annotations.ReferencePolicy;
+import org.osgi.service.cdi.annotations.ReferencePolicyOption;
+import org.osgi.service.cdi.annotations.ReferenceScope;
+
+public class BarAnnotated {
+
+	@Inject
+	@Reference(cardinality = ReferenceCardinality.OPTIONAL)
+	Foo foo;
+
+	@Inject
+	@Reference(name = "foos")
+	Instance<Foo> instanceFoos;
+
+	@Inject
+	@Reference(policy = ReferencePolicy.DYNAMIC)
+	Collection<Foo> collectionFoos;
+
+	@Inject
+	@Reference(policyOption = ReferencePolicyOption.GREEDY)
+	Collection<Map.Entry<Map<String, Object>, Foo>> tupleFoos;
+
+	@Inject
+	@Reference(scope = ReferenceScope.PROTOTYPE)
+	Collection<ServiceReference<Foo>> serviceReferencesFoos;
+
+	@Inject
+	@Reference(service = Foo.class)
+	Collection<Map<String, Object>> propertiesFoos;
+
+	@Inject
+	@Configuration("foo.config")
+	Config config;
+
+}

Copied: aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/BarBadlyAnnotated.java (from r1806482, aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java)
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/BarBadlyAnnotated.java?p2=aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/BarBadlyAnnotated.java&p1=aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java&r1=1806482&r2=1807424&rev=1807424&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java (original)
+++ aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/BarBadlyAnnotated.java Tue Sep  5 22:01:11 2017
@@ -12,12 +12,18 @@
  * limitations under the License.
  */
 
-package org.apache.aries.cdi.container.internal.container;
+package org.apache.aries.cdi.container.test.beans;
 
-public interface Phase {
+import javax.inject.Inject;
 
-	public void close();
+import org.osgi.service.cdi.annotations.Configuration;
+import org.osgi.service.cdi.annotations.Reference;
 
-	public void open();
+public class BarBadlyAnnotated {
+
+	@Inject
+	@Reference
+	@Configuration
+	Foo foo;
 
 }

Copied: aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/BarProducer.java (from r1806482, aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java)
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/BarProducer.java?p2=aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/BarProducer.java&p1=aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java&r1=1806482&r2=1807424&rev=1807424&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java (original)
+++ aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/BarProducer.java Tue Sep  5 22:01:11 2017
@@ -12,12 +12,16 @@
  * limitations under the License.
  */
 
-package org.apache.aries.cdi.container.internal.container;
+package org.apache.aries.cdi.container.test.beans;
 
-public interface Phase {
+import javax.enterprise.inject.Produces;
 
-	public void close();
+import org.osgi.service.cdi.annotations.Reference;
 
-	public void open();
-
-}
+public class BarProducer {
+	@Produces
+	@Reference
+	public Bar getBar() {
+		return new Bar() {};
+	}
+}
\ No newline at end of file

Copied: aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/BarReference.java (from r1806482, aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java)
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/BarReference.java?p2=aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/BarReference.java&p1=aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java&r1=1806482&r2=1807424&rev=1807424&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java (original)
+++ aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/BarReference.java Tue Sep  5 22:01:11 2017
@@ -12,12 +12,8 @@
  * limitations under the License.
  */
 
-package org.apache.aries.cdi.container.internal.container;
+package org.apache.aries.cdi.container.test.beans;
 
-public interface Phase {
-
-	public void close();
-
-	public void open();
+public interface BarReference {
 
 }

Copied: aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/BarService.java (from r1806482, aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java)
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/BarService.java?p2=aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/BarService.java&p1=aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java&r1=1806482&r2=1807424&rev=1807424&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java (original)
+++ aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/BarService.java Tue Sep  5 22:01:11 2017
@@ -12,12 +12,8 @@
  * limitations under the License.
  */
 
-package org.apache.aries.cdi.container.internal.container;
+package org.apache.aries.cdi.container.test.beans;
 
-public interface Phase {
-
-	public void close();
-
-	public void open();
+public class BarService implements Bar {
 
 }

Copied: aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/BarWithConfig.java (from r1806482, aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java)
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/BarWithConfig.java?p2=aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/BarWithConfig.java&p1=aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java&r1=1806482&r2=1807424&rev=1807424&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java (original)
+++ aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/BarWithConfig.java Tue Sep  5 22:01:11 2017
@@ -12,12 +12,16 @@
  * limitations under the License.
  */
 
-package org.apache.aries.cdi.container.internal.container;
+package org.apache.aries.cdi.container.test.beans;
 
-public interface Phase {
+import javax.inject.Inject;
 
-	public void close();
+public class BarWithConfig {
 
-	public void open();
+	@Inject
+	public Bar bar;
+
+	@Inject
+	public Config config;
 
 }

Copied: aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/BarWithReference.java (from r1806482, aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java)
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/BarWithReference.java?p2=aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/BarWithReference.java&p1=aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java&r1=1806482&r2=1807424&rev=1807424&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java (original)
+++ aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/BarWithReference.java Tue Sep  5 22:01:11 2017
@@ -12,12 +12,13 @@
  * limitations under the License.
  */
 
-package org.apache.aries.cdi.container.internal.container;
+package org.apache.aries.cdi.container.test.beans;
 
-public interface Phase {
+import javax.inject.Inject;
 
-	public void close();
+public class BarWithReference {
 
-	public void open();
+	@Inject
+	public BarReference barReference;
 
 }

Copied: aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/CollectionFooProducer.java (from r1806482, aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java)
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/CollectionFooProducer.java?p2=aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/CollectionFooProducer.java&p1=aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java&r1=1806482&r2=1807424&rev=1807424&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java (original)
+++ aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/CollectionFooProducer.java Tue Sep  5 22:01:11 2017
@@ -12,12 +12,19 @@
  * limitations under the License.
  */
 
-package org.apache.aries.cdi.container.internal.container;
+package org.apache.aries.cdi.container.test.beans;
 
-public interface Phase {
+import java.util.Arrays;
+import java.util.Collection;
 
-	public void close();
+import javax.enterprise.inject.Produces;
 
-	public void open();
+import org.osgi.service.cdi.annotations.Reference;
 
-}
+public class CollectionFooProducer {
+	@Produces
+	@Reference
+	public Collection<Foo> getFoo() {
+		return Arrays.asList(new Foo() {});
+	}
+}
\ No newline at end of file

Copied: aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/Config.java (from r1806482, aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java)
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/Config.java?p2=aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/Config.java&p1=aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java&r1=1806482&r2=1807424&rev=1807424&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java (original)
+++ aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/Config.java Tue Sep  5 22:01:11 2017
@@ -12,12 +12,8 @@
  * limitations under the License.
  */
 
-package org.apache.aries.cdi.container.internal.container;
+package org.apache.aries.cdi.container.test.beans;
 
-public interface Phase {
-
-	public void close();
-
-	public void open();
+public @interface Config {
 
 }

Copied: aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/CtorArrayListFoo.java (from r1806482, aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java)
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/CtorArrayListFoo.java?p2=aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/CtorArrayListFoo.java&p1=aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java&r1=1806482&r2=1807424&rev=1807424&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java (original)
+++ aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/CtorArrayListFoo.java Tue Sep  5 22:01:11 2017
@@ -12,12 +12,15 @@
  * limitations under the License.
  */
 
-package org.apache.aries.cdi.container.internal.container;
+package org.apache.aries.cdi.container.test.beans;
 
-public interface Phase {
+import java.util.ArrayList;
 
-	public void close();
+import javax.inject.Inject;
 
-	public void open();
+import org.osgi.service.cdi.annotations.Reference;
 
-}
+public class CtorArrayListFoo {
+	@Inject
+	public CtorArrayListFoo(@Reference ArrayList<Foo> foos) {}
+}
\ No newline at end of file

Copied: aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/CtorCollectionFoo.java (from r1806482, aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java)
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/CtorCollectionFoo.java?p2=aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/CtorCollectionFoo.java&p1=aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java&r1=1806482&r2=1807424&rev=1807424&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java (original)
+++ aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/CtorCollectionFoo.java Tue Sep  5 22:01:11 2017
@@ -12,12 +12,15 @@
  * limitations under the License.
  */
 
-package org.apache.aries.cdi.container.internal.container;
+package org.apache.aries.cdi.container.test.beans;
 
-public interface Phase {
+import java.util.Collection;
 
-	public void close();
+import javax.inject.Inject;
 
-	public void open();
+import org.osgi.service.cdi.annotations.Reference;
 
-}
+public class CtorCollectionFoo {
+	@Inject
+	public CtorCollectionFoo(@Reference Collection<Foo> foos) {}
+}
\ No newline at end of file

Copied: aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/CtorFoo.java (from r1806482, aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java)
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/CtorFoo.java?p2=aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/CtorFoo.java&p1=aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java&r1=1806482&r2=1807424&rev=1807424&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java (original)
+++ aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/CtorFoo.java Tue Sep  5 22:01:11 2017
@@ -12,12 +12,13 @@
  * limitations under the License.
  */
 
-package org.apache.aries.cdi.container.internal.container;
+package org.apache.aries.cdi.container.test.beans;
 
-public interface Phase {
+import javax.inject.Inject;
 
-	public void close();
+import org.osgi.service.cdi.annotations.Reference;
 
-	public void open();
-
-}
+public class CtorFoo {
+	@Inject
+	public CtorFoo(@Reference Foo foo) {}
+}
\ No newline at end of file

Copied: aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/CtorFooBar.java (from r1806482, aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java)
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/CtorFooBar.java?p2=aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/CtorFooBar.java&p1=aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java&r1=1806482&r2=1807424&rev=1807424&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java (original)
+++ aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/CtorFooBar.java Tue Sep  5 22:01:11 2017
@@ -12,12 +12,13 @@
  * limitations under the License.
  */
 
-package org.apache.aries.cdi.container.internal.container;
+package org.apache.aries.cdi.container.test.beans;
 
-public interface Phase {
+import javax.inject.Inject;
 
-	public void close();
+import org.osgi.service.cdi.annotations.Reference;
 
-	public void open();
-
-}
+public class CtorFooBar {
+	@Inject
+	public CtorFooBar(@Reference Foo foo, @Reference Bar bar) {}
+}
\ No newline at end of file

Copied: aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/CtorFooFoo.java (from r1806482, aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java)
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/CtorFooFoo.java?p2=aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/CtorFooFoo.java&p1=aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java&r1=1806482&r2=1807424&rev=1807424&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java (original)
+++ aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/CtorFooFoo.java Tue Sep  5 22:01:11 2017
@@ -12,12 +12,13 @@
  * limitations under the License.
  */
 
-package org.apache.aries.cdi.container.internal.container;
+package org.apache.aries.cdi.container.test.beans;
 
-public interface Phase {
+import javax.inject.Inject;
 
-	public void close();
+import org.osgi.service.cdi.annotations.Reference;
 
-	public void open();
-
-}
+public class CtorFooFoo {
+	@Inject
+	public CtorFooFoo(@Reference Foo foo_a, @Reference Foo foo_b) {}
+}
\ No newline at end of file

Copied: aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/CtorFooFooNamed.java (from r1806482, aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java)
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/CtorFooFooNamed.java?p2=aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/CtorFooFooNamed.java&p1=aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java&r1=1806482&r2=1807424&rev=1807424&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java (original)
+++ aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/CtorFooFooNamed.java Tue Sep  5 22:01:11 2017
@@ -12,12 +12,13 @@
  * limitations under the License.
  */
 
-package org.apache.aries.cdi.container.internal.container;
+package org.apache.aries.cdi.container.test.beans;
 
-public interface Phase {
+import javax.inject.Inject;
 
-	public void close();
+import org.osgi.service.cdi.annotations.Reference;
 
-	public void open();
-
-}
+public class CtorFooFooNamed {
+	@Inject
+	public CtorFooFooNamed(@Reference(name = "foo_a") Foo foo_a, @Reference(name = "foo_b") Foo foo_b) {}
+}
\ No newline at end of file

Copied: aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/CtorFooNamed.java (from r1806482, aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java)
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/CtorFooNamed.java?p2=aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/CtorFooNamed.java&p1=aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java&r1=1806482&r2=1807424&rev=1807424&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java (original)
+++ aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/CtorFooNamed.java Tue Sep  5 22:01:11 2017
@@ -12,12 +12,13 @@
  * limitations under the License.
  */
 
-package org.apache.aries.cdi.container.internal.container;
+package org.apache.aries.cdi.container.test.beans;
 
-public interface Phase {
+import javax.inject.Inject;
 
-	public void close();
+import org.osgi.service.cdi.annotations.Reference;
 
-	public void open();
-
-}
+public class CtorFooNamed {
+	@Inject
+	public CtorFooNamed(@Reference(name = "_foo_") Foo foo) {}
+}
\ No newline at end of file

Copied: aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/CtorFooOptional.java (from r1806482, aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java)
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/CtorFooOptional.java?p2=aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/CtorFooOptional.java&p1=aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java&r1=1806482&r2=1807424&rev=1807424&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java (original)
+++ aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/CtorFooOptional.java Tue Sep  5 22:01:11 2017
@@ -12,12 +12,14 @@
  * limitations under the License.
  */
 
-package org.apache.aries.cdi.container.internal.container;
+package org.apache.aries.cdi.container.test.beans;
 
-public interface Phase {
+import javax.inject.Inject;
 
-	public void close();
+import org.osgi.service.cdi.annotations.Reference;
+import org.osgi.service.cdi.annotations.ReferenceCardinality;
 
-	public void open();
-
-}
+public class CtorFooOptional {
+	@Inject
+	public CtorFooOptional(@Reference(cardinality = ReferenceCardinality.OPTIONAL) Foo foo) {}
+}
\ No newline at end of file

Copied: aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/CtorListFoo.java (from r1806482, aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java)
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/CtorListFoo.java?p2=aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/CtorListFoo.java&p1=aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java&r1=1806482&r2=1807424&rev=1807424&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java (original)
+++ aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/CtorListFoo.java Tue Sep  5 22:01:11 2017
@@ -12,12 +12,15 @@
  * limitations under the License.
  */
 
-package org.apache.aries.cdi.container.internal.container;
+package org.apache.aries.cdi.container.test.beans;
 
-public interface Phase {
+import java.util.List;
 
-	public void close();
+import javax.inject.Inject;
 
-	public void open();
+import org.osgi.service.cdi.annotations.Reference;
 
-}
+public class CtorListFoo {
+	@Inject
+	public CtorListFoo(@Reference List<Foo> foos) {}
+}
\ No newline at end of file

Copied: aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/Drat.java (from r1806482, aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/BindType.java)
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/Drat.java?p2=aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/Drat.java&p1=aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/BindType.java&r1=1806482&r2=1807424&rev=1807424&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/BindType.java (original)
+++ aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/Drat.java Tue Sep  5 22:01:11 2017
@@ -12,8 +12,6 @@
  * limitations under the License.
  */
 
-package org.apache.aries.cdi.container.internal.container;
+package org.apache.aries.cdi.container.test.beans;
 
-public enum BindType {
-	SERVICE, SERVICE_PROPERTIES, SERVICE_REFERENCE
-}
\ No newline at end of file
+public interface Drat<T> {}
\ No newline at end of file

Copied: aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/FieldFoo.java (from r1806482, aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java)
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/FieldFoo.java?p2=aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/FieldFoo.java&p1=aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java&r1=1806482&r2=1807424&rev=1807424&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java (original)
+++ aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/FieldFoo.java Tue Sep  5 22:01:11 2017
@@ -12,12 +12,14 @@
  * limitations under the License.
  */
 
-package org.apache.aries.cdi.container.internal.container;
+package org.apache.aries.cdi.container.test.beans;
 
-public interface Phase {
+import javax.inject.Inject;
 
-	public void close();
+import org.osgi.service.cdi.annotations.Reference;
 
-	public void open();
-
-}
+public class FieldFoo {
+	@Inject
+	@Reference
+	Foo foo;
+}
\ No newline at end of file

Copied: aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/FieldListFoo.java (from r1806482, aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java)
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/FieldListFoo.java?p2=aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/FieldListFoo.java&p1=aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java&r1=1806482&r2=1807424&rev=1807424&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java (original)
+++ aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/FieldListFoo.java Tue Sep  5 22:01:11 2017
@@ -12,12 +12,16 @@
  * limitations under the License.
  */
 
-package org.apache.aries.cdi.container.internal.container;
+package org.apache.aries.cdi.container.test.beans;
 
-public interface Phase {
+import java.util.List;
 
-	public void close();
+import javax.inject.Inject;
 
-	public void open();
+import org.osgi.service.cdi.annotations.Reference;
 
-}
+public class FieldListFoo {
+	@Inject
+	@Reference
+	List<Foo> foo;
+}
\ No newline at end of file

Copied: aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/Foo.java (from r1806482, aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java)
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/Foo.java?p2=aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/Foo.java&p1=aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java&r1=1806482&r2=1807424&rev=1807424&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java (original)
+++ aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/Foo.java Tue Sep  5 22:01:11 2017
@@ -12,12 +12,8 @@
  * limitations under the License.
  */
 
-package org.apache.aries.cdi.container.internal.container;
+package org.apache.aries.cdi.container.test.beans;
 
-public interface Phase {
-
-	public void close();
-
-	public void open();
+public interface Foo {
 
 }

Copied: aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/FooAnnotated.java (from r1806482, aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java)
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/FooAnnotated.java?p2=aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/FooAnnotated.java&p1=aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java&r1=1806482&r2=1807424&rev=1807424&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java (original)
+++ aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/FooAnnotated.java Tue Sep  5 22:01:11 2017
@@ -12,12 +12,16 @@
  * limitations under the License.
  */
 
-package org.apache.aries.cdi.container.internal.container;
+package org.apache.aries.cdi.container.test.beans;
 
-public interface Phase {
-
-	public void close();
-
-	public void open();
+import org.osgi.service.cdi.annotations.Component;
+import org.osgi.service.cdi.annotations.ServiceScope;
 
+@Component(
+	name = "foo.annotated",
+	property = {"service.ranking:Integer=12"},
+	service = Foo.class,
+	serviceScope = ServiceScope.SINGLETON
+)
+public class FooAnnotated implements Foo, Cloneable {
 }

Copied: aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/FooProducer.java (from r1806482, aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java)
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/FooProducer.java?p2=aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/FooProducer.java&p1=aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java&r1=1806482&r2=1807424&rev=1807424&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java (original)
+++ aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/FooProducer.java Tue Sep  5 22:01:11 2017
@@ -12,12 +12,23 @@
  * limitations under the License.
  */
 
-package org.apache.aries.cdi.container.internal.container;
+package org.apache.aries.cdi.container.test.beans;
 
-public interface Phase {
+import java.util.Objects;
 
-	public void close();
+import javax.enterprise.inject.Produces;
 
-	public void open();
+import org.osgi.service.cdi.annotations.Reference;
 
-}
+public class FooProducer {
+	@Produces
+	@Reference
+	public Foo getFoo() {
+		return new Foo() {
+			@Override
+			public String toString() {
+				return "Foo: " + Objects.hashCode(this);
+			}
+		};
+	}
+}
\ No newline at end of file

Copied: aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/FooReference.java (from r1806482, aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java)
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/FooReference.java?p2=aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/FooReference.java&p1=aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java&r1=1806482&r2=1807424&rev=1807424&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java (original)
+++ aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/FooReference.java Tue Sep  5 22:01:11 2017
@@ -12,12 +12,8 @@
  * limitations under the License.
  */
 
-package org.apache.aries.cdi.container.internal.container;
+package org.apache.aries.cdi.container.test.beans;
 
-public interface Phase {
-
-	public void close();
-
-	public void open();
+public interface FooReference {
 
 }

Copied: aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/FooService.java (from r1806482, aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java)
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/FooService.java?p2=aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/FooService.java&p1=aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java&r1=1806482&r2=1807424&rev=1807424&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java (original)
+++ aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/FooService.java Tue Sep  5 22:01:11 2017
@@ -12,12 +12,8 @@
  * limitations under the License.
  */
 
-package org.apache.aries.cdi.container.internal.container;
+package org.apache.aries.cdi.container.test.beans;
 
-public interface Phase {
-
-	public void close();
-
-	public void open();
+public class FooService implements Foo, Cloneable {
 
 }

Copied: aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/FooWithConfig.java (from r1806482, aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java)
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/FooWithConfig.java?p2=aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/FooWithConfig.java&p1=aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java&r1=1806482&r2=1807424&rev=1807424&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java (original)
+++ aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/FooWithConfig.java Tue Sep  5 22:01:11 2017
@@ -12,12 +12,13 @@
  * limitations under the License.
  */
 
-package org.apache.aries.cdi.container.internal.container;
+package org.apache.aries.cdi.container.test.beans;
 
-public interface Phase {
+import javax.inject.Inject;
 
-	public void close();
+public class FooWithConfig {
 
-	public void open();
+	@Inject
+	public Config config;
 
 }

Copied: aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/FooWithReference.java (from r1806482, aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java)
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/FooWithReference.java?p2=aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/FooWithReference.java&p1=aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java&r1=1806482&r2=1807424&rev=1807424&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java (original)
+++ aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/FooWithReference.java Tue Sep  5 22:01:11 2017
@@ -12,12 +12,13 @@
  * limitations under the License.
  */
 
-package org.apache.aries.cdi.container.internal.container;
+package org.apache.aries.cdi.container.test.beans;
 
-public interface Phase {
+import javax.inject.Inject;
 
-	public void close();
+public class FooWithReference {
 
-	public void open();
+	@Inject
+	public FooReference fooReference;
 
 }

Copied: aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/ListFooProducer.java (from r1806482, aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java)
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/ListFooProducer.java?p2=aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/ListFooProducer.java&p1=aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java&r1=1806482&r2=1807424&rev=1807424&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java (original)
+++ aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/ListFooProducer.java Tue Sep  5 22:01:11 2017
@@ -12,12 +12,19 @@
  * limitations under the License.
  */
 
-package org.apache.aries.cdi.container.internal.container;
+package org.apache.aries.cdi.container.test.beans;
 
-public interface Phase {
+import java.util.Arrays;
+import java.util.List;
 
-	public void close();
+import javax.enterprise.inject.Produces;
 
-	public void open();
+import org.osgi.service.cdi.annotations.Reference;
 
-}
+public class ListFooProducer {
+	@Produces
+	@Reference
+	public List<Foo> getFoo() {
+		return Arrays.asList(new Foo() {});
+	}
+}
\ No newline at end of file

Copied: aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/MethodBindFoo.java (from r1806482, aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java)
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/MethodBindFoo.java?p2=aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/MethodBindFoo.java&p1=aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java&r1=1806482&r2=1807424&rev=1807424&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java (original)
+++ aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/MethodBindFoo.java Tue Sep  5 22:01:11 2017
@@ -12,12 +12,13 @@
  * limitations under the License.
  */
 
-package org.apache.aries.cdi.container.internal.container;
+package org.apache.aries.cdi.container.test.beans;
 
-public interface Phase {
+import javax.inject.Inject;
 
-	public void close();
+import org.osgi.service.cdi.annotations.Reference;
 
-	public void open();
-
-}
+public class MethodBindFoo {
+	@Inject
+	public void bindFoo(@Reference Foo foo) {}
+}
\ No newline at end of file

Copied: aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/MethodBindFooNamed.java (from r1806482, aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java)
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/MethodBindFooNamed.java?p2=aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/MethodBindFooNamed.java&p1=aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java&r1=1806482&r2=1807424&rev=1807424&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java (original)
+++ aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/MethodBindFooNamed.java Tue Sep  5 22:01:11 2017
@@ -12,12 +12,13 @@
  * limitations under the License.
  */
 
-package org.apache.aries.cdi.container.internal.container;
+package org.apache.aries.cdi.container.test.beans;
 
-public interface Phase {
+import javax.inject.Inject;
 
-	public void close();
+import org.osgi.service.cdi.annotations.Reference;
 
-	public void open();
-
-}
+public class MethodBindFooNamed {
+	@Inject
+	public void bindFoo(@Reference(name = "_foo_") Foo foo) {}
+}
\ No newline at end of file

Copied: aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/MethodSetFoo.java (from r1806482, aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java)
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/MethodSetFoo.java?p2=aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/MethodSetFoo.java&p1=aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java&r1=1806482&r2=1807424&rev=1807424&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java (original)
+++ aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/MethodSetFoo.java Tue Sep  5 22:01:11 2017
@@ -12,12 +12,13 @@
  * limitations under the License.
  */
 
-package org.apache.aries.cdi.container.internal.container;
+package org.apache.aries.cdi.container.test.beans;
 
-public interface Phase {
+import javax.inject.Inject;
 
-	public void close();
+import org.osgi.service.cdi.annotations.Reference;
 
-	public void open();
-
-}
+public class MethodSetFoo {
+	@Inject
+	public void setFoo(@Reference Foo foo) {}
+}
\ No newline at end of file

Added: aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/ObserverFoo.java
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/ObserverFoo.java?rev=1807424&view=auto
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/ObserverFoo.java (added)
+++ aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/ObserverFoo.java Tue Sep  5 22:01:11 2017
@@ -0,0 +1,59 @@
+/**
+ * Licensed 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.aries.cdi.container.test.beans;
+
+import java.util.List;
+import java.util.concurrent.CopyOnWriteArrayList;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.event.Observes;
+import javax.enterprise.inject.spi.EventMetadata;
+
+import org.osgi.service.cdi.annotations.Reference;
+import org.osgi.service.cdi.annotations.ReferenceCardinality;
+import org.osgi.service.cdi.annotations.ServiceEvent;
+
+@ApplicationScoped
+public class ObserverFoo {
+
+	public List<Foo> foos() {
+		return _foos;
+	}
+
+	void foos(
+		@Observes
+		@Reference(cardinality = ReferenceCardinality.MULTIPLE)
+		ServiceEvent<Foo> event,
+		EventMetadata eventMetadata) {
+
+		event.adding(
+			foo -> {
+				System.out.printf("Adding %s, %s%n", foo, eventMetadata);
+				_foos.add(foo);
+			}
+		).modified(
+			foo -> {
+				System.out.printf("Modified %s, %s%n", foo, eventMetadata);
+			}
+		).removed(
+			foo -> {
+				System.out.printf("Removed %s, %s%n", foo, eventMetadata);
+				_foos.remove(foo);
+			}
+		);
+	}
+
+	private List<Foo> _foos = new CopyOnWriteArrayList<>();
+}
\ No newline at end of file

Added: aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/ServiceEventImpl.java
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/ServiceEventImpl.java?rev=1807424&view=auto
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/ServiceEventImpl.java (added)
+++ aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/ServiceEventImpl.java Tue Sep  5 22:01:11 2017
@@ -0,0 +1,54 @@
+/**
+ * Licensed 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.aries.cdi.container.test.beans;
+
+import org.osgi.service.cdi.annotations.ServiceEvent;
+
+public class ServiceEventImpl<T> implements ServiceEvent<T> {
+
+	enum Event { ADDING, MODIFIED, REMOVED }
+	private final T _t;
+	private final ServiceEventImpl.Event _event;
+
+	public ServiceEventImpl(T t, ServiceEventImpl.Event event) {
+		_t = t;
+		_event = event;
+	}
+
+	@Override
+	public ServiceEvent<T> adding(Consumer<T> consumer) {
+		if (_event == Event.ADDING) {
+			consumer.accept(_t);
+		};
+		return this;
+	}
+
+	@Override
+	public ServiceEvent<T> modified(Consumer<T> consumer) {
+		if (_event == Event.MODIFIED) {
+			consumer.accept(_t);
+		}
+		return this;
+	}
+
+	@Override
+	public ServiceEvent<T> removed(Consumer<T> consumer) {
+		if (_event == Event.REMOVED) {
+			consumer.accept(_t);
+		}
+		return this;
+	}
+
+}
\ No newline at end of file

Copied: aries/trunk/cdi/cdi-extender/src/test/resources/OSGI-INF/cdi/beans-annotated.xml (from r1806482, aries/trunk/cdi/cdi-extender/src/test/resources/OSGI-INF/cdi/beans-only.xml)
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/resources/OSGI-INF/cdi/beans-annotated.xml?p2=aries/trunk/cdi/cdi-extender/src/test/resources/OSGI-INF/cdi/beans-annotated.xml&p1=aries/trunk/cdi/cdi-extender/src/test/resources/OSGI-INF/cdi/beans-only.xml&r1=1806482&r2=1807424&rev=1807424&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/test/resources/OSGI-INF/cdi/beans-only.xml (original)
+++ aries/trunk/cdi/cdi-extender/src/test/resources/OSGI-INF/cdi/beans-annotated.xml Tue Sep  5 22:01:11 2017
@@ -16,6 +16,6 @@
 -->
 
 <beans xmlns:cdi="http://www.osgi.org/xmlns/cdi/v1.0.0">
-	<cdi:bean class="com.foo.FooImpl" />
-	<cdi:bean class="com.foo.BarImpl" />
+	<cdi:component class="org.apache.aries.cdi.container.test.beans.BarAnnotated" />
+	<cdi:component class="org.apache.aries.cdi.container.test.beans.FooAnnotated" />
 </beans>
\ No newline at end of file

Copied: aries/trunk/cdi/cdi-extender/src/test/resources/OSGI-INF/cdi/beans-badly-annotated.xml (from r1806482, aries/trunk/cdi/cdi-extender/src/test/resources/OSGI-INF/cdi/beans-only.xml)
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/resources/OSGI-INF/cdi/beans-badly-annotated.xml?p2=aries/trunk/cdi/cdi-extender/src/test/resources/OSGI-INF/cdi/beans-badly-annotated.xml&p1=aries/trunk/cdi/cdi-extender/src/test/resources/OSGI-INF/cdi/beans-only.xml&r1=1806482&r2=1807424&rev=1807424&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/test/resources/OSGI-INF/cdi/beans-only.xml (original)
+++ aries/trunk/cdi/cdi-extender/src/test/resources/OSGI-INF/cdi/beans-badly-annotated.xml Tue Sep  5 22:01:11 2017
@@ -16,6 +16,5 @@
 -->
 
 <beans xmlns:cdi="http://www.osgi.org/xmlns/cdi/v1.0.0">
-	<cdi:bean class="com.foo.FooImpl" />
-	<cdi:bean class="com.foo.BarImpl" />
+	<cdi:component class="org.apache.aries.cdi.container.test.beans.BarBadlyAnnotated" />
 </beans>
\ No newline at end of file

Modified: aries/trunk/cdi/cdi-extender/src/test/resources/OSGI-INF/cdi/beans-configuration.xml
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/resources/OSGI-INF/cdi/beans-configuration.xml?rev=1807424&r1=1807423&r2=1807424&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/test/resources/OSGI-INF/cdi/beans-configuration.xml (original)
+++ aries/trunk/cdi/cdi-extender/src/test/resources/OSGI-INF/cdi/beans-configuration.xml Tue Sep  5 22:01:11 2017
@@ -16,9 +16,11 @@
 -->
 
 <beans xmlns:cdi="http://www.osgi.org/xmlns/cdi/v1.0.0">
-	<cdi:bean class="com.foo.FooImpl" />
-	<cdi:bean class="com.foo.BarImpl" />
-	<cdi:configuration beanClass="com.foo.Config" pid="com.foo.FooImpl" />
-	<cdi:configuration beanClass="com.foo.Baz" pid="com.foo.other and.another" />
-	<cdi:configuration beanClass="com.foo.Fum" required="false" pid="an.optional.configuration" />
+	<cdi:component class="org.apache.aries.cdi.container.test.beans.FooWithConfig">
+		<configuration type="org.apache.aries.cdi.container.test.beans.Config" configuration-pid="$ foo.config" />
+	</cdi:component>
+	<cdi:component class="org.apache.aries.cdi.container.test.beans.BarWithConfig">
+		<configuration type="org.apache.aries.cdi.container.test.beans.Bar" />
+		<configuration type="org.apache.aries.cdi.container.test.beans.Config" configuration-policy="require" />
+	</cdi:component>
 </beans>
\ No newline at end of file

Modified: aries/trunk/cdi/cdi-extender/src/test/resources/OSGI-INF/cdi/beans-only.xml
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/resources/OSGI-INF/cdi/beans-only.xml?rev=1807424&r1=1807423&r2=1807424&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/test/resources/OSGI-INF/cdi/beans-only.xml (original)
+++ aries/trunk/cdi/cdi-extender/src/test/resources/OSGI-INF/cdi/beans-only.xml Tue Sep  5 22:01:11 2017
@@ -16,6 +16,6 @@
 -->
 
 <beans xmlns:cdi="http://www.osgi.org/xmlns/cdi/v1.0.0">
-	<cdi:bean class="com.foo.FooImpl" />
-	<cdi:bean class="com.foo.BarImpl" />
+	<cdi:component class="org.apache.aries.cdi.container.test.beans.Bar" />
+	<cdi:component class="org.apache.aries.cdi.container.test.beans.Foo" />
 </beans>
\ No newline at end of file

Modified: aries/trunk/cdi/cdi-extender/src/test/resources/OSGI-INF/cdi/beans-references.xml
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/resources/OSGI-INF/cdi/beans-references.xml?rev=1807424&r1=1807423&r2=1807424&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/test/resources/OSGI-INF/cdi/beans-references.xml (original)
+++ aries/trunk/cdi/cdi-extender/src/test/resources/OSGI-INF/cdi/beans-references.xml Tue Sep  5 22:01:11 2017
@@ -16,8 +16,10 @@
 -->
 
 <beans xmlns:cdi="http://www.osgi.org/xmlns/cdi/v1.0.0">
-	<cdi:bean class="com.foo.FooImpl" />
-	<cdi:bean class="com.foo.BarImpl" />
-	<cdi:reference beanClass="java.util.concurrent.Callable" target="(objectClass=java.util.concurrent.Callable)" />
-	<cdi:reference beanClass="java.util.Map" target="(objectClass=java.util.Map)" />
+	<cdi:component class="org.apache.aries.cdi.container.test.beans.FooWithReference">
+		<reference service="org.apache.aries.cdi.container.test.beans.FooReference" />
+	</cdi:component>
+	<cdi:component class="org.apache.aries.cdi.container.test.beans.BarWithReference">
+		<reference service="org.apache.aries.cdi.container.test.beans.BarReference" />
+	</cdi:component>
 </beans>
\ No newline at end of file

Modified: aries/trunk/cdi/cdi-extender/src/test/resources/OSGI-INF/cdi/beans-services.xml
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/resources/OSGI-INF/cdi/beans-services.xml?rev=1807424&r1=1807423&r2=1807424&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/test/resources/OSGI-INF/cdi/beans-services.xml (original)
+++ aries/trunk/cdi/cdi-extender/src/test/resources/OSGI-INF/cdi/beans-services.xml Tue Sep  5 22:01:11 2017
@@ -16,90 +16,88 @@
 -->
 
 <beans xmlns:cdi="http://www.osgi.org/xmlns/cdi/v1.0.0">
-	<cdi:bean class="com.foo.FooImpl">
-		<service>
-			<provide interface="com.foo.Foo" />
-			<provide interface="java.lang.Clonable" />
-			<property name="foo" value-type="String" value="fum" />
-			<property name="foo1" value="baz" />
-			<property name="foo2" value-type="Long" value="345987643" />
-			<property name="foo3" value-type="Double" value="3459.87643" />
-			<property name="foo4" value-type="Float" value="3459.87" />
-			<property name="foo5" value-type="Integer" value="724559" />
-			<property name="foo6" value-type="Byte" value="127" />
-			<property name="foo7" value-type="Character" value="X" />
-			<property name="foo8" value-type="Boolean" value="true" />
-			<property name="foo9" value-type="Short" value="32767" />
-			<property name="foo11">
-				<array>
-					<value>frog</value>
-					<value>drum</value>
-				</array>
-			</property>
-			<property name="foo12" value-type="Long">
-				<array>
-					<value>345987643</value>
-					<value>34</value>
-				</array>
-			</property>
-			<property name="foo13" value-type="Double">
-				<array>
-					<value>3459.87643</value>
-					<value>34.3456</value>
-				</array>
-			</property>
-			<property name="foo14" value-type="Float">
-				<array>
-					<value>3459.87</value>
-					<value>35.23</value>
-				</array>
-			</property>
-			<property name="foo15" value-type="Integer">
-				<array>
-					<value>724559</value>
-					<value>345</value>
-				</array>
-			</property>
-			<property name="foo16" value-type="Byte">
-				<array>
-					<value>127</value>
-					<value>23</value>
-				</array>
-			</property>
-			<property name="foo17" value-type="Character">
-				<array>
-					<value>X</value>
-					<value>t</value>
-				</array>
-			</property>
-			<property name="foo18" value-type="Boolean">
-				<array>
-					<value>true</value>
-					<value>false</value>
-				</array>
-			</property>
-			<property name="foo19" value-type="Short">
-				<array>
-					<value>32767</value>
-					<value>2345</value>
-				</array>
-			</property>
-			<property name="foo20" value-type="String">
-				bar
-			</property>
-			<property name="foo21" value-type="Short">
-				<list>
-					<value>32767</value>
-					<value>2345</value>
-				</list>
-			</property>
-			<property name="foo22" value-type="Short">
-				<set>
-					<value>32767</value>
-					<value>2345</value>
-				</set>
-			</property>
-		</service>
-	</cdi:bean>
-	<cdi:bean class="com.foo.BarImpl" />
+	<cdi:component class="org.apache.aries.cdi.container.test.beans.FooService">
+		<provide interface="org.apache.aries.cdi.container.test.beans.Foo" />
+		<provide interface="java.lang.Cloneable" />
+		<property name="foo" value-type="String" value="fum" />
+		<property name="foo1" value="baz" />
+		<property name="foo2" value-type="Long" value="345987643" />
+		<property name="foo3" value-type="Double" value="3459.87643" />
+		<property name="foo4" value-type="Float" value="3459.87" />
+		<property name="foo5" value-type="Integer" value="724559" />
+		<property name="foo6" value-type="Byte" value="127" />
+		<property name="foo7" value-type="Character" value="X" />
+		<property name="foo8" value-type="Boolean" value="true" />
+		<property name="foo9" value-type="Short" value="32767" />
+		<property name="foo11">
+			<array>
+				<value>frog</value>
+				<value>drum</value>
+			</array>
+		</property>
+		<property name="foo12" value-type="Long">
+			<array>
+				<value>345987643</value>
+				<value>34</value>
+			</array>
+		</property>
+		<property name="foo13" value-type="Double">
+			<array>
+				<value>3459.87643</value>
+				<value>34.3456</value>
+			</array>
+		</property>
+		<property name="foo14" value-type="Float">
+			<array>
+				<value>3459.87</value>
+				<value>35.23</value>
+			</array>
+		</property>
+		<property name="foo15" value-type="Integer">
+			<array>
+				<value>724559</value>
+				<value>345</value>
+			</array>
+		</property>
+		<property name="foo16" value-type="Byte">
+			<array>
+				<value>127</value>
+				<value>23</value>
+			</array>
+		</property>
+		<property name="foo17" value-type="Character">
+			<array>
+				<value>X</value>
+				<value>t</value>
+			</array>
+		</property>
+		<property name="foo18" value-type="Boolean">
+			<array>
+				<value>true</value>
+				<value>false</value>
+			</array>
+		</property>
+		<property name="foo19" value-type="Short">
+			<array>
+				<value>32767</value>
+				<value>2345</value>
+			</array>
+		</property>
+		<property name="foo20" value-type="String">
+			bar
+		</property>
+		<property name="foo21" value-type="Short">
+			<list>
+				<value>32767</value>
+				<value>2345</value>
+			</list>
+		</property>
+		<property name="foo22" value-type="Short">
+			<set>
+				<value>32767</value>
+				<value>2345</value>
+			</set>
+		</property>
+	</cdi:component>
+	<cdi:component class="org.apache.aries.cdi.container.test.beans.BarService" />
 </beans>
\ No newline at end of file

Added: aries/trunk/cdi/cdi-extender/src/test/resources/logback.xml
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/resources/logback.xml?rev=1807424&view=auto
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/test/resources/logback.xml (added)
+++ aries/trunk/cdi/cdi-extender/src/test/resources/logback.xml Tue Sep  5 22:01:11 2017
@@ -0,0 +1,17 @@
+<configuration>
+	<contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator">
+		<resetJUL>true</resetJUL>
+	</contextListener>
+
+	<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+		<encoder>
+			<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
+		</encoder>
+	</appender>
+
+	<logger name="org.apache.aries.cdi.container" level="DEBUG"/>
+
+	<root level="info">
+		<appender-ref ref="STDOUT" />
+	</root>
+</configuration>
\ No newline at end of file

Modified: aries/trunk/cdi/cdi-extension-http/pom.xml
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extension-http/pom.xml?rev=1807424&r1=1807423&r2=1807424&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extension-http/pom.xml (original)
+++ aries/trunk/cdi/cdi-extension-http/pom.xml Tue Sep  5 22:01:11 2017
@@ -30,7 +30,10 @@
 
 	<artifactId>org.apache.aries.cdi.extension.http</artifactId>
 	<name>CDI Http Extender</name>
-	<description>Http support for Aries CDI Extender</description>
+	<description>
+		Provides support to CDI bundles for http servlet scopes such as @RequestScoped,
+		@ApplicationScoped, @SessionScoped and @ConversationScoped.
+	</description>
 
 	<build>
 		<plugins>
@@ -100,6 +103,7 @@
 			<groupId>org.osgi</groupId>
 			<artifactId>osgi.core</artifactId>
 			<version>6.0.0</version>
+			<scope>provided</scope>
 		</dependency>
 	</dependencies>
 </project>
\ No newline at end of file

Modified: aries/trunk/cdi/cdi-extension-http/src/main/java/org/apache/aries/cdi/extension/http/HttpExtension.java
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extension-http/src/main/java/org/apache/aries/cdi/extension/http/HttpExtension.java?rev=1807424&r1=1807423&r2=1807424&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extension-http/src/main/java/org/apache/aries/cdi/extension/http/HttpExtension.java (original)
+++ aries/trunk/cdi/cdi-extension-http/src/main/java/org/apache/aries/cdi/extension/http/HttpExtension.java Tue Sep  5 22:01:11 2017
@@ -22,7 +22,6 @@ import java.util.Dictionary;
 import java.util.Hashtable;
 import java.util.List;
 import java.util.Map;
-import java.util.concurrent.CopyOnWriteArrayList;
 
 import javax.enterprise.event.Observes;
 import javax.enterprise.inject.spi.AfterDeploymentValidation;
@@ -52,8 +51,6 @@ public class HttpExtension implements Ex
 	}
 
 	void afterDeploymentValidation(@Observes AfterDeploymentValidation adv, BeanManager beanManager) {
-		processWebClasses();
-
 		BeanManagerImpl beanManagerImpl = ((BeanManagerProxy)beanManager).delegate();
 
 		Dictionary<String, Object> properties = new Hashtable<>();
@@ -63,21 +60,12 @@ public class HttpExtension implements Ex
 		properties.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_LISTENER, Boolean.TRUE.toString());
 		properties.put(Constants.SERVICE_RANKING, Integer.MAX_VALUE - 100);
 
-		_registrations.add(
-			_bundle.getBundleContext().registerService(
-				LISTENER_CLASSES, new WeldInitialListener(beanManagerImpl), properties));
-	}
-
-	private void processWebClasses() {
-		// TODO Auto-generated method stub
+		_listenerRegistration = _bundle.getBundleContext().registerService(
+				LISTENER_CLASSES, new WeldInitialListener(beanManagerImpl), properties);
 	}
 
 	void beforeShutdown(@Observes BeforeShutdown bs) {
-		for (ServiceRegistration<?> registration : _registrations) {
-			registration.unregister();
-		}
-
-		_registrations.clear();
+		_listenerRegistration.unregister();
 	}
 
 	private Map<String, Object> getAttributes() {
@@ -137,6 +125,6 @@ public class HttpExtension implements Ex
 
 	private final Bundle _bundle;
 	private String _contextSelect;
-	private List<ServiceRegistration<?>> _registrations = new CopyOnWriteArrayList<>();
+	private ServiceRegistration<?> _listenerRegistration;
 
 }

Modified: aries/trunk/cdi/cdi-extension-jndi/pom.xml
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extension-jndi/pom.xml?rev=1807424&r1=1807423&r2=1807424&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extension-jndi/pom.xml (original)
+++ aries/trunk/cdi/cdi-extension-jndi/pom.xml Tue Sep  5 22:01:11 2017
@@ -63,6 +63,7 @@
 			<groupId>org.osgi</groupId>
 			<artifactId>osgi.core</artifactId>
 			<version>6.0.0</version>
+			<scope>provided</scope>
 		</dependency>
 	</dependencies>
 



Mime
View raw message