Author: rotty3000
Date: Sat Apr 14 01:10:27 2018
New Revision: 1829115

URL: http://svn.apache.org/viewvc?rev=1829115&view=rev
Log:
[CDI] complete refactor

Signed-off-by: Raymond Augé <rotty3...@apache.org>

Added:
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/CCR.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/ChangeCount.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/bean/ConfigurationBean.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/bean/ReferenceBean.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/command/CDICommand.java
      - copied, changed from r1829114, 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/command/CdiCommand.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/BundleContextExtension.java
      - copied, changed from r1829114, 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/context/BundleContextExtension.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/CDIBundle.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/CheckedCallback.java
      - copied, changed from r1829114, 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/util/Throw.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/ComponentContext.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/ConfigurationListener.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/DiscoveryExtension.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/ExtensionMetadata.java
      - copied, changed from r1829114, 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/extension/ExtensionMetadata.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/ExtensionPhase.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/LoggerExtension.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Mark.java
      - copied, changed from r1829114, 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/literal/CdiMark.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/MarkedInjectionPoint.java
      - copied, changed from r1829114, 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/component/MarkedInjectionPoint.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Op.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/Phase.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/ReferenceServiceObjectsImpl.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/ReferenceSync.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/RuntimeExtension.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/Component.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/ConfigurationModel.java
      - copied, changed from r1829114, 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/configuration/ConfigurationModel.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/ContainerActivator.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/ContainerComponent.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/ExtendedActivationDTO.java
      - copied, changed from r1829114, 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/XmlSchema.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/ExtendedActivationTemplateDTO.java
      - copied, changed from r1829114, 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/Context.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/ExtendedComponentInstanceDTO.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/ExtendedComponentTemplateDTO.java
      - copied, changed from r1829114, 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/XmlSchema.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/ExtendedConfigurationDTO.java
      - copied, changed from r1829114, 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/XmlSchema.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/ExtendedConfigurationTemplateDTO.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/ExtendedExtensionDTO.java
      - copied, changed from r1829114, 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/Context.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/ExtendedExtensionTemplateDTO.java
      - copied, changed from r1829114, 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/phase/Phase.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/ExtendedReferenceDTO.java
      - copied, changed from r1829114, 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/XmlSchema.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/ExtendedReferenceTemplateDTO.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/FactoryActivator.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/FactoryComponent.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/InstanceActivator.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/OSGiBean.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/ReferenceModel.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/SingleActivator.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/SingleComponent.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/util/Filters.java
      - copied, changed from r1829114, 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/util/Throw.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/util/Logs.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/util/Predicates.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/util/SRs.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/util/Syncro.java
      - copied, changed from r1829114, 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/exception/BlacklistQualifierException.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/provider/package-info.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/internal/container/Discovery_Ctor_dynamic_greedy_Test2.java
      - copied, changed from r1829114, 
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/internal/component/Discovery_Ctor_dynamic_greedy_Test2.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/internal/container/Discovery_Ctor_dynamic_reluctant_Test.java
      - copied, changed from r1829114, 
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/internal/component/Discovery_Ctor_dynamic_reluctant_Test.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/internal/container/Discovery_Ctor_static_greedy_Test.java
      - copied, changed from r1829114, 
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/internal/component/Discovery_Ctor_static_greedy_Test.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/internal/container/Discovery_Ctor_static_reluctant_Test.java
      - copied, changed from r1829114, 
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/internal/component/Discovery_Ctor_static_reluctant_Test.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/internal/model/ReferenceModel_PropertiesTest.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/internal/model/ReferenceModel_ReferenceServiceObjectsTest.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/internal/model/ReferenceModel_ServiceReferenceTest.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/internal/model/ReferenceModel_ServiceTest.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/internal/model/ReferenceModel_TupleTest.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/internal/phase/CDIBundlePhaseTest.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/internal/phase/ConfigurationListenerTest.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/internal/phase/ContainerBootstrapTest.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/internal/phase/ContainerReferencesTest.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/internal/phase/ExtensionPhaseTest.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/internal/phase/TemplatesTests.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/internal/util/
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/internal/util/Sfl4jLogger.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/AnnotatedCache.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/BaseCDIBundleTest.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/MockAnnotatedConstructor.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/MockAnnotatedField.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/MockAnnotatedMethod.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/MockAnnotatedParameter.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/MockAnnotatedType.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/MockConfiguration.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/MockServiceRegistration.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/Baz.java
      - copied, changed from r1829114, 
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/FooWithReference.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/FooWithReferenceAndConfig.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/Reference_D_R_M_U_Service.java
      - copied, changed from r1829114, 
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/BarWithConfig.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/Reference_S_R_M_U_Service.java
      - copied, changed from r1829114, 
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/BarWithConfig.java
    
aries/trunk/cdi/cdi-extension-http/src/main/java/org/apache/aries/cdi/extension/http/HttpActivator.java
    
aries/trunk/cdi/cdi-extension-jndi/src/main/java/org/apache/aries/cdi/extension/jndi/JndiActivator.java
    aries/trunk/cdi/cdi-extra/
    aries/trunk/cdi/cdi-extra/LICENSE
    aries/trunk/cdi/cdi-extra/NOTICE
    aries/trunk/cdi/cdi-extra/bnd.bnd
    aries/trunk/cdi/cdi-extra/pom.xml
      - copied, changed from r1829114, 
aries/trunk/cdi/cdi-extension-http/pom.xml
    aries/trunk/cdi/cdi-extra/src/
    aries/trunk/cdi/cdi-extra/src/main/
    aries/trunk/cdi/cdi-extra/src/main/java/
    aries/trunk/cdi/cdi-extra/src/main/java/org/
    aries/trunk/cdi/cdi-extra/src/main/java/org/apache/
    aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/
    aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/
    aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/
    
aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/
    
aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/EventDelivery.java
    
aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/EventFilter.java
    
aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/EventTopics.java
    
aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/ExportedService.java
    
aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardContext.java
    
aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardContextSelect.java
    
aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardFilterAsyncSupported.java
    
aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardFilterDispatcher.java
    
aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardFilterName.java
    
aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardFilterPattern.java
    
aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardFilterRegex.java
    
aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardFilterServlet.java
    
aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardListener.java
    
aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardResource.java
    
aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardServletAsyncSupported.java
    
aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardServletErrorPage.java
    
aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardServletMultipart.java
    
aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardServletName.java
    
aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardServletPattern.java
    
aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/HttpWhiteboardTarget.java
    
aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/JSONRequired.java
    
aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/JaxrsApplicationBase.java
    
aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/JaxrsApplicationSelect.java
    
aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/JaxrsExtension.java
    
aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/JaxrsExtensionSelect.java
    
aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/JaxrsMediaType.java
    
aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/JaxrsName.java
    
aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/JaxrsResource.java
    
aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/JaxrsWhiteboardTarget.java
    
aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/ServiceDescription.java
    
aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/ServiceRanking.java
    
aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/ServiceVendor.java
    
aries/trunk/cdi/cdi-extra/src/main/java/org/apache/aries/cdi/extra/propertytypes/package-info.java
    aries/trunk/cdi/cdi-itests/bnd/tb10.bnd
    aries/trunk/cdi/cdi-itests/bnd/tb7.bnd
    aries/trunk/cdi/cdi-itests/bnd/tb8.bnd
    aries/trunk/cdi/cdi-itests/bnd/tb9.bnd
    aries/trunk/cdi/cdi-itests/local-repo/
    aries/trunk/cdi/cdi-itests/local-repo/org/
    aries/trunk/cdi/cdi-itests/local-repo/org/apache/
    aries/trunk/cdi/cdi-itests/local-repo/org/apache/felix/
    
aries/trunk/cdi/cdi-itests/local-repo/org/apache/felix/org.apache.felix.configadmin/
    
aries/trunk/cdi/cdi-itests/local-repo/org/apache/felix/org.apache.felix.configadmin/1.9.0-SNAPSHOT/
    
aries/trunk/cdi/cdi-itests/local-repo/org/apache/felix/org.apache.felix.configadmin/1.9.0-SNAPSHOT/maven-metadata-local.xml
    
aries/trunk/cdi/cdi-itests/local-repo/org/apache/felix/org.apache.felix.configadmin/1.9.0-SNAPSHOT/org.apache.felix.configadmin-1.9.0-SNAPSHOT-sources.jar
    
aries/trunk/cdi/cdi-itests/local-repo/org/apache/felix/org.apache.felix.configadmin/1.9.0-SNAPSHOT/org.apache.felix.configadmin-1.9.0-SNAPSHOT.bundle
    
