aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From csie...@apache.org
Subject svn commit: r1784896 [2/2] - in /aries/trunk/cdi: ./ cdi-executable/ cdi-extender/ cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/ cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/command/ cdi-extender/src/main/jav...
Date Wed, 01 Mar 2017 10:06:33 GMT
Added: aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/Constants.java
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/Constants.java?rev=1784896&view=auto
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/Constants.java (added)
+++ aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/Constants.java Wed Mar  1 10:06:32 2017
@@ -0,0 +1,32 @@
+package org.apache.aries.cdi.container.internal.model;
+
+import java.util.Set;
+
+import org.apache.aries.cdi.container.internal.util.Sets;
+
+public class Constants {
+
+	private Constants() {
+		// no instances
+	}
+
+	public static final String CDI10_URI = "http://www.osgi.org/xmlns/cdi/v1.0.0";
+	public static final Set<String> CDI_URIS = Sets.immutableHashSet(CDI10_URI);
+
+	public static final String BEAN_CLASS_ATTRIBUTE = "beanClass";
+	public static final String BEAN_ELEMENT = "bean";
+	public static final String BEANS_ELEMENT = "beans";
+	public static final String CLASS_ATTRIBUTE = "class";
+	public static final String CONFIGURATION_ELEMENT = "configuration";
+	public static final String INTERFACE_ATTRIBUTE = "interface";
+	public static final String NAME_ATTRIBUTE = "name";
+	public static final String PID_ATTRIBUTE = "pid";
+	public static final String PROPERTY_ELEMENT = "property";
+	public static final String PROVIDE_ELEMENT = "provide";
+	public static final String REFERENCE_ELEMENT = "reference";
+	public static final String SERVICE_ELEMENT = "service";
+	public static final String TARGET_ATTRIBUTE = "target";
+	public static final String TYPE_ATTRIBUTE = "type";
+	public static final String VALUE_ATTRIBUTE = "value";
+
+}

Added: aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/OSGiBeansHandler.java
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/OSGiBeansHandler.java?rev=1784896&view=auto
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/OSGiBeansHandler.java (added)
+++ aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/OSGiBeansHandler.java Wed Mar  1 10:06:32 2017
@@ -0,0 +1,114 @@
+package org.apache.aries.cdi.container.internal.model;
+
+import static org.apache.aries.cdi.container.internal.model.Constants.BEAN_ELEMENT;
+import static org.apache.aries.cdi.container.internal.model.Constants.CDI_URIS;
+import static org.apache.aries.cdi.container.internal.model.Constants.CLASS_ATTRIBUTE;
+import static org.apache.aries.cdi.container.internal.model.Constants.CONFIGURATION_ELEMENT;
+import static org.apache.aries.cdi.container.internal.model.Constants.INTERFACE_ATTRIBUTE;
+import static org.apache.aries.cdi.container.internal.model.Constants.PROPERTY_ELEMENT;
+import static org.apache.aries.cdi.container.internal.model.Constants.PROVIDE_ELEMENT;
+import static org.apache.aries.cdi.container.internal.model.Constants.REFERENCE_ELEMENT;
+import static org.apache.aries.cdi.container.internal.model.Constants.SERVICE_ELEMENT;
+
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.aries.cdi.container.internal.literal.ServicePropertyLiteral;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
+
+public class OSGiBeansHandler extends DefaultHandler {
+
+	public OSGiBeansHandler(List<URL> beanDescriptorURLs) {
+		_beanDescriptorURLs = beanDescriptorURLs;
+	}
+
+	public BeansModel createBeansModel() {
+		return new BeansModel(
+			_beanClasses, _configurationModels, _referenceModels, _serviceModels, _beanDescriptorURLs);
+	}
+
+	@Override
+	public void characters(char[] c, int start, int length) {
+		if (_propertyModel == null) {
+			return;
+		}
+
+		StringBuilder sb = new StringBuilder();
+
+		sb.append(c, start, length);
+
+		_propertyModel.appendValue(sb.toString());
+	}
+
+	@Override
+	public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
+		if (matches(BEAN_ELEMENT, uri, localName)) {
+			_beanClass = attributes.getValue(uri, CLASS_ATTRIBUTE).trim();
+			_beanClasses.add(_beanClass);
+		}
+		if (matches(CONFIGURATION_ELEMENT, uri, localName)) {
+			_configurationModel = new ConfigurationModel(attributes);
+		}
+		if (matches(PROPERTY_ELEMENT, uri, localName)) {
+			_propertyModel = new PropertyModel(attributes);
+		}
+		if (matches(PROVIDE_ELEMENT, uri, localName)) {
+			String value = attributes.getValue(uri, INTERFACE_ATTRIBUTE).trim();
+			_serviceModel.addProvide(value);		}
+		if (matches(REFERENCE_ELEMENT, uri, localName)) {
+			_referenceModel = new ReferenceModel(attributes);
+		}
+		if (matches(SERVICE_ELEMENT, uri, localName)) {
+			_serviceModel = new ServiceModel(_beanClass);
+		}
+	}
+
+	@Override
+	public void endElement(String uri, String localName, String qName) throws SAXException {
+		if (matches(CONFIGURATION_ELEMENT, uri, localName)) {
+			_configurationModels.add(_configurationModel);
+			_configurationModel = null;
+		}
+		if (matches(PROPERTY_ELEMENT, uri, localName)) {
+			ServicePropertyLiteral servicePropertyLiteral = ServicePropertyLiteral.from(
+				_propertyModel.getName(), _propertyModel.getValue(), _propertyModel.getType());
+			_serviceModel.addProperty(servicePropertyLiteral);
+			_propertyModel = null;
+		}
+		if (matches(REFERENCE_ELEMENT, uri, localName)) {
+			_referenceModels.add(_referenceModel);
+			_referenceModel = null;
+		}
+		if (matches(SERVICE_ELEMENT, uri, localName)) {
+			_serviceModels.add(_serviceModel);
+			_serviceModel = null;
+			_beanClass = null;
+		}
+	}
+
+	private boolean matches(String elementName, String uri, String localName) {
+		if (localName.equals(elementName) && ("".equals(uri) || CDI_URIS.contains(uri))) {
+			return true;
+		}
+		return false;
+	}
+
+	private static final Logger _log = LoggerFactory.getLogger(OSGiBeansHandler.class);
+
+	private String _beanClass;
+	private final List<String> _beanClasses = new ArrayList<String>();
+	private final List<URL> _beanDescriptorURLs;
+	private ConfigurationModel _configurationModel;
+	private final List<ConfigurationModel> _configurationModels = new ArrayList<>();
+	private PropertyModel _propertyModel;
+	private ReferenceModel _referenceModel;
+	private final List<ReferenceModel> _referenceModels = new ArrayList<>();
+	private ServiceModel _serviceModel;
+	private final List<ServiceModel> _serviceModels = new ArrayList<>();
+
+}

Added: aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/PropertyModel.java
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/PropertyModel.java?rev=1784896&view=auto
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/PropertyModel.java (added)
+++ aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/PropertyModel.java Wed Mar  1 10:06:32 2017
@@ -0,0 +1,51 @@
+package org.apache.aries.cdi.container.internal.model;
+
+import static org.apache.aries.cdi.container.internal.model.Constants.CDI10_URI;
+import static org.apache.aries.cdi.container.internal.model.Constants.NAME_ATTRIBUTE;
+import static org.apache.aries.cdi.container.internal.model.Constants.TYPE_ATTRIBUTE;
+import static org.apache.aries.cdi.container.internal.model.Constants.VALUE_ATTRIBUTE;
+
+import org.osgi.service.cdi.annotations.PropertyType;
+import org.xml.sax.Attributes;
+
+public class PropertyModel extends AbstractModel {
+
+	public PropertyModel(Attributes attributes) {
+		_name = getValue(CDI10_URI, NAME_ATTRIBUTE, attributes);
+		_typeString = getValue(CDI10_URI, TYPE_ATTRIBUTE, attributes);
+		_type = PropertyType.valueOf(_typeString);
+		_value = new String[] {getValue(CDI10_URI, VALUE_ATTRIBUTE, attributes)};
+	}
+
+	public String getName() {
+		return _name;
+	}
+
+	public PropertyType getType() {
+		return _type;
+	}
+
+	public String[] getValue() {
+		if (_extraValue != null) {
+			return _extraValue.toString().trim().split("\\s*\\n\\s*");
+		}
+
+		return _value;
+	}
+
+	public void appendValue(String value) {
+		if (_extraValue == null) {
+			_extraValue = new StringBuilder();
+			_type = PropertyType.valueOf(_typeString + "_Array");
+		}
+
+		_extraValue.append(value);
+	}
+
+	private final String _name;
+	private PropertyType _type;
+	private final String _typeString;
+	private String[] _value;
+	private StringBuilder _extraValue;
+
+}