aries/trunk/cdi/cdi-itests/local-repo/org/apache/felix/org.apache.felix.configadmin/1.9.0-SNAPSHOT/org.apache.felix.configadmin-1.9.0-SNAPSHOT.jar
    
aries/trunk/cdi/cdi-itests/local-repo/org/apache/felix/org.apache.felix.configadmin/1.9.0-SNAPSHOT/org.apache.felix.configadmin-1.9.0-SNAPSHOT.pom
    
aries/trunk/cdi/cdi-itests/local-repo/org/apache/felix/org.apache.felix.configadmin/maven-metadata-local.xml
    aries/trunk/cdi/cdi-itests/local-repo/org/eclipse/
    aries/trunk/cdi/cdi-itests/local-repo/org/eclipse/platform/
    aries/trunk/cdi/cdi-itests/local-repo/org/eclipse/platform/org.eclipse.osgi/
    
aries/trunk/cdi/cdi-itests/local-repo/org/eclipse/platform/org.eclipse.osgi/3.13.0/
    
aries/trunk/cdi/cdi-itests/local-repo/org/eclipse/platform/org.eclipse.osgi/3.13.0/org.eclipse.osgi-3.13.0.jar
    
aries/trunk/cdi/cdi-itests/local-repo/org/eclipse/platform/org.eclipse.osgi/3.13.0/org.eclipse.osgi-3.13.0.pom
    
aries/trunk/cdi/cdi-itests/local-repo/org/eclipse/platform/org.eclipse.osgi/maven-metadata-local.xml
    
aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/beans/IntegerServiceProvider.java
    
aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/cases/DisableComponentTests.java
    
aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/cases/FactoryComponentTests.java
    aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/tb10/
    
aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/tb10/SingleReferenceEventHandler.java
    aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/tb7/
    
aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/tb7/Config.java
      - copied, changed from r1829114, 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/reference/Multiplicity.java
    
aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/tb7/ConfigurationBeanF.java
      - copied, changed from r1829114, 
aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/tb5/ConfigurationBeanC.java
    aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/tb8/
    
aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/tb8/ContainerBean.java
      - copied, changed from r1829114, 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/literal/CdiMarkLiteral.java
    
aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/tb8/SingleComponentBean.java
      - copied, changed from r1829114, 
aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/tb2/PojoImpl.java
    aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/tb9/
    
aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/tb9/ContainerReferenceEventHandler.java
Removed:
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/CdiBundle.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/command/CdiCommand.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/component/ComponentProperties.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/component/ComponentRuntimeExtension.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/component/DiscoveryExtension.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/component/MarkedInjectionPoint.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/component/OSGiBean.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/configuration/ConfigurationBean.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/configuration/ConfigurationCallback.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/configuration/ConfigurationManagedService.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/configuration/ConfigurationModel.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/context/BundleContextBean.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/context/BundleContextExtension.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/exception/BeanElementException.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/exception/BlacklistQualifierException.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/extension/ExtensionDependency.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/extension/ExtensionMetadata.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/literal/CdiMark.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/literal/CdiMarkLiteral.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/loader/AbstractLoader.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/AbstractModelBuilder.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/Constants.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/Context.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/Model.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/OSGiBeansHandler.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/ObserverMethodAnnotated.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/Registrator.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/Tracker.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/XmlSchema.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/phase/Init.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/phase/Phase.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/phase/Phase_Configuration.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/phase/Phase_Extension.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/phase/Phase_Publish.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/phase/Phase_Reference.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/reference/Multiplicity.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/reference/ReferenceBean.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/reference/ReferenceCallback.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/reference/ReferenceModel.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/service/ServiceDeclaration.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/util/PropertyType.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/v2/component/Component.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/v2/component/ContainerComponent.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/v2/component/FactoryComponent.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/v2/component/SingleComponent.java
    aries/trunk/cdi/cdi-extender/src/main/resources/META-INF/cdi.xsd
    
aries/trunk/cdi/cdi-extender/src/main/resources/org/apache/aries/cdi/provider/packageinfo
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/internal/component/Discovery_Ctor_dynamic_greedy_Test2.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/internal/component/Discovery_Ctor_dynamic_reluctant_Test.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/internal/component/Discovery_Ctor_static_greedy_Test.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/internal/component/Discovery_Ctor_static_reluctant_Test.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/internal/component/IfBeanClassIsOSGiAnnotatedTest.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/internal/configuration/ConfigurationCallbackTest_Ignore.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/internal/configuration/ConfigurationCallbackTest_Optional.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/internal/configuration/ConfigurationCallbackTest_Require.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/internal/configuration/ConfigurationManagedServiceTest_Ignore.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/internal/configuration/ConfigurationManagedServiceTest_Optional.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/internal/configuration/ConfigurationManagedServiceTest_Require.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/internal/container/ContainerDiscoveryTest.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/internal/model/ModelTest.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/internal/phase/ConfigurationPhaseTest.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/internal/reference/ReferenceModel_PropertiesTest.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/internal/reference/ReferenceModel_ReferenceServiceObjectsTest.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/internal/reference/ReferenceModel_ServiceReferenceTest.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/internal/reference/ReferenceModel_ServiceTest.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/internal/reference/ReferenceModel_TupleTest.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/FooWithReference.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/ReferenceEventImpl.java
    
aries/trunk/cdi/cdi-extender/src/test/resources/OSGI-INF/cdi/org.apache.aries.cdi.container.test.beans.Bar.xml
    
aries/trunk/cdi/cdi-extender/src/test/resources/OSGI-INF/cdi/org.apache.aries.cdi.container.test.beans.BarAnnotated.xml
    
aries/trunk/cdi/cdi-extender/src/test/resources/OSGI-INF/cdi/org.apache.aries.cdi.container.test.beans.BarBadlyAnnotated.xml
    
aries/trunk/cdi/cdi-extender/src/test/resources/OSGI-INF/cdi/org.apache.aries.cdi.container.test.beans.FooAnnotated.xml
    
aries/trunk/cdi/cdi-extender/src/test/resources/OSGI-INF/cdi/org.apache.aries.cdi.container.test.beans.FooService.xml
    aries/trunk/cdi/cdi-itests/bnd/basic-beans.xml
    aries/trunk/cdi/cdi-itests/bnd/tb1-beans.xml
    aries/trunk/cdi/cdi-itests/bnd/tb2-beans.xml
    aries/trunk/cdi/cdi-itests/bnd/tb3-beans.xml
    aries/trunk/cdi/cdi-itests/bnd/tb4-beans.xml
    aries/trunk/cdi/cdi-itests/bnd/tb5-beans.xml
    aries/trunk/cdi/cdi-itests/bnd/tb6-beans.xml
Modified:
    aries/trunk/cdi/cdi-extender/bnd.bnd
    aries/trunk/cdi/cdi-extender/pom.xml
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/Activator.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/ContainerBootstrap.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/ContainerDeploymentArchive.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/ContainerDiscovery.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/ContainerState.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/loader/BundleResourcesLoader.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/BeansModel.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/BeansModelBuilder.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/CollectionType.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/model/ReferenceEventImpl.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/util/Maps.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/util/Throw.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/util/Types.java
    
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/provider/CDIProvider.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/internal/model/MapsTest.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/MockCdiContainerAndComponents.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/MockInjectionPoint.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/MockServiceReference.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/TestUtil.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/BarAnnotated.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/BarProducer.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/BarService.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/BarWithConfig.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/Foo.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/FooAnnotated.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/FooService.java
    
aries/trunk/cdi/cdi-extender/src/test/java/org/apache/aries/cdi/container/test/beans/ObserverFoo.java
    aries/trunk/cdi/cdi-extender/src/test/resources/logback.xml
    aries/trunk/cdi/cdi-extension-http/bnd.bnd
    aries/trunk/cdi/cdi-extension-http/pom.xml
    
aries/trunk/cdi/cdi-extension-http/src/main/java/org/apache/aries/cdi/extension/http/HttpExtension.java
    
aries/trunk/cdi/cdi-extension-http/src/main/java/org/apache/aries/cdi/extension/http/HttpExtensionFactory.java
    aries/trunk/cdi/cdi-extension-jndi/bnd.bnd
    aries/trunk/cdi/cdi-extension-jndi/pom.xml
    
aries/trunk/cdi/cdi-extension-jndi/src/main/java/org/apache/aries/cdi/extension/jndi/JndiContext.java
    
aries/trunk/cdi/cdi-extension-jndi/src/main/java/org/apache/aries/cdi/extension/jndi/JndiExtension.java
    
aries/trunk/cdi/cdi-extension-jndi/src/main/java/org/apache/aries/cdi/extension/jndi/JndiExtensionFactory.java
    aries/trunk/cdi/cdi-itests/bnd.bnd
    aries/trunk/cdi/cdi-itests/bnd/basic-beans.bnd
    aries/trunk/cdi/cdi-itests/bnd/services-one.bnd
    aries/trunk/cdi/cdi-itests/bnd/tb1.bnd
    aries/trunk/cdi/cdi-itests/bnd/tb2.bnd
    aries/trunk/cdi/cdi-itests/bnd/tb3.bnd
    aries/trunk/cdi/cdi-itests/bnd/tb4.bnd
    aries/trunk/cdi/cdi-itests/bnd/tb5.bnd
    aries/trunk/cdi/cdi-itests/bnd/tb6.bnd
    aries/trunk/cdi/cdi-itests/cdi-executable.bndrun
    aries/trunk/cdi/cdi-itests/itest.bndrun
    aries/trunk/cdi/cdi-itests/logback.xml
    aries/trunk/cdi/cdi-itests/pom.xml
    
aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/beans/BeanWithReference.java
    
aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/beans/ConstructorInjectedService.java
    
aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/beans/FieldInjectedBundleScopedImpl.java
    
aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/beans/FieldInjectedPrototypeScopedImpl.java
    
aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/beans/FieldInjectedService.java
    
aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/beans/Instance_Optional.java
    
aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/beans/Instance_ServiceProperties.java
    
aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/beans/Instance_ServiceReference.java
    
aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/beans/MethodInjectedService.java
    
aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/beans/ServiceWithProperties.java
    
aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/cases/AbstractTestCase.java
    
aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/cases/CdiBeanTests.java
    
aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/cases/CdiContainerTests.java
    
aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/cases/CdiExtenderTests.java
    
aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/cases/ConfigurationTests.java
    
aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/cases/EventsTests.java
    
aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/cases/HttpTestCase.java
    
aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/cases/JndiExtensionTests.java
    
aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/cases/OSGiBeanDescriptorTests.java
    
aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/tb1/BeanImpl.java
    
aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/tb2/PojoImpl.java
    
aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/tb3/ConfigurationBeanA.java
    
aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/tb3/ConfigurationBeanB.java
    
aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/tb5/ConfigurationBeanC.java
    
aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/tb6/BarServlet.java
    
aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/tb6/FooServlet.java
    
aries/trunk/cdi/cdi-itests/src/main/java/org/apache/aries/cdi/test/tb6/RequestData.java
    aries/trunk/cdi/javax.annotation-api/bnd.bnd
    aries/trunk/cdi/javax.cdi-api/bnd.bnd
    aries/trunk/cdi/javax.el-api/bnd.bnd
    aries/trunk/cdi/javax.inject-api/bnd.bnd
    aries/trunk/cdi/javax.interceptor-api/bnd.bnd
    aries/trunk/cdi/pom.xml

Modified: aries/trunk/cdi/cdi-extender/bnd.bnd
URL: 
http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/bnd.bnd?rev=1829115&r1=1829114&r2=1829115&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extender/bnd.bnd (original)
+++ aries/trunk/cdi/cdi-extender/bnd.bnd Sat Apr 14 01:10:27 2018
@@ -1,20 +1,6 @@
-Bundle-Activator: org.apache.aries.cdi.container.internal.Activator
 Conditional-Package: \
-       org.apache.felix.converter.dto,\
-       org.apache.felix.converter.impl,\
        org.apache.felix.utils.extender,\
-       org.osgi.util.converter,\
-       org.osgi.util.function
-Export-Package: \
-       org.apache.aries.cdi.provider
-Provide-Capability: \
-       osgi.extender; \
-               osgi.extender='osgi.cdi'; \
-               
uses:="org.osgi.service.cdi,org.osgi.service.cdi.annotations,javax.enterprise.inject.spi";
 \
-               version:Version="${Bundle-Version}",\
-       osgi.implementation; \
-               osgi.implementation='osgi.cdi'; \
-               
uses:="org.osgi.service.cdi,org.osgi.service.cdi.annotations,javax.enterprise.inject.spi";
 \
-               version:Version="${Bundle-Version}"
+       org.osgi.util.converter
+
 -contract: JavaAnnotation, JavaCDI, JavaEL, JavaInject, JavaInterceptor
 -includeresource: META-INF/=LICENSE, META-INF/=NOTICE
\ No newline at end of file

Modified: aries/trunk/cdi/cdi-extender/pom.xml
URL: 
http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/pom.xml?rev=1829115&r1=1829114&r2=1829115&view=diff
==============================================================================
--- aries/trunk/cdi/cdi-extender/pom.xml (original)
+++ aries/trunk/cdi/cdi-extender/pom.xml Sat Apr 14 01:10:27 2018
@@ -39,17 +39,16 @@
                                <groupId>biz.aQute.bnd</groupId>
                                <artifactId>bnd-maven-plugin</artifactId>
                        </plugin>
-                       <!--
-                       <plugin>
-                               <groupId>biz.aQute.bnd</groupId>
-                               
<artifactId>bnd-baseline-maven-plugin</artifactId>
-                       </plugin>
-                       -->
                </plugins>
        </build>
 
        <dependencies>
                <dependency>
+                       <groupId>javax.ejb</groupId>
+                       <artifactId>javax.ejb-api</artifactId>
+                       <version>3.2</version>
+               </dependency>
+               <dependency>
                        <groupId>org.apache.aries.spec</groupId>
                        
<artifactId>org.apache.aries.javax.annotation-api</artifactId>
                        <version>${project.version}</version>
@@ -61,12 +60,6 @@
                </dependency>
                <dependency>
                        <groupId>org.apache.felix</groupId>
-                       <artifactId>org.apache.felix.converter</artifactId>
-                       <version>0.1.0-SNAPSHOT</version>
-                       <scope>provided</scope>
-               </dependency>
-               <dependency>
-                       <groupId>org.apache.felix</groupId>
                        <artifactId>org.apache.felix.utils</artifactId>
                        <version>1.8.6</version>
                        <scope>provided</scope>
@@ -114,33 +107,71 @@
                                        
<groupId>org.jboss.spec.javax.interceptor</groupId>
                                        
<artifactId>jboss-interceptors-api_1.2_spec</artifactId>
                                </exclusion>
+                               <exclusion>
+                                       
<groupId>org.jboss.spec.javax.transaction</groupId>
+                                       
<artifactId>jboss-transaction-api_1.2_spec</artifactId>
+                               </exclusion>
                        </exclusions>
                </dependency>
                <dependency>
                        <groupId>org.osgi</groupId>
+                       <artifactId>org.osgi.annotation.bundle</artifactId>
+                       <version>1.0.0-SNAPSHOT</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.osgi</groupId>
+                       <artifactId>org.osgi.annotation.versioning</artifactId>
+                       <version>1.1.0-SNAPSHOT</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.osgi</groupId>
                        <artifactId>org.osgi.namespace.extender</artifactId>
                        <version>1.0.1</version>
                        <scope>provided</scope>
                </dependency>
                <dependency>
                        <groupId>org.osgi</groupId>
+                       
<artifactId>org.osgi.namespace.implementation</artifactId>
+                       <version>1.0.0</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.osgi</groupId>
                        <artifactId>org.osgi.service.cdi</artifactId>
                        <version>1.0.0-SNAPSHOT</version>
                </dependency>
                <dependency>
                        <groupId>org.osgi</groupId>
                        <artifactId>org.osgi.service.cm</artifactId>
-                       <version>1.5.0</version>
+                       <version>1.6.0-SNAPSHOT</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.osgi</groupId>
+                       <artifactId>org.osgi.service.log</artifactId>
+                       <version>1.4.0-SNAPSHOT</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.osgi</groupId>
+                       <artifactId>org.osgi.util.converter</artifactId>
+                       <version>1.0.0-SNAPSHOT</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.osgi</groupId>
+                       <artifactId>org.osgi.util.function</artifactId>
+                       <version>1.1.0-SNAPSHOT</version>
                </dependency>
                <dependency>
                        <groupId>org.osgi</groupId>
                        <artifactId>org.osgi.util.promise</artifactId>
-                       <version>1.0.0</version>
+                       <version>1.1.0-SNAPSHOT</version>
                </dependency>
                <dependency>
                        <groupId>org.osgi</groupId>
                        <artifactId>osgi.core</artifactId>
-                       <version>6.0.0</version>
+                       <version>7.0.0-SNAPSHOT</version>
                        <scope>provided</scope>
                </dependency>
                <dependency>