Added: 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/main/java/org/apache/aries/cdi/container/internal/model/ReferenceInjectionPoint.java?rev=1784896&view=auto
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/ReferenceInjectionPoint.java (added)
+++ aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/ReferenceInjectionPoint.java Wed Mar  1 10:06:32 2017
@@ -0,0 +1,62 @@
+package org.apache.aries.cdi.container.internal.model;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Member;
+import java.lang.reflect.Type;
+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.fromTarget(target));
+	}
+
+	@Override
+	public Type getType() {
+		return _beanClass;
+	}
+
+	@Override
+	public Set<Annotation> getQualifiers() {
+		return _qualifiers;
+	}
+
+	@Override
+	public Bean<?> getBean() {
+		return null;
+	}
+
+	@Override
+	public Member getMember() {
+		return null;
+	}
+
+	@Override
+	public Annotated getAnnotated() {
+		return null;
+	}
+
+	@Override
+	public boolean isDelegate() {
+		return false;
+	}
+
+	@Override
+	public boolean isTransient() {
+		return false;
+	}
+
+	private final Class<?> _beanClass;
+	private final Set<Annotation> _qualifiers;
+
+}
\ No newline at end of file

Added: aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/ReferenceModel.java
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/ReferenceModel.java?rev=1784896&view=auto
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/ReferenceModel.java (added)
+++ aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/ReferenceModel.java Wed Mar  1 10:06:32 2017
@@ -0,0 +1,27 @@
+package org.apache.aries.cdi.container.internal.model;
+
+import static org.apache.aries.cdi.container.internal.model.Constants.BEAN_CLASS_ATTRIBUTE;
+import static org.apache.aries.cdi.container.internal.model.Constants.CDI10_URI;
+import static org.apache.aries.cdi.container.internal.model.Constants.TARGET_ATTRIBUTE;
+
+import org.xml.sax.Attributes;
+
+public class ReferenceModel extends AbstractModel {
+
+	public ReferenceModel(Attributes attributes) {
+		_beanClass = getValue(CDI10_URI, BEAN_CLASS_ATTRIBUTE, attributes);
+		_target = getValue(CDI10_URI, TARGET_ATTRIBUTE, attributes);
+	}
+
+	public String getBeanClass() {
+		return _beanClass;
+	}
+
+	public String getTarget() {
+		return _target;
+	}
+
+	private final String _beanClass;
+	private final String _target;
+
+}

Added: aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/ServiceModel.java
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/ServiceModel.java?rev=1784896&view=auto
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/ServiceModel.java (added)
+++ aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/ServiceModel.java Wed Mar  1 10:06:32 2017
@@ -0,0 +1,37 @@
+package org.apache.aries.cdi.container.internal.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.osgi.service.cdi.annotations.ServiceProperty;
+
+public class ServiceModel {
+
+	public ServiceModel(String beanClass) {
+		_beanClass = beanClass;
+	}
+
+	public void addProvide(String className) {
+		_provides.add(className);
+	}
+
+	public void addProperty(ServiceProperty serviceProperty) {
+		_properties.add(serviceProperty);
+	}
+
+	public String getBeanClass() {
+		return _beanClass;
+	}
+
+	public ServiceProperty[] getProperties() {
+		return _properties.toArray(new ServiceProperty[0]);
+	}
+
+	public List<String> getProvides() {
+		return _provides;
+	}
+
+	private final String _beanClass;
+	private List<ServiceProperty> _properties = new ArrayList<>();
+	private List<String> _provides = new ArrayList<>();
+}

Added: aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/XmlSchema.java
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/XmlSchema.java?rev=1784896&view=auto
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/XmlSchema.java (added)
+++ aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/XmlSchema.java Wed Mar  1 10:06:32 2017
@@ -0,0 +1,17 @@
+package org.apache.aries.cdi.container.internal.model;
+
+public enum XmlSchema {
+
+	CDI10("META-INF/cdi.xsd");
+
+	private final String _fileName;
+
+	private XmlSchema(String fileName) {
+		_fileName = fileName;
+	}
+
+	public String getFileName() {
+		return _fileName;
+	}
+
+}

Added: aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/util/Maps.java
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/util/Maps.java?rev=1784896&view=auto
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/util/Maps.java (added)
+++ aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/util/Maps.java Wed Mar  1 10:06:32 2017
@@ -0,0 +1,26 @@
+package org.apache.aries.cdi.container.internal.util;
+
+import java.util.Map;
+
+public class Maps {
+
+	private Maps() {
+		// no instances
+	}
+
+	public static void appendFilter(StringBuilder sb, Map<String, String> map) {
+		if (map.isEmpty()) {
+			return;
+		}
+
+		for (Map.Entry<String, String> entry : map.entrySet()) {
+			sb.append("(");
+			sb.append(entry.getKey());
+			sb.append("=");
+			sb.append(entry.getValue());
+			sb.append(")");
+		}
+
+	}
+
+}

Modified: aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/util/Reflection.java
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/util/Reflection.java?rev=1784896&r1=1784895&r2=1784896&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/util/Reflection.java (original)
+++ aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/util/Reflection.java Wed Mar  1 10:06:32 2017
@@ -2,9 +2,13 @@ package org.apache.aries.cdi.container.i
 
 public class Reflection {
 
-    @SuppressWarnings("unchecked")
-    public static <T> T cast(Object obj) {
-        return (T) obj;
-    }
+	private Reflection() {
+		// no instances
+	}
+
+	@SuppressWarnings("unchecked")
+	public static <T> T cast(Object obj) {
+		return (T) obj;
+	}
 
 }