@@ -153,6 +184,7 @@
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-api</artifactId>
                        <version>1.7.0</version>
+                       <optional>true</optional>
                </dependency>
                <dependency>
                        <groupId>ch.qos.logback</groupId>
@@ -165,6 +197,18 @@
                        <artifactId>junit</artifactId>
                        <scope>test</scope>
                </dependency>
+               <dependency>
+                       <groupId>org.mockito</groupId>
+                       <artifactId>mockito-core</artifactId>
+                       <version>2.13.0</version>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.aries.cdi</groupId>
+                       <artifactId>org.apache.aries.cdi.extra</artifactId>
+                       <version>0.0.1-SNAPSHOT</version>
+                       <scope>test</scope>
+               </dependency>
        </dependencies>
 
 </project>

Modified: 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/Activator.java
URL: 
http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/Activator.java?rev=1829115&r1=1829114&r2=1829115&view=diff
==============================================================================
--- 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/Activator.java
 (original)
+++ 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/Activator.java
 Sat Apr 14 01:10:27 2018
@@ -14,28 +14,59 @@
 
 package org.apache.aries.cdi.container.internal;
 
-import static org.osgi.namespace.extender.ExtenderNamespace.EXTENDER_NAMESPACE;
-import static org.osgi.service.cdi.CdiConstants.CDI_CAPABILITY_NAME;
+import static org.osgi.namespace.extender.ExtenderNamespace.*;
+import static org.osgi.service.cdi.CDIConstants.*;
 
 import java.util.Dictionary;
 import java.util.Hashtable;
 import java.util.List;
 import java.util.Map;
+import java.util.Observable;
+import java.util.Observer;
+import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.concurrent.Executors;
 
 import javax.enterprise.inject.spi.CDI;
 
-import org.apache.aries.cdi.container.internal.command.CdiCommand;
+import org.apache.aries.cdi.container.internal.command.CDICommand;
+import org.apache.aries.cdi.container.internal.container.CDIBundle;
+import org.apache.aries.cdi.container.internal.container.ConfigurationListener;
+import org.apache.aries.cdi.container.internal.container.ContainerBootstrap;
+import org.apache.aries.cdi.container.internal.container.ContainerState;
+import org.apache.aries.cdi.container.internal.container.ExtensionPhase;
+import org.apache.aries.cdi.container.internal.model.ContainerActivator;
+import org.apache.aries.cdi.container.internal.model.ContainerComponent;
+import org.apache.aries.cdi.container.internal.model.FactoryActivator;
+import org.apache.aries.cdi.container.internal.model.FactoryComponent;
+import org.apache.aries.cdi.container.internal.model.SingleActivator;
+import org.apache.aries.cdi.container.internal.model.SingleComponent;
+import org.apache.aries.cdi.container.internal.util.Logs;
 import org.apache.aries.cdi.provider.CDIProvider;
 import org.apache.felix.utils.extender.AbstractExtender;
 import org.apache.felix.utils.extender.Extension;
+import org.osgi.annotation.bundle.Header;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
+import org.osgi.framework.Constants;
+import org.osgi.framework.FrameworkUtil;
+import org.osgi.framework.ServiceFactory;
 import org.osgi.framework.ServiceRegistration;
+import org.osgi.framework.wiring.BundleRequirement;
 import org.osgi.framework.wiring.BundleWire;
 import org.osgi.framework.wiring.BundleWiring;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
+import org.osgi.service.cdi.runtime.CDIComponentRuntime;
+import org.osgi.service.cm.ConfigurationAdmin;
+import org.osgi.service.cm.annotations.RequireConfigurationAdmin;
+import org.osgi.service.log.Logger;
+import org.osgi.service.log.LoggerFactory;
+import org.osgi.util.promise.PromiseFactory;
+import org.osgi.util.tracker.ServiceTracker;
+
+@Header(
+       name = Constants.BUNDLE_ACTIVATOR,
+       value = "${@class}"
+)
+@RequireConfigurationAdmin
 public class Activator extends AbstractExtender {
 
        static {
@@ -44,58 +75,114 @@ public class Activator extends AbstractE
 
        public Activator() {
                setSynchronous(true);
+
+               _logs = new 
Logs.Builder(FrameworkUtil.getBundle(getClass()).getBundleContext()).build();
+               _log = _logs.getLogger(getClass());
+               _ccr = new CCR(_promiseFactory, _logs);
+               _command = new CDICommand(_ccr);
        }
 
        @Override
        public void start(BundleContext bundleContext) throws Exception {
                if (_log.isDebugEnabled()) {
-                       _log.debug("CDIe - starting {}", 
bundleContext.getBundle());
+                       _log.debug("CCR starting {}", 
bundleContext.getBundle());
                }
 
                _bundleContext = bundleContext;
 
-               registerCdiCommand();
+               registerCCR();
+               registerCDICommand();
 
                super.start(bundleContext);
 
                if (_log.isDebugEnabled()) {
-                       _log.debug("CDIe - started {}", 
bundleContext.getBundle());
+                       _log.debug("CCR started {}", bundleContext.getBundle());
                }
        }
 
-       private void registerCdiCommand() {
+       private void registerCCR() {
+               Dictionary<String, Object> properties = new Hashtable<>();
+               properties.put(Constants.SERVICE_CHANGECOUNT, 
_ccrChangeCount.get());
+               properties.put(Constants.SERVICE_DESCRIPTION, "CDI Component 
Runtime");
+               properties.put(Constants.SERVICE_VENDOR, "Apache Aries");
+
+               ChangeObserverFactory changeObserverFactory = new 
ChangeObserverFactory();
+
+               _ccrChangeCount.addObserver(changeObserverFactory);
+
+               _ccrRegistration = _bundleContext.registerService(
+                       CDIComponentRuntime.class, changeObserverFactory, 
properties);
+       }
+
+       private void registerCDICommand() {
                Dictionary<String, Object> properties = new Hashtable<>();
                properties.put("osgi.command.scope", "cdi");
                properties.put("osgi.command.function", new String[] {"list", 
"info"});
 
-               _command = new CdiCommand();
                _commandRegistration = 
_bundleContext.registerService(Object.class, _command, properties);
        }
 
        @Override
        public void stop(BundleContext bundleContext) throws Exception {
                if (_log.isDebugEnabled()) {
-                       _log.debug("CDIe - stoping {}", 
bundleContext.getBundle());
+                       _log.debug("CCR stoping {}", bundleContext.getBundle());
                }
 
                super.stop(bundleContext);
 
-               if (_log.isDebugEnabled()) {
-                       _log.debug("CDIe - stoped {}", 
bundleContext.getBundle());
-               }
+               _commandRegistration.unregister();
+               _ccrRegistration.unregister();
 
-               if (_commandRegistration != null) {
-                       _commandRegistration.unregister();
+               if (_log.isDebugEnabled()) {
+                       _log.debug("CCR stoped {}", bundleContext.getBundle());
                }
        }
 
        @Override
        protected Extension doCreateExtension(Bundle bundle) throws Exception {
-               if (!requiresCdiExtender(bundle)) {
+               if (!requiresCDIExtender(bundle)) {
                        return null;
                }
 
-               return new CdiBundle(_bundleContext.getBundle(), bundle, 
_command);
+               ServiceTracker<ConfigurationAdmin, ConfigurationAdmin> 
caTracker = new ServiceTracker<>(
+                       bundle.getBundleContext(), ConfigurationAdmin.class, 
null);
+
+               caTracker.open();
+
+               ServiceTracker<LoggerFactory, LoggerFactory> loggerTracker = 
new ServiceTracker<>(
+                       bundle.getBundleContext(), LoggerFactory.class, null);
+
+               loggerTracker.open();
+
+               ContainerState containerState = new ContainerState(
+                       bundle, _bundleContext.getBundle(), _ccrChangeCount, 
_promiseFactory, caTracker, _logs);
+
+               // the CDI bundle
+               return new CDIBundle(_ccr, containerState,
+                       // handle extensions
+                       new ExtensionPhase(containerState,
+                               // listen for configurations of the container 
component
+                               new 
ConfigurationListener.Builder(containerState).component(
+                                       // the container component
+                                       new 
ContainerComponent.Builder(containerState,
+                                               // when dependencies are 
satisfied activate the container
+                                               new 
ContainerActivator.Builder(containerState,
+                                                       // when the active 
container bootstraps CDI
+                                                       new ContainerBootstrap(
+                                                               containerState,
+                                                               // when CDI is 
bootstrapping is complete and is up and running
+                                                               // activate the 
configuration listeners for single and factory components
+                                                               new 
ConfigurationListener.Builder(containerState),
+                                                               new 
SingleComponent.Builder(containerState,
+                                                                       new 
SingleActivator.Builder(containerState)),
+                                                               new 
FactoryComponent.Builder(containerState,
+                                                                       new 
FactoryActivator.Builder(containerState))
+                                                       )
+                                               )
+                                       ).build()
+                               ).build()
+                       )
+               );
        }
 
        @Override
@@ -104,9 +191,6 @@ public class Activator extends AbstractE
 
        @Override
        protected void warn(Bundle bundle, String msg, Throwable t) {
-               if (_log.isWarnEnabled()) {
-                       _log.warn(msg, t);
-               }
        }
 
        @Override
@@ -116,7 +200,7 @@ public class Activator extends AbstractE
                }
        }
 
-       private boolean requiresCdiExtender(Bundle bundle) {
+       private boolean requiresCDIExtender(Bundle bundle) {
                BundleWiring bundleWiring = bundle.adapt(BundleWiring.class);
                List<BundleWire> requiredBundleWires = 
bundleWiring.getRequiredWires(EXTENDER_NAMESPACE);
 
@@ -129,7 +213,15 @@ public class Activator extends AbstractE
                                Bundle providerWiringBundle = 
bundleWire.getProviderWiring().getBundle();
 
                                if 
(providerWiringBundle.equals(_bundleContext.getBundle())) {
-                                       return true;
+                                       BundleRequirement requirement = 
bundleWire.getRequirement();
+                                       Map<String, Object> 
requirementAttributes = requirement.getAttributes();
+
+                                       @SuppressWarnings("unchecked")
+                                       List<String> beans = 
(List<String>)requirementAttributes.get(REQUIREMENT_OSGI_BEANS_ATTRIBUTE);
+
+                                       if (beans != null && !beans.isEmpty()) {
+                                               return true;
+                                       }
                                }
                        }
                }
@@ -137,10 +229,54 @@ public class Activator extends AbstractE
                return false;
        }
 
-       private static final Logger _log = 
LoggerFactory.getLogger(Activator.class);
 
        private BundleContext _bundleContext;
-       private CdiCommand _command;
+       private final CCR _ccr;
+       private final ChangeCount _ccrChangeCount = new ChangeCount();
+       private ServiceRegistration<CDIComponentRuntime> _ccrRegistration;
+       private final CDICommand _command;
        private ServiceRegistration<?> _commandRegistration;
+       private final Logs _logs;
+       private final Logger _log;
+       private final PromiseFactory _promiseFactory = new 
PromiseFactory(Executors.newFixedThreadPool(1));
+
+       private class ChangeObserverFactory implements Observer, 
ServiceFactory<CDIComponentRuntime> {
+
+               @Override
+               public CDIComponentRuntime getService(
+                       Bundle bundle,
+                       ServiceRegistration<CDIComponentRuntime> registration) {
+
+                       _registrations.add(registration);
+
+                       return _ccr;
+               }
+
+               @Override
+               public void ungetService(
+                       Bundle bundle, ServiceRegistration<CDIComponentRuntime> 
registration,
+                       CDIComponentRuntime service) {
+
+                       _registrations.remove(registration);
+               }
+
+               @Override
+               public void update(Observable o, Object arg) {
+                       if (!(o instanceof ChangeCount)) {
+                               return;
+                       }
+
+                       ChangeCount changeCount = (ChangeCount)o;
+
+                       for (ServiceRegistration<CDIComponentRuntime> 
registration : _registrations) {
+                               Dictionary<String, Object> properties = 
registration.getReference().getProperties();
+                               properties.put(Constants.SERVICE_CHANGECOUNT, 
changeCount.get());
+                               registration.setProperties(properties);
+                       }
+               }
+
+               private final List<ServiceRegistration<CDIComponentRuntime>> 
_registrations = new CopyOnWriteArrayList<>();
+
+       }
 
 }
\ No newline at end of file

Added: 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/CCR.java
URL: 
http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/CCR.java?rev=1829115&view=auto
==============================================================================
--- 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/CCR.java
 (added)
+++ 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/CCR.java
 Sat Apr 14 01:10:27 2018
@@ -0,0 +1,110 @@
+/**
+ * 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.internal;
+
+import java.util.Collection;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import org.apache.aries.cdi.container.internal.container.ContainerState;
+import org.apache.aries.cdi.container.internal.util.Conversions;
+import org.apache.aries.cdi.container.internal.util.Logs;
+import org.apache.aries.cdi.container.internal.util.Throw;
+import org.osgi.framework.Bundle;
+import org.osgi.service.cdi.runtime.CDIComponentRuntime;
+import org.osgi.service.cdi.runtime.dto.ContainerDTO;
+import org.osgi.service.cdi.runtime.dto.template.ContainerTemplateDTO;
+import org.osgi.util.promise.PromiseFactory;
+
+public class CCR implements CDIComponentRuntime {
+
+       public CCR(PromiseFactory promiseFactory, Logs logs) {
+               _promiseFactory = promiseFactory;
+       }
+
+       public void add(Bundle bundle, ContainerState containerState) {
+               _states.put(bundle, containerState);
+       }
+
+       @Override
+       public Collection<ContainerDTO> getContainerDTOs(Bundle... bundles) {
+               if ((bundles != null) && (bundles.length > 0)) {
+                       return call(
+                               () -> Stream.of(bundles).filter(
+                                       b -> Objects.nonNull(_states.get(b))
+                               ).map(
+                                       b -> _states.get(b)
+                               ).map(
+                                       cs -> 
Conversions.convert(cs.containerDTO()).to(ContainerDTO.class)
+                               ).collect(Collectors.toList())
+                       );
+               }
+
+               return call(
+                       () -> _states.values().stream().map(
+                               cs -> 
Conversions.convert(cs.containerDTO()).to(ContainerDTO.class)
+                       ).collect(Collectors.toList())
+               );
+       }
+
+       @Override
+       public ContainerDTO getContainerDTO(Bundle bundle) {
+               return call(
+                       () -> Optional.ofNullable(_states.get(bundle)).map(
+                               cs -> 
Conversions.convert(cs.containerDTO()).to(ContainerDTO.class)
+                       ).orElse(null)
+               );
+       }
+
+       @Override
+       public long getContainerChangeCount(Bundle bundle) {
+               return call(
+                       () -> Optional.ofNullable(_states.get(bundle)).map(
+                               cs -> cs.containerDTO().changeCount
+                       ).orElse(-1l)
+               );
+       }
+
+       @Override
+       public ContainerTemplateDTO getContainerTemplateDTO(Bundle bundle) {
+               return call(
+                       () -> Optional.ofNullable(_states.get(bundle)).map(
+                               cs -> 
Conversions.convert(cs.containerDTO().template).to(ContainerTemplateDTO.class)
+                       ).orElse(null)
+               );
+       }
+
+       public void remove(Bundle bundle) {
+               _states.remove(bundle);
+       }
+
+       public <R> R call(Callable<R> callable) {
+               try {
+                       return _promiseFactory.submit(callable).getValue();
+               }
+               catch (Exception e) {
+                       return Throw.exception(e);
+               }
+       }
+
+       private final PromiseFactory _promiseFactory;
+       private final Map<Bundle, ContainerState> _states = new 
ConcurrentHashMap<>();
+
+}
\ No newline at end of file

Added: 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/ChangeCount.java
URL: 
http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/ChangeCount.java?rev=1829115&view=auto
==============================================================================
--- 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/ChangeCount.java
 (added)
+++ 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/ChangeCount.java
 Sat Apr 14 01:10:27 2018
@@ -0,0 +1,90 @@
+/**
+ * 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.internal;
+
+import java.util.Observable;
+import java.util.Observer;
+import java.util.concurrent.atomic.AtomicLong;
+
+import org.apache.aries.cdi.container.internal.util.Syncro;
+
+public class ChangeCount extends Observable implements Observer {
+
+       @Override
+       public int hashCode() {
+               try (Syncro syncro = _syncro.open()) {
+                       return _changeCount.hashCode();
+               }
+       }
+
+       public final long get() {
+               try (Syncro syncro = _syncro.open()) {
+                       return _changeCount.get();
+               }
+       }
+
+       @Override
+       public boolean equals(Object obj) {
+               try (Syncro syncro = _syncro.open()) {
+                       return _changeCount.equals(obj);
+               }
+       }
+
+       public final long getAndIncrement() {
+               try (Syncro syncro = _syncro.open()) {
+                       return _changeCount.getAndIncrement();
+               }
+               finally {
+                       setChanged();
+                       notifyObservers();
+               }
+       }
+
+       public final long incrementAndGet() {
+               try (Syncro syncro = _syncro.open()) {
+                       return _changeCount.incrementAndGet();
+               }
+               finally {
+                       setChanged();
+                       notifyObservers();
+               }
+       }
+
+       @Override
+       public String toString() {
+               try (Syncro syncro = _syncro.open()) {
+                       return _changeCount.toString();
+               }
+       }
+
+       public long longValue() {
+               try (Syncro syncro = _syncro.open()) {
+                       return _changeCount.longValue();
+               }
+       }
+
+       @Override
+       public void update(Observable o, Object arg) {
+               if (!(o instanceof ChangeCount)) {
+                       return;
+               }
+
+               incrementAndGet();
+       }
+
+       private final AtomicLong _changeCount = new AtomicLong(1);
+       private final Syncro _syncro = new Syncro(true);
+
+}
\ No newline at end of file

Added: 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/bean/ConfigurationBean.java
URL: 
http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/bean/ConfigurationBean.java?rev=1829115&view=auto
==============================================================================
--- 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/bean/ConfigurationBean.java
 (added)
+++ 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/bean/ConfigurationBean.java
 Sat Apr 14 01:10:27 2018
@@ -0,0 +1,138 @@
+/**
+ * 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.internal.bean;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+import java.util.Collections;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.Default;
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.InjectionPoint;
+
+import org.apache.aries.cdi.container.internal.container.Mark;
+import 
org.apache.aries.cdi.container.internal.model.ExtendedConfigurationTemplateDTO;
+import org.apache.aries.cdi.container.internal.util.Conversions;
+import org.apache.aries.cdi.container.internal.util.Sets;
+import org.osgi.service.cdi.ComponentType;
+import org.osgi.service.cdi.annotations.ComponentScoped;
+import org.osgi.service.cdi.annotations.Configuration;
+import org.osgi.service.cdi.annotations.PID;
+import org.osgi.service.cdi.runtime.dto.template.ComponentTemplateDTO;
+
+public class ConfigurationBean implements Bean<Object> {
+
+       public ConfigurationBean(
+               ComponentTemplateDTO component,
+               ExtendedConfigurationTemplateDTO template) {
+
+               _component = component;
+               _template = template;
+
+               _qualifiers = Sets.hashSet(Configuration.Literal.INSTANCE, 
Default.Literal.INSTANCE);
+               _types = Sets.hashSet(_template.injectionPointType, 
Object.class);
+
+               if (_template.pid != null) {
+                       _qualifiers.add(PID.Literal.of(_template.pid, 
_template.policy));
+               }
+       }
+
+       @Override
+       public Object create(CreationalContext<Object> creationalContext) {
+               Objects.requireNonNull(_properties);
+               return 
Conversions.convert(_properties).to(_template.injectionPointType);
+       }
+
+       @Override
+       public void destroy(Object instance, CreationalContext<Object> 
creationalContext) {
+       }
+
+       @Override
+       public Set<Type> getTypes() {
+               return _types;
+       }
+
+       @Override
+       public Set<Annotation> getQualifiers() {
+               return _qualifiers;
+       }
+
+       @Override
+       public Class<? extends Annotation> getScope() {
+               if (_component.type == ComponentType.CONTAINER) {
+                       return ApplicationScoped.class;
+               }
+               return ComponentScoped.class;
+       }
+
+       @Override
+       public String getName() {
+               return null;
+       }
+
+       @Override
+       public Set<Class<? extends Annotation>> getStereotypes() {
+               return Collections.emptySet();
+       }
+
+       @Override
+       public boolean isAlternative() {
+               return false;
+       }
+
+       @Override
+       public Class<?> getBeanClass() {
+               return _template.beanClass;
+       }
+
+       @Override
+       public Set<InjectionPoint> getInjectionPoints() {
+               return Collections.emptySet();
+       }
+
+       @Override
+       public boolean isNullable() {
+               return false;
+       }
+
+       public void setMark(Mark mark) {
+               _qualifiers.add(mark);
+       }
+
+       public void setProperties(Map<String, Object> properties) {
+               _properties = properties;
+       }
+
+       @Override
+       public String toString() {
+               if (_string == null) {
+                       _string = "ConfigurationBean[" + ((_template.pid == 
null)?_component.name:_template.pid) + "]";
+               }
+               return _string;
+       }
+
+       private final ComponentTemplateDTO _component;
+       private final Set<Annotation> _qualifiers;
+       private final ExtendedConfigurationTemplateDTO _template;
+       private final Set<Type> _types;
+       private volatile Map<String, Object> _properties;
+       private volatile String _string;
+
+}

Added: 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/bean/ReferenceBean.java
URL: 
http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/bean/ReferenceBean.java?rev=1829115&view=auto
==============================================================================
--- 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/bean/ReferenceBean.java
 (added)
+++ 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/bean/ReferenceBean.java
 Sat Apr 14 01:10:27 2018
@@ -0,0 +1,275 @@
+/**
+ * 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.internal.bean;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.Set;
+import java.util.SortedMap;
+import java.util.stream.Collectors;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.Default;
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.enterprise.inject.spi.InjectionPoint;
+import javax.inject.Provider;
+
+import org.apache.aries.cdi.container.internal.container.Mark;
+import org.apache.aries.cdi.container.internal.model.CollectionType;
+import org.apache.aries.cdi.container.internal.model.ExtendedReferenceDTO;
+import 
org.apache.aries.cdi.container.internal.model.ExtendedReferenceTemplateDTO;
+import org.apache.aries.cdi.container.internal.model.ReferenceEventImpl;
+import org.apache.aries.cdi.container.internal.util.Logs;
+import org.apache.aries.cdi.container.internal.util.Sets;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.cdi.ComponentType;
+import org.osgi.service.cdi.MaximumCardinality;
+import org.osgi.service.cdi.ReferencePolicy;
+import org.osgi.service.cdi.annotations.ComponentScoped;
+import org.osgi.service.cdi.annotations.Reference;
+import org.osgi.service.cdi.reference.ReferenceEvent;
+import org.osgi.service.cdi.runtime.dto.template.ComponentTemplateDTO;
+import org.osgi.service.log.Logger;
+
+public class ReferenceBean implements Bean<Object> {
+
+       public ReferenceBean(
+               Logs logs,
+               ComponentTemplateDTO component,
+               ExtendedReferenceTemplateDTO template) {
+
+               _component = component;
+               _template = template;
+
+               _log = logs.getLogger(getClass());
+               _qualifiers = Sets.hashSet(Reference.Literal.of(Object.class, 
""), Default.Literal.INSTANCE);
+               _types = Sets.hashSet(_template.injectionPointType, 
Object.class);
+       }
+
+       @Override
+       public Object create(CreationalContext<Object> c) {
+               if (_template.collectionType == CollectionType.OBSERVER) return 
null;
+
+               Objects.requireNonNull(_bm);
+               Objects.requireNonNull(_snapshot);
+
+               _log.debug(l -> l.debug("Creating {}", this));
+
+               final SortedMap<ServiceReference<Object>, Object> tracked = 
_snapshot.serviceTracker.getTracked();
+
+               if (_template.policy == ReferencePolicy.DYNAMIC) {
+                       if (_template.maximumCardinality == 
MaximumCardinality.MANY) {
+                               return new Provider<List<Object>>() {
+                                       @Override
+                                       public List<Object> get() {
+                                               return 
tracked.values().stream().map(
+                                                       s -> decorate(c, s)
+                                               ).collect(Collectors.toList());
+                                       }
+                               };
+                       }
+                       else if (_template.minimumCardinality == 0) {
+                               return new Provider<Optional<Object>>() {
+                                       @Override
+                                       public Optional<Object> get() {
+                                               Iterator<Object> iterator = 
tracked.values().iterator();
+                                               if (iterator.hasNext()) {
+                                                       return 
Optional.of(decorate(c, iterator.next()));
+                                               }
+                                               return Optional.empty();
+                                       }
+                               };
+                       }
+                       else {
+                               return new Provider<Object>() {
+                                       @Override
+                                       public Object get() {
+                                               Iterator<Object> iterator = 
tracked.values().iterator();
+                                               if (iterator.hasNext()) {
+                                                       return decorate(c, 
iterator.next());
+                                               }
+                                               return null;
+                                       }
+                               };
+                       }
+               }
+               else {
+                       if (_template.maximumCardinality == 
MaximumCardinality.MANY) {
+                               return tracked.values().stream().map(
+                                       s -> decorate(c, s)
+                               ).collect(Collectors.toList());
+                       }
+                       else if (_template.minimumCardinality == 0) {
+                               Iterator<Object> iterator = 
tracked.values().iterator();
+                               if (iterator.hasNext()) {
+                                       return Optional.of(decorate(c, 
iterator.next()));
+                               }
+                               return Optional.empty();
+                       }
+                       else {
+                               Iterator<Object> iterator = 
tracked.values().iterator();
+                               if (iterator.hasNext()) {
+                                       return decorate(c, iterator.next());
+                               }
+                               return null;
+                       }
+               }
+       }
+
+       private <S> S decorate(CreationalContext<S> c, S s) {
+               return s;
+
+//             TODO do we want to support decorators/interceptors on in-bound 
services one day???
+//             
==================================================================================
+
+//             if (s == null) return null;
+//
+//             List<javax.enterprise.inject.spi.Decorator<?>> decorators = 
_bm.resolveDecorators(
+//                     Collections.singleton(_template.serviceClass),
+//                     new Annotation[0]);
+//
+//             if (decorators.isEmpty()) {
+//                     return s;
+//             }
+//
+//             org.jboss.weld.manager.BeanManagerImpl bmi =
+//                     
((org.jboss.weld.bean.builtin.BeanManagerProxy)_bm).delegate();
+//             org.jboss.weld.injection.CurrentInjectionPoint cip = 
bmi.getServices().get(
+//                     org.jboss.weld.injection.CurrentInjectionPoint.class);
+//             InjectionPoint ip = cip.peek();
+//             return org.jboss.weld.util.Decorators.getOuterDelegate(
+//                     (Bean<S>)this, s, c, (Class<S>)_template.serviceClass,
+//                     
(org.jboss.weld.injection.EmptyInjectionPoint.INSTANCE.equals(ip) ? null : ip),
+//                     bmi, decorators);
+       }
+
+       @Override
+       public void destroy(Object instance, CreationalContext<Object> 
creationalContext) {
+       }
+
+       public boolean fireEvents() {
+               if (_template.collectionType != CollectionType.OBSERVER) return 
true;
+
+               _snapshot.serviceTracker.getTracked().values().stream().map(
+                       ReferenceEvent.class::cast
+               ).forEach(this::fireEvent);
+
+               return true;
+       }
+
+       public boolean fireEvent(ReferenceEvent<?> event) {
+               try {
+//                     TODO this is the spec way to do it, but parameterized 
types are not supported,
+//                     so we need to cheat.
+//                     _bm.getEvent().select(
+//                             Reference.Literal.of(_template.serviceClass, 
_template.targetFilter)
+//                     ).fire(event);
+
+                       
((org.jboss.weld.bean.builtin.BeanManagerProxy)_bm).delegate().getGlobalLenientObserverNotifier().fireEvent(
+                               (Type)event, event, 
Reference.Literal.of(_template.serviceClass, _template.targetFilter));
+               }
+               catch (Exception e) {
+                       _log.error(l -> l.error("CCR observer method error on 
{}", _snapshot, e));
+               }
+
+               return ((ReferenceEventImpl<?>)event).flush();
+       }
+
+       @Override
+       public Class<?> getBeanClass() {
+               return _template.beanClass;
+       }
+
+       @Override
+       public Set<InjectionPoint> getInjectionPoints() {
+               return Collections.emptySet();
+       }
+
+       @Override
+       public String getName() {
+               return null;//_template.name;
+       }
+
+       @Override
+       public Set<Annotation> getQualifiers() {
+               return _qualifiers;
+       }
+
+       @Override
+       public Class<? extends Annotation> getScope() {
+               if (_component.type == ComponentType.CONTAINER) {
+                       return ApplicationScoped.class;
+               }
+               return ComponentScoped.class;
+       }
+
+       @Override
+       public Set<Class<? extends Annotation>> getStereotypes() {
+               return Collections.emptySet();
+       }
+
+       @Override
+       public Set<Type> getTypes() {
+               return _types;
+       }
+
+       @Override
+       public boolean isAlternative() {
+               return false;
+       }
+
+       @Override
+       public boolean isNullable() {
+               return false;
+       }
+
+       public void setMark(Mark mark) {
+               _qualifiers.add(mark);
+               _string = null; // invalidate the toString
+       }
+
+       public void setReferenceDTO(ExtendedReferenceDTO snapshot) {
+               _snapshot = snapshot;
+       }
+
+       public void setBeanManager(BeanManager bm) {
+               _bm = bm;
+       }
+
+       @Override
+       public String toString() {
+               if (_string == null) {
+                       _string =  "ReferenceBean[" + _template.name + ", " + 
_template.injectionPointType + ", " + getScope().getSimpleName() + ", " + 
_qualifiers + "]";
+               }
+               return _string;
+       }
+
+       private volatile BeanManager _bm;
+       private final ComponentTemplateDTO _component;
+       private final Logger _log;
+       private final Set<Annotation> _qualifiers;
+       private volatile ExtendedReferenceDTO _snapshot;
+       private volatile String _string;
+       private final ExtendedReferenceTemplateDTO _template;
+       private final Set<Type> _types;
+
+}

Copied: 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/command/CDICommand.java
 (from r1829114, 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/command/CdiCommand.java)
URL: 
http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/command/CDICommand.java?p2=aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/command/CDICommand.java&p1=aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/command/CdiCommand.java&r1=1829114&r2=1829115&rev=1829115&view=diff
==============================================================================
--- 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/command/CdiCommand.java
 (original)
+++ 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/command/CDICommand.java
 Sat Apr 14 01:10:27 2018
@@ -15,20 +15,23 @@
 package org.apache.aries.cdi.container.internal.command;
 
 import java.util.Collection;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
 
-import org.apache.aries.cdi.container.internal.container.ContainerState;
+import org.apache.aries.cdi.container.internal.CCR;
 import org.osgi.framework.Bundle;
+import org.osgi.service.cdi.runtime.dto.ContainerDTO;
 
-public class CdiCommand {
+public class CDICommand {
 
-       public Collection<ContainerState> list() {
-               return _states.values();
+       public CDICommand(CCR ccr) {
+               _ccr = ccr;
        }
 
-       public ContainerState info(Bundle bundle) {
-               return _states.get(bundle);
+       public Collection<ContainerDTO> list() {
+               return _ccr.getContainerDTOs();
+       }
+
+       public ContainerDTO info(Bundle bundle) {
+               return _ccr.getContainerDTO(bundle);
                /*
                try (Formatter f = new Formatter()) {
                        ContainerState containerState = _states.get(bundle);
@@ -124,14 +127,6 @@ public class CdiCommand {
                 */
        }
 
-       public void add(Bundle bundle, ContainerState cdiContainerState) {
-               _states.put(bundle, cdiContainerState);
-       }
-
-       public void remove(Bundle bundle) {
-               _states.remove(bundle);
-       }
-
-       private final Map<Bundle, ContainerState> _states = new 
ConcurrentHashMap<>();
+       private final CCR _ccr;
 
 }