Modified: aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/util/Sets.java
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/util/Sets.java?rev=1784896&r1=1784895&r2=1784896&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/util/Sets.java (original)
+++ aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/util/Sets.java Wed Mar  1 10:06:32 2017
@@ -6,6 +6,10 @@ import java.util.Set;
 
 public class Sets {
 
+	private Sets() {
+		// no instances
+	}
+
 	@SafeVarargs
 	public static <T> Set<T> hashSet(T ... elements) {
 		return hashSet0(new HashSet<>(), elements);

Modified: aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/util/Throw.java
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/util/Throw.java?rev=1784896&r1=1784895&r2=1784896&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/util/Throw.java (original)
+++ aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/util/Throw.java Wed Mar  1 10:06:32 2017
@@ -16,7 +16,9 @@ package org.apache.aries.cdi.container.i
 
 public class Throw {
 
-	private Throw() {}
+	private Throw() {
+		// no instances
+	}
 
 	public static <T> T exception(Throwable throwable) {
 		return Throw.<T, RuntimeException>_exception(throwable);

Added: aries/trunk/cdi/cdi-extender/src/main/resources/META-INF/cdi.xsd
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/main/resources/META-INF/cdi.xsd?rev=1784896&view=auto
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/main/resources/META-INF/cdi.xsd (added)
+++ aries/trunk/cdi/cdi-extender/src/main/resources/META-INF/cdi.xsd Wed Mar  1 10:06:32 2017
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+ * Copyright (c) OSGi Alliance (2017). All Rights Reserved.
+ *
+ * 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.
+ */
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+	targetNamespace="http://www.osgi.org/xmlns/cdi/v1.0.0"
+	xmlns:cdi="http://www.osgi.org/xmlns/cdi/v1.0.0">
+
+	<complexType name="Tbean">
+		<sequence>
+			<element name="service" maxOccurs="1" minOccurs="0"
+				type="cdi:Tservice" />
+			<any namespace="##other" minOccurs="0" maxOccurs="unbounded"
+				processContents="lax" />
+		</sequence>
+		<attribute name="class" type="token" use="required" />
+		<anyAttribute processContents="lax" />
+	</complexType>
+
+	<complexType name="Tbeans">
+		<sequence>
+			<element name="bean" maxOccurs="unbounded" minOccurs="0"
+				type="cdi:Tbean" />
+			<element name="configuration" type="cdi:Tconfiguration"
+				maxOccurs="unbounded" minOccurs="0" />
+			<element name="reference" maxOccurs="unbounded" minOccurs="0"
+				type="cdi:Treference" />
+			<any namespace="##other" maxOccurs="unbounded" minOccurs="0"
+				processContents="lax" />
+		</sequence>
+		<anyAttribute processContents="lax" />
+	</complexType>
+
+	<complexType name="Tconfiguration">
+		<sequence>
+			<any namespace="##other" minOccurs="0" maxOccurs="unbounded"
+				processContents="lax" />
+		</sequence>
+		<attribute name="pid" type="token" use="required" />
+		<anyAttribute processContents="lax" />
+	</complexType>
+
+	<complexType name="Tproperty">
+		<simpleContent>
+			<extension base="string">
+				<attribute name="name" type="token" use="required" />
+				<attribute name="value" type="token" use="optional" />
+				<attribute default="String" name="type"
+					type="cdi:Tproperty_type" use="optional" />
+				<anyAttribute processContents="lax" />
+			</extension>
+		</simpleContent>
+	</complexType>
+
+	<complexType name="Tprovide">
+		<sequence>
+			<any namespace="##any" processContents="lax"
+				minOccurs="0" maxOccurs="unbounded" />
+		</sequence>
+		<attribute name="interface" type="token" use="required" />
+		<anyAttribute processContents="lax" />
+	</complexType>
+
+	<complexType name="Treference">
+		<sequence>
+			<any namespace="##any" processContents="lax"
+				minOccurs="0" maxOccurs="unbounded" />
+		</sequence>
+		<attribute name="beanClass" type="token" />
+		<attribute name="target" type="token" use="required" />
+		<anyAttribute processContents="lax" />
+	</complexType>
+
+	<complexType name="Tservice">
+		<sequence>
+			<element name="property" type="cdi:Tproperty"
+				maxOccurs="unbounded" minOccurs="0" />
+			<element name="provide" type="cdi:Tprovide"
+				minOccurs="1" maxOccurs="unbounded" />
+			<any namespace="##other" processContents="lax"
+				minOccurs="0" maxOccurs="unbounded" />
+		</sequence>
+		<anyAttribute processContents="lax" />
+	</complexType>
+
+	<simpleType name="Tproperty_type">
+		<restriction base="string">
+			<enumeration value="String" />
+			<enumeration value="Long" />
+			<enumeration value="Double" />
+			<enumeration value="Float" />
+			<enumeration value="Integer" />
+			<enumeration value="Byte" />
+			<enumeration value="Character" />
+			<enumeration value="Boolean" />
+			<enumeration value="Short" />
+		</restriction>
+	</simpleType>
+
+	<element name="beans" type="cdi:Tbeans"></element>
+</schema>

Added: aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/internal/model/ModelTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/internal/model/ModelTest.java?rev=1784896&view=auto
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/internal/model/ModelTest.java (added)
+++ aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/internal/model/ModelTest.java Wed Mar  1 10:06:32 2017
@@ -0,0 +1,187 @@
+package org.apache.aries.cdi.container.internal.model;
+
+import java.lang.reflect.Type;
+import java.net.URL;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+import org.osgi.service.cdi.CdiExtenderConstants;
+import org.osgi.service.cdi.annotations.PropertyType;
+import org.osgi.service.cdi.annotations.ServiceProperty;
+import org.osgi.util.converter.Converter;
+import org.osgi.util.converter.StandardConverter;
+
+import junit.framework.TestCase;
+
+public class ModelTest extends TestCase {
+
+	public void testModelWithBeansOnly() throws Exception {
+		AbstractModelBuilder builder = getBuilder("OSGI-INF/cdi/beans-only.xml");
+		BeansModel beansModel = builder.build();
+		assertNotNull(beansModel);
+
+		Collection<String> beanClassNames = beansModel.getBeanClassNames();
+		assertEquals(2, beanClassNames.size());
+		assertEquals("com.foo.FooImpl", beanClassNames.iterator().next());
+	}
+
+	public void testModelWithConfiguration() throws Exception {
+		AbstractModelBuilder builder = getBuilder("OSGI-INF/cdi/beans-configuration.xml");
+		BeansModel beansModel = builder.build();
+		assertNotNull(beansModel);
+
+		Collection<String> beanClassNames = beansModel.getBeanClassNames();
+		assertEquals(2, beanClassNames.size());
+		assertEquals("com.foo.FooImpl", beanClassNames.iterator().next());
+
+		Collection<ConfigurationModel> configurationModels = beansModel.getConfigurationModels();
+		assertEquals(2, configurationModels.size());
+		ConfigurationModel configurationModel = configurationModels.iterator().next();
+		assertEquals("com.foo.FooImpl", configurationModel.getPid());
+	}
+
+	public void testModelWithReferences() throws Exception {
+		AbstractModelBuilder builder = getBuilder("OSGI-INF/cdi/beans-references.xml");
+		BeansModel beansModel = builder.build();
+		assertNotNull(beansModel);
+
+		Collection<String> beanClassNames = beansModel.getBeanClassNames();
+		assertEquals(2, beanClassNames.size());
+		assertEquals("com.foo.FooImpl", beanClassNames.iterator().next());
+
+		Collection<ReferenceModel> referenceModels = beansModel.getReferenceModels();
+		assertEquals(2, referenceModels.size());
+		ReferenceModel referenceModel = referenceModels.iterator().next();
+		assertEquals("java.util.concurrent.Callable", referenceModel.getBeanClass());
+		assertEquals("(objectClass=java.util.concurrent.Callable)", referenceModel.getTarget());
+	}
+
+	public void testModelWithServices() throws Exception {
+		AbstractModelBuilder builder = getBuilder("OSGI-INF/cdi/beans-services.xml");
+		BeansModel beansModel = builder.build();
+		assertNotNull(beansModel);
+
+		Collection<String> beanClassNames = beansModel.getBeanClassNames();
+		assertEquals(2, beanClassNames.size());
+		assertEquals("com.foo.FooImpl", beanClassNames.iterator().next());
+
+		Collection<ServiceModel> serviceModels = beansModel.getServiceModels();
+		assertEquals(1, serviceModels.size());
+		ServiceModel serviceModel = serviceModels.iterator().next();
+		List<String> provides = serviceModel.getProvides();
+		assertEquals(2, provides.size());
+		assertEquals("com.foo.Foo", provides.get(0));
+		ServiceProperty[] serviceProperties = serviceModel.getProperties();
+		assertEquals(18, serviceProperties.length);
+
+		assertEquals("foo", serviceProperties[0].key());
+		assertEquals(PropertyType.String, serviceProperties[0].type());
+		assertEquals("fum", getValue(serviceProperties[0]));
+
+		assertEquals("foo2", serviceProperties[1].key());
+		assertEquals(PropertyType.Long, serviceProperties[1].type());
+		assertEquals(345987643L, getValue(serviceProperties[1]));
+
+		assertEquals("foo3", serviceProperties[2].key());
+		assertEquals(PropertyType.Double, serviceProperties[2].type());
+		assertEquals(3459.87643D, getValue(serviceProperties[2]));
+
+		assertEquals("foo4", serviceProperties[3].key());
+		assertEquals(PropertyType.Float, serviceProperties[3].type());
+		assertEquals(3459.87F, getValue(serviceProperties[3]));
+
+		assertEquals("foo5", serviceProperties[4].key());
+		assertEquals(PropertyType.Integer, serviceProperties[4].type());
+		assertEquals(724559, getValue(serviceProperties[4]));
+
+		assertEquals("foo6", serviceProperties[5].key());
+		assertEquals(PropertyType.Byte, serviceProperties[5].type());
+		assertEquals(new Byte("127"), getValue(serviceProperties[5]));
+
+		assertEquals("foo7", serviceProperties[6].key());
+		assertEquals(PropertyType.Character, serviceProperties[6].type());
+		assertEquals(new Character('X'), getValue(serviceProperties[6]));
+
+		assertEquals("foo8", serviceProperties[7].key());
+		assertEquals(PropertyType.Boolean, serviceProperties[7].type());
+		assertEquals(true, getValue(serviceProperties[7]));
+
+		assertEquals("foo9", serviceProperties[8].key());
+		assertEquals(PropertyType.Short, serviceProperties[8].type());
+		assertEquals(new Short("32767"), getValue(serviceProperties[8]));
+
+		assertEquals("foo11", serviceProperties[9].key());
+		assertEquals(PropertyType.String_Array, serviceProperties[9].type());
+		assertTrue(Arrays.equals(new String[] {"frog", "drum"}, (String[])getValue(serviceProperties[9])));
+
+		assertEquals("foo12", serviceProperties[10].key());
+		assertEquals(PropertyType.Long_Array, serviceProperties[10].type());
+		assertTrue(Arrays.equals(new Long[] {345987643L, 34L}, (Long[])getValue(serviceProperties[10])));
+
+		assertEquals("foo13", serviceProperties[11].key());
+		assertEquals(PropertyType.Double_Array, serviceProperties[11].type());
+		assertTrue(Arrays.equals(new Double[] {3459.87643D, 34.3456D}, (Double[])getValue(serviceProperties[11])));
+
+		assertEquals("foo14", serviceProperties[12].key());
+		assertEquals(PropertyType.Float_Array, serviceProperties[12].type());
+		assertTrue(Arrays.equals(new Float[] {3459.87F, 35.23F}, (Float[])getValue(serviceProperties[12])));
+
+		assertEquals("foo15", serviceProperties[13].key());
+		assertEquals(PropertyType.Integer_Array, serviceProperties[13].type());
+		assertTrue(Arrays.equals(new Integer[] {724559, 345}, (Integer[])getValue(serviceProperties[13])));
+
+		assertEquals("foo16", serviceProperties[14].key());
+		assertEquals(PropertyType.Byte_Array, serviceProperties[14].type());
+		assertTrue(Arrays.equals(new Byte[] {127, 23}, (Byte[])getValue(serviceProperties[14])));
+
+		assertEquals("foo17", serviceProperties[15].key());
+		assertEquals(PropertyType.Character_Array, serviceProperties[15].type());
+		assertTrue(Arrays.equals(new Character[] {'X', 't'}, (Character[])getValue(serviceProperties[15])));
+
+		assertEquals("foo18", serviceProperties[16].key());
+		assertEquals(PropertyType.Boolean_Array, serviceProperties[16].type());
+		assertTrue(Arrays.equals(new Boolean[] {true, false}, (Boolean[])getValue(serviceProperties[16])));
+
+		assertEquals("foo19", serviceProperties[17].key());
+		assertEquals(PropertyType.Short_Array, serviceProperties[17].type());
+		assertTrue(Arrays.equals(new Short[] {32767, 2345}, (Short[])getValue(serviceProperties[17])));
+	}
+
+	AbstractModelBuilder getBuilder(final String osgiBeansFile) {
+		return new AbstractModelBuilder() {
+
+			@Override
+			Collection<String> getResources(String descriptorString) {
+				return null;
+			}
+
+			@Override
+			URL getResource(String resource) {
+				return getClassLoader().getResource(resource);
+			}
+
+			@Override
+			ClassLoader getClassLoader() {
+				return getClass().getClassLoader();
+			}
+
+			@Override
+			Map<String, Object> getAttributes() {
+				return Collections.singletonMap(
+					CdiExtenderConstants.REQUIREMENT_OSGI_BEANS_ATTRIBUTE, osgiBeansFile);
+			}
+		};
+	}
+
+	Object getValue(ServiceProperty serviceProperty) {
+		Type type = serviceProperty.type().getType();
+		String[] value = serviceProperty.value();
+		return _converter.convert(value).to(type);
+	}
+
+	private static final Converter _converter = new StandardConverter();
+
+}

Added: 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=1784896&view=auto
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/test/resources/OSGI-INF/cdi/beans-configuration.xml (added)
+++ aries/trunk/cdi/cdi-extender/src/test/resources/OSGI-INF/cdi/beans-configuration.xml Wed Mar  1 10:06:32 2017
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<cdi:beans xmlns:cdi="http://www.osgi.org/xmlns/cdi/v1.0.0">
+	<bean class="com.foo.FooImpl" />
+	<bean class="com.foo.BarImpl" />
+	<configuration pid="com.foo.FooImpl" />
+	<configuration pid="com.foo.other" />
+</cdi:beans>
\ No newline at end of file

Added: 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=1784896&view=auto
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/test/resources/OSGI-INF/cdi/beans-only.xml (added)
+++ aries/trunk/cdi/cdi-extender/src/test/resources/OSGI-INF/cdi/beans-only.xml Wed Mar  1 10:06:32 2017
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<cdi:beans xmlns:cdi="http://www.osgi.org/xmlns/cdi/v1.0.0">
+	<bean class="com.foo.FooImpl" />
+	<bean class="com.foo.BarImpl" />
+</cdi:beans>
\ No newline at end of file

Added: 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=1784896&view=auto
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/test/resources/OSGI-INF/cdi/beans-references.xml (added)
+++ aries/trunk/cdi/cdi-extender/src/test/resources/OSGI-INF/cdi/beans-references.xml Wed Mar  1 10:06:32 2017
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<cdi:beans xmlns:cdi="http://www.osgi.org/xmlns/cdi/v1.0.0">
+	<bean class="com.foo.FooImpl" />
+	<bean class="com.foo.BarImpl" />
+	<reference beanClass="java.util.concurrent.Callable" target="(objectClass=java.util.concurrent.Callable)" />
+	<reference beanClass="java.util.Map" target="(objectClass=java.util.Map)" />
+</cdi:beans>
\ No newline at end of file

Added: 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=1784896&view=auto
==============================================================================
--- aries/trunk/cdi/cdi-extender/src/test/resources/OSGI-INF/cdi/beans-services.xml (added)
+++ aries/trunk/cdi/cdi-extender/src/test/resources/OSGI-INF/cdi/beans-services.xml Wed Mar  1 10:06:32 2017
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<cdi:beans xmlns:cdi="http://www.osgi.org/xmlns/cdi/v1.0.0">
+	<bean class="com.foo.FooImpl">
+		<service>
+			<provide interface="com.foo.Foo" />
+			<provide interface="java.lang.Clonable" />
+			<property name="foo" type="String" value="fum" />
+			<property name="foo2" type="Long" value="345987643" />
+			<property name="foo3" type="Double" value="3459.87643" />
+			<property name="foo4" type="Float" value="3459.87" />
+			<property name="foo5" type="Integer" value="724559" />
+			<property name="foo6" type="Byte" value="127" />
+			<property name="foo7" type="Character" value="X" />
+			<property name="foo8" type="Boolean" value="true" />
+			<property name="foo9" type="Short" value="32767" />
+			<property name="foo11" type="String">
+				frog
+				drum
+			</property>
+			<property name="foo12" type="Long">
+				345987643
+				34
+			</property>
+			<property name="foo13" type="Double">
+				3459.87643
+				34.3456
+			</property>
+			<property name="foo14" type="Float">
+				3459.87
+				35.23
+			</property>
+			<property name="foo15" type="Integer">
+				724559
+				345
+			</property>
+			<property name="foo16" type="Byte">
+				127
+				23
+			</property>
+			<property name="foo17" type="Character">
+				X
+				t
+			</property>
+			<property name="foo18" type="Boolean">
+				true
+				false
+			</property>
+			<property name="foo19" type="Short">
+				32767
+				2345
+			</property>
+		</service>
+	</bean>
+	<bean class="com.foo.BarImpl" />
+</cdi:beans>
\ No newline at end of file

Modified: aries/trunk/cdi/cdi-itests/bnd.bnd
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-itests/bnd.bnd?rev=1784896&r1=1784895&r2=1784896&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-itests/bnd.bnd (original)
+++ aries/trunk/cdi/cdi-itests/bnd.bnd Wed Mar  1 10:06:32 2017
@@ -23,7 +23,8 @@ p = org.apache.aries.cdi.test
 	basic-beans.jar,\
 	services-one.jar,\
 	tb1.jar,\
-	tb2.jar
+	tb2.jar,\
+	tb3.jar
 
 # Don't forget that we had to coax the `maven-jar-plugin` NOT to include the `sub-bundle` packages in
 # the root bundle:

Modified: aries/trunk/cdi/cdi-itests/bnd/basic-beans.bnd
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-itests/bnd/basic-beans.bnd?rev=1784896&r1=1784895&r2=1784896&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-itests/bnd/basic-beans.bnd (original)
+++ aries/trunk/cdi/cdi-itests/bnd/basic-beans.bnd Wed Mar  1 10:06:32 2017
@@ -2,4 +2,4 @@ Export-Package: ${p}.beans.*
 Require-Capability:\
 	osgi.extender;filter:='(&(osgi.extender=osgi.cdi)(version>=0.0.1)(!(version>=1.0.0)))',\
 	osgi.cdi.extension;filter:='(&(osgi.cdi.extension=jndi)(version>=0.0.1)(!(version>=1.0.0)))'
--includeresource: META-INF/beans.xml=bnd/basic-beans.xml
\ No newline at end of file
+-includeresource: OSGI-INF/cdi/osgi-beans.xml=bnd/basic-beans.xml
\ No newline at end of file

Modified: aries/trunk/cdi/cdi-itests/bnd/basic-beans.xml
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-itests/bnd/basic-beans.xml?rev=1784896&r1=1784895&r2=1784896&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-itests/bnd/basic-beans.xml (original)
+++ aries/trunk/cdi/cdi-itests/bnd/basic-beans.xml Wed Mar  1 10:06:32 2017
@@ -1,8 +1,19 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<beans
-	version="1.1" bean-discovery-mode="annotated"
-	xmlns="http://xmlns.jcp.org/xml/ns/javaee"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd"
->
-</beans>
\ No newline at end of file
+
+<cdi:beans xmlns:cdi="http://www.osgi.org/xmlns/cdi/v1.0.0">
+	<bean class="org.apache.aries.cdi.test.beans.BeanWithReference" />
+	<bean class="org.apache.aries.cdi.test.beans.BundleContextBean" />
+	<bean class="org.apache.aries.cdi.test.beans.CdiEventObserver" />
+	<bean class="org.apache.aries.cdi.test.beans.ConstructorInjectedService" />
+	<bean class="org.apache.aries.cdi.test.beans.FieldInjectedBundleScopedImpl" />
+	<bean class="org.apache.aries.cdi.test.beans.FieldInjectedPrototypeScopedImpl" />
+	<bean class="org.apache.aries.cdi.test.beans.FieldInjectedService" />
+	<bean class="org.apache.aries.cdi.test.beans.InstanceBean" />
+	<bean class="org.apache.aries.cdi.test.beans.InstanceCardinality0Bean" />
+	<bean class="org.apache.aries.cdi.test.beans.InstanceOrderBean" />
+	<bean class="org.apache.aries.cdi.test.beans.InstancePropertiesBean" />
+	<bean class="org.apache.aries.cdi.test.beans.InstanceServiceReferenceBean" />
+	<bean class="org.apache.aries.cdi.test.beans.MethodInjectedService" />
+	<bean class="org.apache.aries.cdi.test.beans.PojoImpl" />
+	<bean class="org.apache.aries.cdi.test.beans.ServiceWithProperties" />
+</cdi:beans>
\ No newline at end of file

Added: aries/trunk/cdi/cdi-itests/bnd/tb1-beans.xml
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-itests/bnd/tb1-beans.xml?rev=1784896&view=auto
==============================================================================
--- aries/trunk/cdi/cdi-itests/bnd/tb1-beans.xml (added)
+++ aries/trunk/cdi/cdi-itests/bnd/tb1-beans.xml Wed Mar  1 10:06:32 2017
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<cdi:beans xmlns:cdi="http://www.osgi.org/xmlns/cdi/v1.0.0">
+	<bean class="org.apache.aries.cdi.test.tb1.BeanImpl" />
+	<reference
+		beanClass="org.apache.aries.cdi.test.interfaces.Pojo"
+		target="(objectClass=org.apache.aries.cdi.test.interfaces.Pojo)" />
+</cdi:beans>
\ No newline at end of file

Modified: aries/trunk/cdi/cdi-itests/bnd/tb1.bnd
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-itests/bnd/tb1.bnd?rev=1784896&r1=1784895&r2=1784896&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-itests/bnd/tb1.bnd (original)
+++ aries/trunk/cdi/cdi-itests/bnd/tb1.bnd Wed Mar  1 10:06:32 2017
@@ -1,3 +1,3 @@
 Export-Package: ${p}.tb1.*
-Require-Capability: osgi.extender;filter:='(osgi.extender=osgi.cdi)';references:="org.apache.aries.cdi.test.tb1.BeanImpl"
--includeresource: META-INF/beans.xml=bnd/basic-beans.xml
\ No newline at end of file
+Require-Capability: osgi.extender;filter:='(osgi.extender=osgi.cdi)'
+-includeresource: OSGI-INF/cdi/osgi-beans.xml=bnd/tb1-beans.xml
\ No newline at end of file

Added: aries/trunk/cdi/cdi-itests/bnd/tb2-beans.xml
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-itests/bnd/tb2-beans.xml?rev=1784896&view=auto
==============================================================================
--- aries/trunk/cdi/cdi-itests/bnd/tb2-beans.xml (added)
+++ aries/trunk/cdi/cdi-itests/bnd/tb2-beans.xml Wed Mar  1 10:06:32 2017
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<cdi:beans xmlns:cdi="http://www.osgi.org/xmlns/cdi/v1.0.0">
+	<bean class="org.apache.aries.cdi.test.tb2.PojoImpl">
+		<service>
+			<provide interface="org.apache.aries.cdi.test.interfaces.Pojo" />
+		</service>
+	</bean>
+</cdi:beans>
\ No newline at end of file

Modified: aries/trunk/cdi/cdi-itests/bnd/tb2.bnd
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-itests/bnd/tb2.bnd?rev=1784896&r1=1784895&r2=1784896&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-itests/bnd/tb2.bnd (original)
+++ aries/trunk/cdi/cdi-itests/bnd/tb2.bnd Wed Mar  1 10:06:32 2017
@@ -1,3 +1,3 @@
 Export-Package: ${p}.tb2.*
-Require-Capability: osgi.extender;filter:='(osgi.extender=osgi.cdi)';services:="org.apache.aries.cdi.test.tb2.PojoImpl"
--includeresource: META-INF/beans.xml=bnd/basic-beans.xml
\ No newline at end of file
+Require-Capability: osgi.extender;filter:='(osgi.extender=osgi.cdi)'
+-includeresource: OSGI-INF/cdi/osgi-beans.xml=bnd/tb2-beans.xml
\ No newline at end of file

Added: aries/trunk/cdi/cdi-itests/bnd/tb3-beans.xml
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-itests/bnd/tb3-beans.xml?rev=1784896&view=auto
==============================================================================
--- aries/trunk/cdi/cdi-itests/bnd/tb3-beans.xml (added)
+++ aries/trunk/cdi/cdi-itests/bnd/tb3-beans.xml Wed Mar  1 10:06:32 2017
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<cdi:beans xmlns:cdi="http://www.osgi.org/xmlns/cdi/v1.0.0">
+	<bean class="org.apache.aries.cdi.test.tb3.ConfigurationBeanA" />
+</cdi:beans>
\ No newline at end of file

Added: aries/trunk/cdi/cdi-itests/bnd/tb3.bnd
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-itests/bnd/tb3.bnd?rev=1784896&view=auto
==============================================================================
--- aries/trunk/cdi/cdi-itests/bnd/tb3.bnd (added)
+++ aries/trunk/cdi/cdi-itests/bnd/tb3.bnd Wed Mar  1 10:06:32 2017
@@ -0,0 +1,3 @@
+Export-Package: ${p}.tb3.*
+Require-Capability: osgi.extender;filter:='(osgi.extender=osgi.cdi)'
+-includeresource: OSGI-INF/cdi/osgi-beans.xml=bnd/tb3-beans.xml
\ No newline at end of file

Modified: aries/trunk/cdi/cdi-itests/itest.bndrun
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-itests/itest.bndrun?rev=1784896&r1=1784895&r2=1784896&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-itests/itest.bndrun (original)
+++ aries/trunk/cdi/cdi-itests/itest.bndrun Wed Mar  1 10:06:32 2017
@@ -9,7 +9,6 @@
 	osgi.identity;filter:='(osgi.identity=org.apache.aries.cdi.extender)',\
 	osgi.identity;filter:='(osgi.identity=org.apache.aries.cdi.extension.jndi)',\
 	osgi.identity;filter:='(osgi.identity=org.apache.aries.cdi.itests)',\
-	osgi.identity;filter:='(osgi.identity=org.apache.aries.cdi.log4j.configuration.fragment)',\
 	osgi.identity;filter:='(osgi.identity=org.apache.aries.jndi.core)',\
 	osgi.identity;filter:='(osgi.identity=org.apache.felix.configadmin)',\
 	osgi.identity;filter:='(osgi.identity=org.apache.felix.gogo.command)',\
@@ -17,34 +16,33 @@
 	osgi.identity;filter:='(osgi.identity=slf4j.log4j12)'
 
 -runbundles: \
-	javax.enterprise.cdi-api; version='[1.2.0,1.2.1)',\
-	jboss-classfilewriter; version='[1.1.2,1.1.3)',\
-	log4j; version='[1.2.17,1.2.18)',\
-	org.apache.aries.cdi.api.provider.fragment; version='[0.0.1,0.0.2)',\
-	org.apache.aries.cdi.extender; version='[0.0.1,0.0.2)',\
-	org.apache.aries.cdi.extension.jndi; version='[0.0.1,0.0.2)',\
-	org.apache.aries.cdi.itests; version='[0.0.1,0.0.2)',\
-	org.apache.aries.cdi.log4j.configuration.fragment; version='[0.0.1,0.0.2)',\
-	org.apache.aries.cdi.osgi.api; version='[0.0.1,0.0.2)',\
-	org.apache.aries.jndi.api; version='[1.1.0,1.1.1)',\
-	org.apache.aries.jndi.core; version='[1.0.2,1.0.3)',\
-	org.apache.aries.util; version='[1.0.0,1.0.1)',\
-	org.apache.felix.configadmin; version='[1.8.12,1.8.13)',\
-	org.apache.felix.gogo.command; version='[1.0.2,1.0.3)',\
-	org.apache.felix.gogo.runtime; version='[1.0.2,1.0.3)',\
-	org.apache.felix.gogo.shell; version='[1.0.0,1.0.1)',\
-	org.apache.felix.scr; version='[2.0.6,2.0.7)',\
-	org.apache.logging.log4j.api; version='[2.7.0,2.7.1)',\
-	org.glassfish.hk2.external.javax.inject; version='[2.5.0,2.5.1)',\
-	org.jboss.logging.jboss-logging; version='[3.2.1,3.2.2)',\
-	org.jboss.spec.javax.annotation.jboss-annotations-api_1.2_spec; version='[1.0.0,1.0.1)',\
-	org.jboss.spec.javax.el.jboss-el-api_3.0_spec; version='[1.0.0,1.0.1)',\
-	org.jboss.spec.javax.interceptor.jboss-interceptors-api_1.2_spec; version='[1.0.0,1.0.1)',\
-	org.jboss.weld.osgi-bundle; version='[2.4.0,2.4.1)',\
-	osgi.enroute.hamcrest.wrapper; version='[1.3.0,1.3.1)',\
-	osgi.enroute.junit.wrapper; version='[4.12.0,4.12.1)',\
-	slf4j.api; version='[1.7.21,1.7.22)',\
-	slf4j.log4j12; version='[1.6.1,1.6.2)'
+	javax.enterprise.cdi-api;version='[1.2.0,1.2.1)',\
+	jboss-classfilewriter;version='[1.1.2,1.1.3)',\
+	log4j;version='[1.2.17,1.2.18)',\
+	org.apache.aries.cdi.api.provider.fragment;version='[0.0.1,0.0.2)',\
+	org.apache.aries.cdi.extender;version='[0.0.1,0.0.2)',\
+	org.apache.aries.cdi.extension.jndi;version='[0.0.1,0.0.2)',\
+	org.apache.aries.cdi.itests;version='[0.0.1,0.0.2)',\
+	org.apache.aries.jndi.api;version='[1.1.0,1.1.1)',\
+	org.apache.aries.jndi.core;version='[1.0.2,1.0.3)',\
+	org.apache.aries.util;version='[1.0.0,1.0.1)',\
+	org.apache.felix.configadmin;version='[1.8.12,1.8.13)',\
+	org.apache.felix.gogo.command;version='[1.0.2,1.0.3)',\
+	org.apache.felix.gogo.runtime;version='[1.0.2,1.0.3)',\
+	org.apache.felix.gogo.shell;version='[1.0.0,1.0.1)',\
+	org.apache.felix.scr;version='[2.0.6,2.0.7)',\
+	org.apache.logging.log4j.api;version='[2.7.0,2.7.1)',\
+	org.glassfish.hk2.external.javax.inject;version='[2.5.0,2.5.1)',\
+	org.jboss.logging.jboss-logging;version='[3.2.1,3.2.2)',\
+	org.jboss.spec.javax.annotation.jboss-annotations-api_1.2_spec;version='[1.0.0,1.0.1)',\
+	org.jboss.spec.javax.el.jboss-el-api_3.0_spec;version='[1.0.0,1.0.1)',\
+	org.jboss.spec.javax.interceptor.jboss-interceptors-api_1.2_spec;version='[1.0.0,1.0.1)',\
+	org.jboss.weld.osgi-bundle;version='[2.4.0,2.4.1)',\
+	org.osgi.service.cdi;version='[1.0.0,1.0.1)',\
+	osgi.enroute.hamcrest.wrapper;version='[1.3.0,1.3.1)',\
+	osgi.enroute.junit.wrapper;version='[4.12.0,4.12.1)',\
+	slf4j.api;version='[1.7.21,1.7.22)',\
+	slf4j.log4j12;version='[1.6.1,1.6.2)'
 
 -resolve.effective: resolve, active
 -runee: JavaSE-1.8
@@ -54,5 +52,6 @@
 	osgi.console.enable.builtin=false, \
 	osgi.console=, \
 	org.osgi.service.http.port=8080,\
-	org.jboss.logging.provider=slf4j
+	org.jboss.logging.provider=slf4j,\
+	log4j.configuration=file:${.}/log4j.properties
 -runsystempackages: javax.script

Copied: aries/trunk/cdi/cdi-itests/log4j.properties (from r1784895, aries/trunk/cdi/cdi-log4j-configuration-fragment/src/main/resources/log4j.properties)
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-itests/log4j.properties?p2=aries/trunk/cdi/cdi-itests/log4j.properties&p1=aries/trunk/cdi/cdi-log4j-configuration-fragment/src/main/resources/log4j.properties&r1=1784895&r2=1784896&rev=1784896&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-log4j-configuration-fragment/src/main/resources/log4j.properties (original)
+++ aries/trunk/cdi/cdi-itests/log4j.properties Wed Mar  1 10:06:32 2017
@@ -9,4 +9,4 @@ log4j.appender.CONSOLE=org.apache.log4j.
 log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
 log4j.appender.CONSOLE.layout.ConversionPattern=[%t] %-5p %c:%L | %m%n
 
-log4j.logger.org.apache.aries.cdi=DEBUG
+log4j.logger.org.apache.aries.cdi.container.internal.container=DEBUG

Modified: aries/trunk/cdi/cdi-itests/pom.xml
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-itests/pom.xml?rev=1784896&r1=1784895&r2=1784896&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-itests/pom.xml (original)
+++ aries/trunk/cdi/cdi-itests/pom.xml Wed Mar  1 10:06:32 2017
@@ -44,6 +44,16 @@
 			</plugin>
 			<plugin>
 				<groupId>biz.aQute.bnd</groupId>
+				<artifactId>bnd-resolver-maven-plugin</artifactId>
+				<configuration>
+					<failOnChanges>false</failOnChanges>
+					<bndruns>
+						<bndrun>itest.bndrun</bndrun>
+					</bndruns>
+				</configuration>
+			</plugin>
+			<plugin>
+				<groupId>biz.aQute.bnd</groupId>
 				<artifactId>bnd-testing-maven-plugin</artifactId>
 				<configuration>
 					<failOnChanges>false</failOnChanges>
@@ -51,7 +61,6 @@
 					<bndruns>
 						<bndrun>itest.bndrun</bndrun>
 					</bndruns>
-					<targetDir>.</targetDir>
 				</configuration>
 			</plugin>
 		</plugins>

Modified: aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/beans/BeanWithReference.java
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/beans/BeanWithReference.java?rev=1784896&r1=1784895&r2=1784896&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/beans/BeanWithReference.java (original)
+++ aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/beans/BeanWithReference.java Wed Mar  1 10:06:32 2017
@@ -10,29 +10,29 @@ import javax.inject.Qualifier;
 
 import org.apache.aries.cdi.test.interfaces.BundleScoped;
 import org.osgi.service.cdi.annotations.Reference;
-import org.osgi.service.cdi.annotations.ReferenceFilterQualifier;
+import org.osgi.service.cdi.annotations.ReferenceFilter;
 
 public class BeanWithReference {
 
 	@Qualifier
-	@ReferenceFilterQualifier
+	@ReferenceFilter
 	@Retention(value = RetentionPolicy.RUNTIME)
 	@Target(value = { ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.CONSTRUCTOR })
 	public @interface ComplexEnoughKey {
-		String value();
+		String complex_enough_key();
 	}
 
 	@Qualifier
-	@ReferenceFilterQualifier
+	@ReferenceFilter
 	@Retention(value = RetentionPolicy.RUNTIME)
 	@Target(value = { ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.CONSTRUCTOR })
 	public @interface ComplexAnnotation {
-		String feeFi();
-		int foFum();
+		String fee_fi();
+		int fo_fum();
 	}
 
-	@ComplexEnoughKey("fum")
-	@ComplexAnnotation(feeFi = "fee", foFum = 23)
+	@ComplexEnoughKey(complex_enough_key= "fum")
+	@ComplexAnnotation(fee_fi = "fee", fo_fum = 23)
 	@Inject
 	@Reference
 	BundleScoped bundleScoped;

Modified: aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/beans/ServiceWithProperties.java
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/beans/ServiceWithProperties.java?rev=1784896&r1=1784895&r2=1784896&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/beans/ServiceWithProperties.java (original)
+++ aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/beans/ServiceWithProperties.java Wed Mar  1 10:06:32 2017
@@ -15,7 +15,6 @@ import org.apache.aries.cdi.test.interfa
 import org.osgi.service.cdi.annotations.PropertyType;
 import org.osgi.service.cdi.annotations.Service;
 import org.osgi.service.cdi.annotations.ServiceProperty;
-import org.osgi.service.cdi.annotations.ServicePropertyQualifier;
 
 @Service(
 	properties = {
@@ -23,55 +22,54 @@ import org.osgi.service.cdi.annotations.
 		@ServiceProperty(key = "test.key.b2", value = "test.value.b2"),
 
 		@ServiceProperty(key = "p.Boolean", value = "true", type = PropertyType.Boolean),
-		@ServiceProperty(key = "p.Boolean.array", value = "true,false", type = PropertyType.Boolean_Array),
-		@ServiceProperty(key = "p.Boolean.list", value = "false,true", type = PropertyType.Boolean_List),
-		@ServiceProperty(key = "p.Boolean.set", value = "true, true, false", type = PropertyType.Boolean_Set),
+		@ServiceProperty(key = "p.Boolean.array", value = {"true","false"}, type = PropertyType.Boolean_Array),
+		@ServiceProperty(key = "p.Boolean.list", value = {"false","true"}, type = PropertyType.Boolean_List),
+		@ServiceProperty(key = "p.Boolean.set", value = {"true", "true", "false"}, type = PropertyType.Boolean_Set),
 		@ServiceProperty(key = "p.Byte", value = "2", type = PropertyType.Byte),
-		@ServiceProperty(key = "p.Byte.array", value = "2,34", type = PropertyType.Byte_Array),
-		@ServiceProperty(key = "p.Byte.list", value = "34,2", type = PropertyType.Byte_List),
-		@ServiceProperty(key = "p.Byte.set", value = "34,34,2", type = PropertyType.Byte_Set),
+		@ServiceProperty(key = "p.Byte.array", value = {"2","34"}, type = PropertyType.Byte_Array),
+		@ServiceProperty(key = "p.Byte.list", value = {"34","2"}, type = PropertyType.Byte_List),
+		@ServiceProperty(key = "p.Byte.set", value = {"34","34","2"}, type = PropertyType.Byte_Set),
 		@ServiceProperty(key = "p.Character", value = "C", type = PropertyType.Character),
-		@ServiceProperty(key = "p.Character.array", value = "C,D", type = PropertyType.Character_Array),
-		@ServiceProperty(key = "p.Character.list", value = "D,C", type = PropertyType.Character_List),
-		@ServiceProperty(key = "p.Character.set", value = "D,D,C", type = PropertyType.Character_Set),
+		@ServiceProperty(key = "p.Character.array", value = {"C","D"}, type = PropertyType.Character_Array),
+		@ServiceProperty(key = "p.Character.list", value = {"D","C"}, type = PropertyType.Character_List),
+		@ServiceProperty(key = "p.Character.set", value = {"D","D","C"}, type = PropertyType.Character_Set),
 		@ServiceProperty(key = "p.Double", value = "2.5", type = PropertyType.Double),
-		@ServiceProperty(key = "p.Double.array", value = "2.5,45.678", type = PropertyType.Double_Array),
-		@ServiceProperty(key = "p.Double.list", value = "45.678,2.5", type = PropertyType.Double_List),
-		@ServiceProperty(key = "p.Double.set", value = "45.678,45.678,2.5", type = PropertyType.Double_Set),
+		@ServiceProperty(key = "p.Double.array", value = {"2.5","45.678"}, type = PropertyType.Double_Array),
+		@ServiceProperty(key = "p.Double.list", value = {"45.678","2.5"}, type = PropertyType.Double_List),
+		@ServiceProperty(key = "p.Double.set", value = {"45.678","45.678","2.5"}, type = PropertyType.Double_Set),
 		@ServiceProperty(key = "p.Float", value = "3.4", type = PropertyType.Float),
-		@ServiceProperty(key = "p.Float.array", value = "3.4,78.9", type = PropertyType.Float_Array),
-		@ServiceProperty(key = "p.Float.list", value = "78.9,3.4", type = PropertyType.Float_List),
-		@ServiceProperty(key = "p.Float.set", value = "78.9,78.9,3.4", type = PropertyType.Float_Set),
+		@ServiceProperty(key = "p.Float.array", value = {"3.4","78.9"}, type = PropertyType.Float_Array),
+		@ServiceProperty(key = "p.Float.list", value = {"78.9","3.4"}, type = PropertyType.Float_List),
+		@ServiceProperty(key = "p.Float.set", value = {"78.9","78.9","3.4"}, type = PropertyType.Float_Set),
 		@ServiceProperty(key = "p.Integer", value = "5", type = PropertyType.Integer),
-		@ServiceProperty(key = "p.Integer.array", value = "5,34567", type = PropertyType.Integer_Array),
-		@ServiceProperty(key = "p.Integer.list", value = "34567,5", type = PropertyType.Integer_List),
-		@ServiceProperty(key = "p.Integer.set", value = "34567,34567,5", type = PropertyType.Integer_Set),
+		@ServiceProperty(key = "p.Integer.array", value = {"5","34567"}, type = PropertyType.Integer_Array),
+		@ServiceProperty(key = "p.Integer.list", value = {"34567","5"}, type = PropertyType.Integer_List),
+		@ServiceProperty(key = "p.Integer.set", value = {"34567","34567","5"}, type = PropertyType.Integer_Set),
 		@ServiceProperty(key = "p.Long", value = "7", type = PropertyType.Long),
-		@ServiceProperty(key = "p.Long.array", value = "7,7789654", type = PropertyType.Long_Array),
-		@ServiceProperty(key = "p.Long.list", value = "7789654,7", type = PropertyType.Long_List),
-		@ServiceProperty(key = "p.Long.set", value = "7789654,7789654,7", type = PropertyType.Long_Set),
+		@ServiceProperty(key = "p.Long.array", value = {"7","7789654"}, type = PropertyType.Long_Array),
+		@ServiceProperty(key = "p.Long.list", value = {"7789654","7"}, type = PropertyType.Long_List),
+		@ServiceProperty(key = "p.Long.set", value = {"7789654","7789654","7"}, type = PropertyType.Long_Set),
 		@ServiceProperty(key = "p.Short", value = "25", type = PropertyType.Short),
-		@ServiceProperty(key = "p.Short.array", value = "25,196", type = PropertyType.Short_Array),
-		@ServiceProperty(key = "p.Short.list", value = "196,25", type = PropertyType.Short_List),
-		@ServiceProperty(key = "p.Short.set", value = "196,196,25", type = PropertyType.Short_Set),
+		@ServiceProperty(key = "p.Short.array", value = {"25","196"}, type = PropertyType.Short_Array),
+		@ServiceProperty(key = "p.Short.list", value = {"196","25"}, type = PropertyType.Short_List),
+		@ServiceProperty(key = "p.Short.set", value = {"196","196","25"}, type = PropertyType.Short_Set),
 		@ServiceProperty(key = "p.String", value = "black", type = PropertyType.String),
-		@ServiceProperty(key = "p.String.array", value = "black,green", type = PropertyType.String_Array),
-		@ServiceProperty(key = "p.String.list", value = "green,black", type = PropertyType.String_List),
-		@ServiceProperty(key = "p.String.set", value = "green,green,black", type = PropertyType.String_Set)
+		@ServiceProperty(key = "p.String.array", value = {"black","green"}, type = PropertyType.String_Array),
+		@ServiceProperty(key = "p.String.list", value = {"green","black"}, type = PropertyType.String_List),
+		@ServiceProperty(key = "p.String.set", value = {"green","green","black"}, type = PropertyType.String_Set)
 	},
 	type = {ServiceWithProperties.class, BeanService.class}
 )
 @Singleton
-@MoreProperties(glubInteger = 45, gooString = "green")
+@MoreProperties(glub_integer = 45, goo_string = "green")
 public class ServiceWithProperties implements BeanService<Pojo> {
 
 	@Qualifier
-	@ServicePropertyQualifier
 	@Retention(value = RetentionPolicy.RUNTIME)
 	@Target(value = { ElementType.TYPE })
 	public @interface MoreProperties {
-		String gooString();
-		int glubInteger();
+		String goo_string();
+		int glub_integer();
 	}
 
 	@Override

Modified: aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/cases/AbstractTestCase.java
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/cases/AbstractTestCase.java?rev=1784896&r1=1784895&r2=1784896&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/cases/AbstractTestCase.java (original)
+++ aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/cases/AbstractTestCase.java Wed Mar  1 10:06:32 2017
@@ -87,7 +87,7 @@ public class AbstractTestCase extends Te
 	ServiceTracker<CdiContainer, CdiContainer> getServiceTracker(long bundleId) throws InvalidSyntaxException {
 		Filter filter = bundleContext.createFilter(
 			"(&(objectClass=" + CdiContainer.class.getName() + ")(service.bundleid=" + bundleId + ")(" +
-				CdiExtenderConstants.CDI_EXTENDER_CONTAINER_STATE + "=" + CdiEvent.State.CREATED + "))");
+				CdiExtenderConstants.CDI_EXTENDER_CONTAINER_STATE + "=" + CdiEvent.Type.CREATED + "))");
 
 		ServiceTracker<CdiContainer, CdiContainer> serviceTracker = new ServiceTracker<>(bundleContext, filter, null);
 
@@ -124,7 +124,7 @@ public class AbstractTestCase extends Te
 
 	static final Bundle bundle = FrameworkUtil.getBundle(CdiBeanTests.class);
 	static final BundleContext bundleContext = bundle.getBundleContext();
-	static final long timeout = 10000;
+	static final long timeout = 5000;
 
 	Bundle cdiBundle;
 	Bundle servicesBundle;

Added: aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/cases/ConfigurationTests.java
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/cases/ConfigurationTests.java?rev=1784896&view=auto
==============================================================================
--- aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/cases/ConfigurationTests.java (added)
+++ aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/cases/ConfigurationTests.java Wed Mar  1 10:06:32 2017
@@ -0,0 +1,30 @@
+package org.apache.aries.cdi.test.cases;
+
+public class ConfigurationTests extends AbstractTestCase {
+
+	@SuppressWarnings({ "rawtypes", "unchecked" })
+	public void testConfiguration() throws Exception {
+//		Bundle tb3Bundle = installBundle("tb3.jar");
+//
+//		ServiceTracker<BeanService, BeanService> st = new ServiceTracker<BeanService, BeanService>(
+//			bundleContext, BeanService.class, null);
+//		st.open(true);
+//
+//		try {
+//			BeanService<Callable<int[]>> beanService = st.waitForService(timeout);
+//			assertNotNull(beanService);
+//		}
+//		finally {
+//			tb3Bundle.uninstall();
+//		}
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+	}
+
+	@Override
+	protected void tearDown() throws Exception {
+	}
+
+}

Copied: aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/cases/EventsTests.java (from r1784895, aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/cases/EventsTestCase.java)
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/cases/EventsTests.java?p2=aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/cases/EventsTests.java&p1=aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/cases/EventsTestCase.java&r1=1784895&r2=1784896&rev=1784896&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/cases/EventsTestCase.java (original)
+++ aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/cases/EventsTests.java Wed Mar  1 10:06:32 2017
@@ -12,7 +12,7 @@ import org.apache.aries.cdi.test.interfa
 import org.apache.aries.cdi.test.interfaces.CdiEventObserverQualifier;
 import org.osgi.service.cdi.CdiEvent;
 
-public class EventsTestCase extends AbstractTestCase {
+public class EventsTests extends AbstractTestCase {
 
 	@Override
 	protected void setUp() throws Exception {

Copied: aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/cases/JndiExtensionTests.java (from r1784895, aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/cases/CdiJndiExtensionTests.java)
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/cases/JndiExtensionTests.java?p2=aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/cases/JndiExtensionTests.java&p1=aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/cases/CdiJndiExtensionTests.java&r1=1784895&r2=1784896&rev=1784896&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/cases/CdiJndiExtensionTests.java (original)
+++ aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/cases/JndiExtensionTests.java Wed Mar  1 10:06:32 2017
@@ -20,7 +20,7 @@ import org.osgi.service.jndi.JNDIConstan
 import org.osgi.util.tracker.BundleTracker;
 import org.osgi.util.tracker.BundleTrackerCustomizer;
 
-public class CdiJndiExtensionTests extends AbstractTestCase {
+public class JndiExtensionTests extends AbstractTestCase {
 
 	@Override
 	protected void setUp() throws Exception {
@@ -86,24 +86,24 @@ public class CdiJndiExtensionTests exten
 
 		ServiceReference<CdiContainer> serviceReference = serviceReferences.iterator().next();
 
-		CdiEvent.State state = (CdiEvent.State)serviceReference.getProperty(
+		CdiEvent.Type state = (CdiEvent.Type)serviceReference.getProperty(
 			CdiExtenderConstants.CDI_EXTENDER_CONTAINER_STATE);
 
-		assertEquals(CdiEvent.State.CREATED, state);
+		assertEquals(CdiEvent.Type.CREATED, state);
 
 		extensionBundle.stop();
 
-		state = (CdiEvent.State)serviceReference.getProperty(
+		state = (CdiEvent.Type)serviceReference.getProperty(
 			CdiExtenderConstants.CDI_EXTENDER_CONTAINER_STATE);
 
-		assertEquals(CdiEvent.State.WAITING_FOR_EXTENSIONS, state);
+		assertEquals(CdiEvent.Type.WAITING_FOR_EXTENSIONS, state);
 
 		extensionBundle.start();
 
-		state = (CdiEvent.State)serviceReference.getProperty(
+		state = (CdiEvent.Type)serviceReference.getProperty(
 			CdiExtenderConstants.CDI_EXTENDER_CONTAINER_STATE);
 
-		assertEquals(CdiEvent.State.CREATED, state);
+		assertEquals(CdiEvent.Type.CREATED, state);
 	}
 
 }
\ No newline at end of file

Copied: aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/cases/OSGiBeanDescriptorTests.java (from r1784895, aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/cases/ManifestReferencesAndServicesTestCase.java)
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/cases/OSGiBeanDescriptorTests.java?p2=aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/cases/OSGiBeanDescriptorTests.java&p1=aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/cases/ManifestReferencesAndServicesTestCase.java&r1=1784895&r2=1784896&rev=1784896&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/cases/ManifestReferencesAndServicesTestCase.java (original)
+++ aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/cases/OSGiBeanDescriptorTests.java Wed Mar  1 10:06:32 2017
@@ -13,9 +13,9 @@ import org.osgi.framework.Bundle;
 import org.osgi.service.cdi.CdiContainer;
 import org.osgi.util.tracker.ServiceTracker;
 
-public class ManifestReferencesAndServicesTestCase extends AbstractTestCase {
+public class OSGiBeanDescriptorTests extends AbstractTestCase {
 
-	public void testServicesFromManifest() throws Exception {
+	public void testServices() throws Exception {
 		Bundle tb2Bundle = installBundle("tb2.jar");
 
 		ServiceTracker<Pojo, Pojo> st = new ServiceTracker<Pojo, Pojo>(
@@ -23,7 +23,7 @@ public class ManifestReferencesAndServic
 		st.open(true);
 
 		try {
-			Pojo pojo = st.waitForService(30000);
+			Pojo pojo = st.waitForService(timeout);
 			assertNotNull(pojo);
 		}
 		finally {
@@ -31,7 +31,8 @@ public class ManifestReferencesAndServic
 		}
 	}
 
-	public void testReferencesFromManifest() throws Exception {
+	@SuppressWarnings("serial")
+	public void testReferences() throws Exception {
 		Bundle tb1Bundle = installBundle("tb1.jar");
 		Bundle tb2Bundle = installBundle("tb2.jar");
 
@@ -42,7 +43,8 @@ public class ManifestReferencesAndServic
 			Set<Bean<?>> beans = beanManager.getBeans("beanimpl");
 			Bean<?> bean = beanManager.resolve(beans);
 			CreationalContext<?> ctx = beanManager.createCreationalContext(bean);
-			BeanService<?> beanService = (BeanService<?>)beanManager.getReference(bean, new TypeLiteral<BeanService<?>>() {}.getType(), ctx);
+			BeanService<?> beanService = (BeanService<?>)beanManager.getReference(
+				bean, new TypeLiteral<BeanService<?>>() {}.getType(), ctx);
 
 			assertNotNull(beanService);
 			assertEquals("POJO-IMPLBEAN-IMPL", beanService.doSomething());

Added: aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/tb3/ConfigurationBeanA.java
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/tb3/ConfigurationBeanA.java?rev=1784896&view=auto
==============================================================================
--- aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/tb3/ConfigurationBeanA.java (added)
+++ aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/tb3/ConfigurationBeanA.java Wed Mar  1 10:06:32 2017
@@ -0,0 +1,41 @@
+package org.apache.aries.cdi.test.tb3;
+
+import java.util.concurrent.Callable;
+
+import javax.inject.Inject;
+
+import org.apache.aries.cdi.test.interfaces.BeanService;
+import org.osgi.service.cdi.annotations.Configuration;
+import org.osgi.service.cdi.annotations.Service;
+
+@Service
+public class ConfigurationBeanA implements BeanService<Callable<int[]>> {
+
+	@Override
+	public String doSomething() {
+		return config.color();
+	}
+
+	@Override
+	public Callable<int[]> get() {
+		return new Callable<int[]>() {
+			@Override
+			public int[] call() throws Exception {
+				return config.ports();
+			}
+		};
+	}
+
+	@Configuration
+	@Inject
+	Config config;
+
+}
+
+@interface Config {
+
+	String color() default "blue";
+
+	int[] ports() default 35777;
+
+}

Modified: aries/trunk/cdi/pom.xml
URL: http://svn.apache.org/viewvc/aries/trunk/cdi/pom.xml?rev=1784896&r1=1784895&r2=1784896&view=diff
==============================================================================
--- aries/trunk/cdi/pom.xml (original)
+++ aries/trunk/cdi/pom.xml Wed Mar  1 10:06:32 2017
@@ -24,12 +24,11 @@
 	</licenses>
 
 	<modules>
-		<module>cdi-log4j-configuration-fragment</module>
 		<module>cdi-api-provider-fragment</module>
 		<module>cdi-extender</module>
 		<module>cdi-extension-jndi</module>
 		<module>cdi-itests</module>
-		<!-- <module>cdi-executable</module> -->
+		<module>cdi-executable</module>
 	</modules>
 
 	<build>
@@ -65,7 +64,7 @@
 						</execution>
 					</executions>
 				</plugin>
-			<plugin>
+				<plugin>
 					<groupId>biz.aQute.bnd</groupId>
 					<artifactId>bnd-indexer-maven-plugin</artifactId>
 					<version>${bnd.version}</version>
@@ -228,6 +227,7 @@
 			<groupId>junit</groupId>
 			<artifactId>junit</artifactId>
 			<version>4.12</version>
+			<scope>test</scope>
 		</dependency>
 	</dependencies>
 



Mime
View raw message