\ No newline at end of file

Copied: 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/BundleContextExtension.java
 (from r1829114, 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/context/BundleContextExtension.java)
URL: 
http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/BundleContextExtension.java?p2=aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/BundleContextExtension.java&p1=aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/context/BundleContextExtension.java&r1=1829114&r2=1829115&rev=1829115&view=diff
==============================================================================
--- 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/context/BundleContextExtension.java
 (original)
+++ 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/BundleContextExtension.java
 Sat Apr 14 01:10:27 2018
@@ -12,16 +12,15 @@
  * limitations under the License.
  */
 
-package org.apache.aries.cdi.container.internal.context;
+package org.apache.aries.cdi.container.internal.container;
 
 import javax.enterprise.event.Observes;
 import javax.enterprise.inject.spi.AfterBeanDiscovery;
 import javax.enterprise.inject.spi.BeanManager;
 import javax.enterprise.inject.spi.Extension;
+import javax.enterprise.inject.spi.configurator.BeanConfigurator;
 
 import org.osgi.framework.BundleContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 public class BundleContextExtension implements Extension {
 
@@ -30,18 +29,11 @@ public class BundleContextExtension impl
        }
 
        void afterBeanDiscovery(@Observes AfterBeanDiscovery abd, BeanManager 
manager) {
-               if (_log.isDebugEnabled()) {
-                       _log.debug("CDIe - Adding BundleContext {}", 
_bundleContext);
-               }
-
-               abd.addBean(new BundleContextBean(_bundleContext));
-
-               if (_log.isDebugEnabled()) {
-                       _log.debug("CDIe - BundleContext added {}", 
_bundleContext);
-               }
+               BeanConfigurator<BundleContext> bean = abd.addBean();
+               bean.addType(BundleContext.class);
+               bean.createWith(c -> _bundleContext);
        }
 
-       private static final Logger _log = 
LoggerFactory.getLogger(BundleContextExtension.class);
-
        private final BundleContext _bundleContext;
+
 }

Added: 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/CDIBundle.java
URL: 
http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/CDIBundle.java?rev=1829115&view=auto
==============================================================================
--- 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/CDIBundle.java
 (added)
+++ 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/CDIBundle.java
 Sat Apr 14 01:10:27 2018
@@ -0,0 +1,104 @@
+/**
+ * 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.internal.container;
+
+import org.apache.aries.cdi.container.internal.CCR;
+import org.apache.aries.cdi.container.internal.container.Op.Mode;
+import org.apache.felix.utils.extender.Extension;
+import org.osgi.service.log.Logger;
+
+public class CDIBundle extends Phase implements Extension {
+
+       public CDIBundle(CCR ccr, ContainerState containerState, Phase next) {
+               super(containerState, next);
+               _ccr = ccr;
+               _log = containerState.containerLogs().getLogger(getClass());
+       }
+
+       @Override
+       public boolean close() {
+               containerState.closing();
+
+               return next.map(
+                       next -> {
+                               submit(next.closeOp(), next::close).onFailure(
+                                       f -> {
+                                               _log.error(l -> l.error("CCR 
Error in cdibundle CLOSE on {}", bundle(), f));
+
+                                               error(f);
+                                       }
+                               );
+
+                               _ccr.remove(bundle());
+
+                               return true;
+                       }
+               ).orElse(true);
+       }
+
+       @Override
+       public Op closeOp() {
+               return Op.of(Mode.CLOSE, Op.Type.INIT, bundle().toString());
+       }
+
+       @Override
+       public void destroy() throws Exception {
+               submit(closeOp(), this::close).onFailure(
+                       f -> {
+                               _log.error(l -> l.error("CCR Error in closing 
cdi bundle {}", containerState.bundle(), f));
+                       }
+               );
+       }
+
+       @Override
+       public boolean open() {
+               return next.map(
+                       next -> {
+                               _ccr.add(containerState.bundle(), 
containerState);
+
+                               submit(next.openOp(), next::open).then(
+                                       null,
+                                       f -> {
+                                               _log.error(l -> l.error("CCR 
Error in cdibundle OPEN on {}", bundle(), f.getFailure()));
+
+                                               error(f.getFailure());
+                                       }
+
+                               );
+
+                               return true;
+                       }
+               ).orElse(true);
+       }
+
+       @Override
+       public Op openOp() {
+               return Op.of(Mode.OPEN, Op.Type.INIT, bundle().toString());
+       }
+
+       @Override
+       public void start() throws Exception {
+               submit(openOp(), this::open).onFailure(
+                       f -> {
+                               _log.error(l -> l.error("CCR Error in starting 
cdi bundle {}", containerState.bundle(), f));
+                       }
+               );
+       }
+
+
+       private final CCR _ccr;
+       private final Logger _log;
+
+}

Copied: 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/CheckedCallback.java
 (from r1829114, 
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/container/CheckedCallback.java?p2=aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/CheckedCallback.java&p1=aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/util/Throw.java&r1=1829114&r2=1829115&rev=1829115&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/container/CheckedCallback.java
 Sat Apr 14 01:10:27 2018
@@ -12,21 +12,25 @@
  * limitations under the License.
  */
 
-package org.apache.aries.cdi.container.internal.util;
+package org.apache.aries.cdi.container.internal.container;
 
-public class Throw {
+import java.util.function.Predicate;
 
-       private Throw() {
-               // no instances
-       }
+import org.osgi.util.promise.Failure;
+import org.osgi.util.promise.Promise;
+import org.osgi.util.promise.Success;
 
-       public static <T> T exception(Throwable throwable) {
-               return Throw.<T, RuntimeException>_exception(throwable);
-       }
+public interface CheckedCallback<T, R> extends Failure, Predicate<Op>, 
Success<T, R> {
 
+       @Override
        @SuppressWarnings("unchecked")
-       private static <T, E extends Throwable> T _exception(Throwable 
throwable) throws E {
-               throw (E)throwable;
+       public default Promise<R> call(Promise<T> resolved) throws Exception {
+               return (Promise<R>)resolved;
+       }
+
+       @Override
+       public default void fail(Promise<?> resolved) throws Exception {
+               resolved.getFailure().printStackTrace();
        }
 
-}
\ No newline at end of file
+}

Added: 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/ComponentContext.java
URL: 
http://svn.apache.org/viewvc/aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/ComponentContext.java?rev=1829115&view=auto
==============================================================================
--- 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/ComponentContext.java
 (added)
+++ 
aries/trunk/cdi/cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/container/ComponentContext.java
 Sat Apr 14 01:10:27 2018
@@ -0,0 +1,142 @@
+/**
+ * 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.internal.container;
+
+import java.lang.annotation.Annotation;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+import javax.enterprise.context.spi.Context;
+import javax.enterprise.context.spi.Contextual;
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.spi.Bean;
+
+import org.osgi.service.cdi.annotations.ComponentScoped;
+import org.osgi.service.cdi.runtime.dto.ActivationDTO;
+
+public class ComponentContext implements Context {
+
+       @SuppressWarnings("unchecked")
+       public void destroy() {
+               if (!isActive()) return;
+
+               Map<Class<?>, BeanInstance<?>> map = _beans.computeIfAbsent(
+                       _componentModel.get(), k -> new ConcurrentHashMap<>());
+
+               if (map == null) {
+                       return;
+               }
+
+               for (BeanInstance<?> beanInstance : map.values()) {
+                       
beanInstance.getBean().destroy(beanInstance.getInstance(), 
beanInstance.getCreationalContext());
+               }
+       }
+
+       @Override
+       @SuppressWarnings("unchecked")
+       public <T> T get(Contextual<T> contextual) {
+               if (!isActive()) return null;
+
+               @SuppressWarnings("rawtypes")
+               Bean bean = (Bean)contextual;
+               Class<?> beanClass = bean.getBeanClass();
+
+               Map<Class<?>, BeanInstance<?>> map = _beans.computeIfAbsent(
+                       _componentModel.get(), k -> new ConcurrentHashMap<>());
+
+               if (map.containsKey(beanClass)) {
+                       return (T)map.get(beanClass).getInstance();
+               }
+
+               return null;
+       }
+
+       @Override
+       @SuppressWarnings("unchecked")
+       public <T> T get(Contextual<T> contextual, CreationalContext<T> 
creationalContext) {
+               if (!isActive()) return null;
+
+               @SuppressWarnings("rawtypes")
+               Bean bean = (Bean)contextual;
+               Class<?> beanClass = bean.getBeanClass();
+
+               Map<Class<?>, BeanInstance<?>> map = _beans.computeIfAbsent(
+                       _componentModel.get(), k -> new ConcurrentHashMap<>());
+
+               if (map.containsKey(beanClass)) {
+                       return (T)map.get(beanClass).getInstance();
+               }
+
+               T instance = (T) bean.create(creationalContext);
+
+               map.put(beanClass, new BeanInstance<>(bean, creationalContext, 
instance));
+
+               return instance;
+       }
+
+       @Override
+       public Class<? extends Annotation> getScope() {
+               return ComponentScoped.class;
+       }
+
+       @Override
+       public boolean isActive() {
+               return _componentModel.get() != null;
+       }
+
+       private static final Map<ActivationDTO, Map<Class<?>, BeanInstance<?>>> 
_beans = new ConcurrentHashMap<>();
+       private static final ThreadLocal<ActivationDTO> _componentModel = new 
ThreadLocal<>();
+
+       public static class With implements AutoCloseable {
+
+               public With(ActivationDTO activationDTO) {
+                       _componentModel.set(activationDTO);
+               }
+
+               @Override
+               public void close() {
+                       _componentModel.set(null);
+               }
+
+       }
+
+       @SuppressWarnings("rawtypes")
+       private class BeanInstance<T> {
+
+               public BeanInstance(Bean<T> bean, CreationalContext<T> 
creationalContext, T instance) {
+                       _bean = bean;
+                       _creationalContext = creationalContext;
+                       _instance = instance;
+               }
+
+               public Bean getBean() {
+                       return _bean;
+               }
+
+               public CreationalContext<T> getCreationalContext() {
+                       return _creationalContext;
+               }
+
+               public T getInstance() {
+                       return _instance;
+               }
+
+               private final Bean<T> _bean;
+               private final CreationalContext<T> _creationalContext;
+               private final T _instance;
+
+       }
+
+}
\ No newline at end of file


Reply via email to