aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sbrat...@apache.org
Subject svn commit: r1738981 [1/4] - in /aries/branches/java6support: ./ async/ async/async-all-index/ async/async-all/ async/async-api/ async/async-impl/ async/async-index/ async/promise-api/ blueprint/ blueprint/blueprint-authz/src/main/java/org/apache/aries...
Date Wed, 13 Apr 2016 18:41:24 GMT
Author: sbratton
Date: Wed Apr 13 18:41:23 2016
New Revision: 1738981

URL: http://svn.apache.org/viewvc?rev=1738981&view=rev
Log:
Sync java6support branch to trunk - svn merge ^/aries/trunk -r1718666:1728110

Added:
    aries/branches/java6support/async/async-all-index/
      - copied from r1728110, aries/trunk/async/async-all-index/
    aries/branches/java6support/async/async-index/
      - copied from r1728110, aries/trunk/async/async-index/
    aries/branches/java6support/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/SpringExtenderTest.java
      - copied unchanged from r1728110, aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/SpringExtenderTest.java
    aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/AbstractTransactionalFactory.java
      - copied unchanged from r1728110, aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/AbstractTransactionalFactory.java
    aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/Introspector.java
      - copied unchanged from r1728110, aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/Introspector.java
    aries/branches/java6support/blueprint/blueprint-maven-plugin/src/test/java/org/apache/aries/blueprint/plugin/bad/
      - copied from r1728110, aries/trunk/blueprint/blueprint-maven-plugin/src/test/java/org/apache/aries/blueprint/plugin/bad/
    aries/branches/java6support/blueprint/blueprint-maven-plugin/src/test/java/org/apache/aries/blueprint/plugin/test/ServiceABImpl.java
      - copied unchanged from r1728110, aries/trunk/blueprint/blueprint-maven-plugin/src/test/java/org/apache/aries/blueprint/plugin/test/ServiceABImpl.java
    aries/branches/java6support/blueprint/blueprint-maven-plugin/src/test/java/org/apache/aries/blueprint/plugin/test/ServiceAImpl3.java
      - copied unchanged from r1728110, aries/trunk/blueprint/blueprint-maven-plugin/src/test/java/org/apache/aries/blueprint/plugin/test/ServiceAImpl3.java
    aries/branches/java6support/blueprint/blueprint-maven-plugin/src/test/java/org/apache/aries/blueprint/plugin/test/ServiceReferencesParent.java
      - copied unchanged from r1728110, aries/trunk/blueprint/blueprint-maven-plugin/src/test/java/org/apache/aries/blueprint/plugin/test/ServiceReferencesParent.java
    aries/branches/java6support/blueprint/blueprint-repository/
      - copied from r1728110, aries/trunk/blueprint/blueprint-repository/
    aries/branches/java6support/blueprint/blueprint-testbundlee/
      - copied from r1728110, aries/trunk/blueprint/blueprint-testbundlee/
    aries/branches/java6support/jpa/README.md
      - copied unchanged from r1728110, aries/trunk/jpa/README.md
    aries/branches/java6support/jpa/jpa-repository/
      - copied from r1728110, aries/trunk/jpa/jpa-repository/
    aries/branches/java6support/proxy/proxy-impl/src/test/java/org/apache/aries/blueprint/proxy/ProxyTestClassPackageAccessCtor.java
      - copied unchanged from r1728110, aries/trunk/proxy/proxy-impl/src/test/java/org/apache/aries/blueprint/proxy/ProxyTestClassPackageAccessCtor.java
    aries/branches/java6support/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/LockingStrategy.java
      - copied unchanged from r1728110, aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/LockingStrategy.java
Modified:
    aries/branches/java6support/   (props changed)
    aries/branches/java6support/async/async-all/pom.xml
    aries/branches/java6support/async/async-api/pom.xml
    aries/branches/java6support/async/async-impl/pom.xml
    aries/branches/java6support/async/pom.xml
    aries/branches/java6support/async/promise-api/pom.xml
    aries/branches/java6support/blueprint/blueprint-authz/src/main/java/org/apache/aries/blueprint/authorization/impl/AuthorizationBeanProcessor.java
    aries/branches/java6support/blueprint/blueprint-authz/src/main/java/org/apache/aries/blueprint/authorization/impl/AuthorizationNsHandler.java
    aries/branches/java6support/blueprint/blueprint-bundle/pom.xml
    aries/branches/java6support/blueprint/blueprint-core/pom.xml
    aries/branches/java6support/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintContainerImpl.java
    aries/branches/java6support/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintExtender.java
    aries/branches/java6support/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintRepository.java
    aries/branches/java6support/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/RecipeBuilder.java
    aries/branches/java6support/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/ServiceRecipe.java
    aries/branches/java6support/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/namespace/NamespaceHandlerRegistryImpl.java
    aries/branches/java6support/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/services/BlueprintExtenderService.java
    aries/branches/java6support/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/services/packageinfo
    aries/branches/java6support/blueprint/blueprint-core/src/test/java/org/apache/aries/blueprint/TestBlueprintContainer.java
    aries/branches/java6support/blueprint/blueprint-core/src/test/java/org/apache/aries/blueprint/container/BeanRecipeTest.java
    aries/branches/java6support/blueprint/blueprint-itests/pom.xml
    aries/branches/java6support/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/Helper.java
    aries/branches/java6support/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/SpringTest.java
    aries/branches/java6support/blueprint/blueprint-maven-plugin/pom.xml
    aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/FilteredClassFinder.java
    aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/GenerateMojo.java
    aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/Generator.java
    aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/OsgiServiceProviderWriter.java
    aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/Bean.java
    aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/Context.java
    aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/JavaxTransactionFactory.java
    aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/SpringTransactionFactory.java
    aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/TransactionalDef.java
    aries/branches/java6support/blueprint/blueprint-maven-plugin/src/test/java/org/apache/aries/blueprint/plugin/GeneratorTest.java
    aries/branches/java6support/blueprint/blueprint-maven-plugin/src/test/java/org/apache/aries/blueprint/plugin/model/BeanTest.java
    aries/branches/java6support/blueprint/blueprint-maven-plugin/src/test/java/org/apache/aries/blueprint/plugin/model/ContextTest.java
    aries/branches/java6support/blueprint/blueprint-maven-plugin/src/test/java/org/apache/aries/blueprint/plugin/test/MyBean1.java
    aries/branches/java6support/blueprint/blueprint-maven-plugin/src/test/java/org/apache/aries/blueprint/plugin/test/MyBean3.java
    aries/branches/java6support/blueprint/blueprint-maven-plugin/src/test/java/org/apache/aries/blueprint/plugin/test/MyBean4.java
    aries/branches/java6support/blueprint/blueprint-maven-plugin/src/test/java/org/apache/aries/blueprint/plugin/test/ParentBean.java
    aries/branches/java6support/blueprint/blueprint-maven-plugin/src/test/java/org/apache/aries/blueprint/plugin/test/ServiceAImpl1.java
    aries/branches/java6support/blueprint/blueprint-maven-plugin/src/test/java/org/apache/aries/blueprint/plugin/test/ServiceReferences.java
    aries/branches/java6support/blueprint/blueprint-parser/pom.xml
    aries/branches/java6support/blueprint/blueprint-spring-extender/pom.xml
    aries/branches/java6support/blueprint/blueprint-spring-extender/src/main/java/org/apache/aries/blueprint/spring/extender/SpringOsgiCompendiumNamespaceHandler.java
    aries/branches/java6support/blueprint/blueprint-spring-extender/src/main/java/org/apache/aries/blueprint/spring/extender/SpringOsgiExtender.java
    aries/branches/java6support/blueprint/blueprint-spring-extender/src/main/java/org/apache/aries/blueprint/spring/extender/SpringOsgiExtension.java
    aries/branches/java6support/blueprint/blueprint-spring-extender/src/main/java/org/apache/aries/blueprint/spring/extender/SpringOsgiNamespaceHandler.java
    aries/branches/java6support/blueprint/blueprint-spring/pom.xml
    aries/branches/java6support/blueprint/blueprint-spring/src/main/java/org/apache/aries/blueprint/spring/BeansNamespaceHandler.java
    aries/branches/java6support/blueprint/blueprint-spring/src/main/java/org/apache/aries/blueprint/spring/BlueprintNamespaceHandler.java
    aries/branches/java6support/blueprint/blueprint-spring/src/main/java/org/apache/aries/blueprint/spring/SpringBeanProcessor.java
    aries/branches/java6support/blueprint/pom.xml
    aries/branches/java6support/jmx/jmx-core/src/main/java/org/apache/aries/jmx/codec/ServiceEventData.java
    aries/branches/java6support/jpa/examples/pom.xml
    aries/branches/java6support/jpa/examples/tasklist-blueprint/pom.xml
    aries/branches/java6support/jpa/examples/tasklist-blueprint/src/test/java/org/apache/aries/jpa/example/tasklist/blueprint/impl/TaskServiceImplTest.java
    aries/branches/java6support/jpa/examples/tasklist-ds/pom.xml
    aries/branches/java6support/jpa/examples/tasklist-model/pom.xml
    aries/branches/java6support/jpa/itests/jpa-container-blueprint-testbundle/pom.xml
    aries/branches/java6support/jpa/itests/jpa-container-blueprint-testbundle/src/main/resources/OSGI-INF/blueprint/config.xml
    aries/branches/java6support/jpa/itests/jpa-container-itest-karaf/pom.xml
    aries/branches/java6support/jpa/itests/jpa-container-itest/pom.xml
    aries/branches/java6support/jpa/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/blueprint/aries/itest/BlueprintTest.java
    aries/branches/java6support/jpa/itests/jpa-container-itest/src/test/java/org/apache/aries/jpa/itest/AbstractJPAItest.java
    aries/branches/java6support/jpa/itests/jpa-container-testbundle-eclipselink/pom.xml
    aries/branches/java6support/jpa/itests/jpa-container-testbundle/pom.xml
    aries/branches/java6support/jpa/itests/pom.xml
    aries/branches/java6support/jpa/jpa-api/pom.xml
    aries/branches/java6support/jpa/jpa-blueprint/pom.xml
    aries/branches/java6support/jpa/jpa-blueprint/src/main/java/org/apache/aries/jpa/blueprint/impl/JpaComponentProcessor.java
    aries/branches/java6support/jpa/jpa-container-eclipselink-adapter/pom.xml
    aries/branches/java6support/jpa/jpa-container/osgi.bnd
    aries/branches/java6support/jpa/jpa-container/pom.xml
    aries/branches/java6support/jpa/jpa-container/src/main/java/org/apache/aries/jpa/container/impl/PersistenceProviderTracker.java
    aries/branches/java6support/jpa/jpa-features/pom.xml
    aries/branches/java6support/jpa/jpa-parent/pom.xml
    aries/branches/java6support/jpa/jpa-support/osgi.bnd
    aries/branches/java6support/jpa/jpa-support/pom.xml
    aries/branches/java6support/jpa/pom.xml
    aries/branches/java6support/proxy/proxy-impl/src/main/java/org/apache/aries/proxy/impl/gen/ProxySubclassAdapter.java
    aries/branches/java6support/proxy/proxy-impl/src/main/java/org/apache/aries/proxy/impl/interfaces/InterfaceCombiningClassAdapter.java
    aries/branches/java6support/proxy/proxy-impl/src/test/java/org/apache/aries/blueprint/proxy/ProxySubclassGeneratorTest.java
    aries/branches/java6support/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/AbstractBasicProxyTest.java
    aries/branches/java6support/spi-fly/pom.xml
    aries/branches/java6support/spi-fly/spi-fly-core/pom.xml
    aries/branches/java6support/spi-fly/spi-fly-dynamic-bundle/pom.xml
    aries/branches/java6support/spi-fly/spi-fly-static-bundle/pom.xml
    aries/branches/java6support/spi-fly/spi-fly-static-tool/pom.xml
    aries/branches/java6support/spi-fly/spi-fly-weaver/pom.xml
    aries/branches/java6support/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/BasicSubsystem.java
    aries/branches/java6support/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/DependencyCalculator.java
    aries/branches/java6support/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/InstallAction.java
    aries/branches/java6support/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/ResolveContext.java
    aries/branches/java6support/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/StartAction.java
    aries/branches/java6support/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/StartResourceComparator.java
    aries/branches/java6support/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/StopAction.java
    aries/branches/java6support/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/SubsystemResource.java
    aries/branches/java6support/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/SubsystemResourceInstaller.java
    aries/branches/java6support/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/UninstallAction.java
    aries/branches/java6support/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/WovenClassListener.java
    aries/branches/java6support/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/SubsystemTest.java
    aries/branches/java6support/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/defect/Aries1383Test.java
    aries/branches/java6support/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/defect/Aries1435Test.java
    aries/branches/java6support/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/util/BundleArchiveBuilder.java
    aries/branches/java6support/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/util/SubsystemArchiveBuilder.java
    aries/branches/java6support/transaction/transaction-blueprint/pom.xml
    aries/branches/java6support/transaction/transaction-itests/pom.xml

Propchange: aries/branches/java6support/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Apr 13 18:41:23 2016
@@ -1 +1,2 @@
 /aries/branches/1.0-prototype:1306564-1337594
+/aries/trunk:1718667-1728110

Modified: aries/branches/java6support/async/async-all/pom.xml
URL: http://svn.apache.org/viewvc/aries/branches/java6support/async/async-all/pom.xml?rev=1738981&r1=1738980&r2=1738981&view=diff
==============================================================================
--- aries/branches/java6support/async/async-all/pom.xml (original)
+++ aries/branches/java6support/async/async-all/pom.xml Wed Apr 13 18:41:23 2016
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache.aries</groupId>
         <artifactId>parent</artifactId>
-        <version>2.0.0</version>
+        <version>2.0.1</version>
         <relativePath>../../parent/pom.xml</relativePath>
     </parent>
 
@@ -56,6 +56,7 @@
         </aries.osgi.export.pkg>
         <aries.osgi.private.pkg>
         	org.apache.aries.async.impl,
+        	org.osgi.util.tracker,
             net.sf.cglib.*
         </aries.osgi.private.pkg>
         <aries.osgi.import.pkg>
@@ -77,25 +78,47 @@
             <groupId>org.apache.aries.async</groupId>
             <artifactId>org.apache.aries.async.promise.api</artifactId>
             <version>1.0.2-SNAPSHOT</version>
+            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.aries.async</groupId>
             <artifactId>org.apache.aries.async.api</artifactId>
             <version>1.0.2-SNAPSHOT</version>
+            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.aries.async</groupId>
             <artifactId>org.apache.aries.async.impl</artifactId>
             <version>1.0.2-SNAPSHOT</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.service.log</artifactId>
+            <version>1.3.0</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.util.tracker</artifactId>
+            <version>1.5.1</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+            <scope>provided</scope>
         </dependency>
         <dependency>
 	        <groupId>cglib</groupId>
 	  		<artifactId>cglib-nodep</artifactId>
 	  		<version>3.1</version>
+	  		<scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.osgi</groupId>
             <artifactId>org.osgi.compendium</artifactId>
+            <scope>provided</scope>
         </dependency>
     </dependencies>
 

Modified: aries/branches/java6support/async/async-api/pom.xml
URL: http://svn.apache.org/viewvc/aries/branches/java6support/async/async-api/pom.xml?rev=1738981&r1=1738980&r2=1738981&view=diff
==============================================================================
--- aries/branches/java6support/async/async-api/pom.xml (original)
+++ aries/branches/java6support/async/async-api/pom.xml Wed Apr 13 18:41:23 2016
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache.aries</groupId>
         <artifactId>parent</artifactId>
-        <version>2.0.0</version>
+        <version>2.0.1</version>
         <relativePath>../../parent/pom.xml</relativePath>
     </parent>
 
@@ -67,11 +67,13 @@
         <dependency>
             <groupId>org.osgi</groupId>
             <artifactId>org.osgi.core</artifactId>
+            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.osgi</groupId>
             <artifactId>osgi.annotation</artifactId>
             <version>6.0.1</version>
+            <scope>provided</scope>
         </dependency>
     </dependencies>
 

Modified: aries/branches/java6support/async/async-impl/pom.xml
URL: http://svn.apache.org/viewvc/aries/branches/java6support/async/async-impl/pom.xml?rev=1738981&r1=1738980&r2=1738981&view=diff
==============================================================================
--- aries/branches/java6support/async/async-impl/pom.xml (original)
+++ aries/branches/java6support/async/async-impl/pom.xml Wed Apr 13 18:41:23 2016
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache.aries</groupId>
         <artifactId>parent</artifactId>
-        <version>2.0.0</version>
+        <version>2.0.1</version>
         <relativePath>../../parent/pom.xml</relativePath>
     </parent>
 
@@ -49,9 +49,12 @@
         <aries.osgi.export.pkg>
         </aries.osgi.export.pkg>
         <aries.osgi.private.pkg>
-        	org.apache.aries.async.impl
+        	org.apache.aries.async.impl,
+        	net.sf.cglib.*
         </aries.osgi.private.pkg>
         <aries.osgi.import.pkg>
+            !net.sf.cglib.asm.util,
+            !org.apache.tools.*,
             *
         </aries.osgi.import.pkg>
         <lastReleaseVersion>1.0.1</lastReleaseVersion>
@@ -70,21 +73,30 @@
         </dependency>
         <dependency>
             <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.core</artifactId>
+            <artifactId>org.osgi.service.log</artifactId>
+            <version>1.3.0</version>
         </dependency>
         <dependency>
             <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.compendium</artifactId>
+            <artifactId>org.osgi.util.tracker</artifactId>
+            <version>1.5.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.osgi</groupId>
             <artifactId>osgi.annotation</artifactId>
             <version>6.0.1</version>
+            <scope>provided</scope>
         </dependency>
         <dependency>
 	        <groupId>cglib</groupId>
 	  		<artifactId>cglib-nodep</artifactId>
 	  		<version>3.1</version>
+	  		<scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>junit</groupId>

Modified: aries/branches/java6support/async/pom.xml
URL: http://svn.apache.org/viewvc/aries/branches/java6support/async/pom.xml?rev=1738981&r1=1738980&r2=1738981&view=diff
==============================================================================
--- aries/branches/java6support/async/pom.xml (original)
+++ aries/branches/java6support/async/pom.xml Wed Apr 13 18:41:23 2016
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache.aries</groupId>
         <artifactId>parent</artifactId>
-        <version>2.0.0</version>
+        <version>2.0.1</version>
         <relativePath>../parent/pom.xml</relativePath>
     </parent>
 
@@ -48,6 +48,8 @@
         <module>async-api</module>
         <module>async-impl</module>
         <module>async-all</module>
+        <module>async-index</module>
+        <module>async-all-index</module>
     </modules>
 
 </project>

Modified: aries/branches/java6support/async/promise-api/pom.xml
URL: http://svn.apache.org/viewvc/aries/branches/java6support/async/promise-api/pom.xml?rev=1738981&r1=1738980&r2=1738981&view=diff
==============================================================================
--- aries/branches/java6support/async/promise-api/pom.xml (original)
+++ aries/branches/java6support/async/promise-api/pom.xml Wed Apr 13 18:41:23 2016
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache.aries</groupId>
         <artifactId>parent</artifactId>
-        <version>2.0.0</version>
+        <version>2.0.1</version>
         <relativePath>../../parent/pom.xml</relativePath>
     </parent>
 
@@ -61,14 +61,10 @@
 
     <dependencies>
         <dependency>
-            <groupId>org.apache.aries</groupId>
-            <artifactId>org.apache.aries.util</artifactId>
-            <version>1.0.0</version>
-        </dependency>
-        <dependency>
             <groupId>org.osgi</groupId>
             <artifactId>osgi.annotation</artifactId>
             <version>6.0.1</version>
+            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>junit</groupId>

Modified: aries/branches/java6support/blueprint/blueprint-authz/src/main/java/org/apache/aries/blueprint/authorization/impl/AuthorizationBeanProcessor.java
URL: http://svn.apache.org/viewvc/aries/branches/java6support/blueprint/blueprint-authz/src/main/java/org/apache/aries/blueprint/authorization/impl/AuthorizationBeanProcessor.java?rev=1738981&r1=1738980&r2=1738981&view=diff
==============================================================================
--- aries/branches/java6support/blueprint/blueprint-authz/src/main/java/org/apache/aries/blueprint/authorization/impl/AuthorizationBeanProcessor.java (original)
+++ aries/branches/java6support/blueprint/blueprint-authz/src/main/java/org/apache/aries/blueprint/authorization/impl/AuthorizationBeanProcessor.java Wed Apr 13 18:41:23 2016
@@ -22,6 +22,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.apache.aries.blueprint.BeanProcessor;
 import org.apache.aries.blueprint.ComponentDefinitionRegistry;
+import org.apache.aries.blueprint.Processor;
 import org.osgi.service.blueprint.reflect.BeanMetadata;
 
 public class AuthorizationBeanProcessor implements BeanProcessor {
@@ -47,6 +48,10 @@ public class AuthorizationBeanProcessor
     }
 
     public Object beforeInit(Object bean, String beanName, BeanCreator beanCreator, BeanMetadata beanData) {
+        if (bean instanceof Processor) {
+            // Never enhance other processors
+            return bean;
+        }
         Class<?> c = bean.getClass();
         if (new SecurityAnotationParser().isSecured(c)) {
             LOGGER.debug("Adding annotation based authorization interceptor for bean {} with class {}", beanName, c);

Modified: aries/branches/java6support/blueprint/blueprint-authz/src/main/java/org/apache/aries/blueprint/authorization/impl/AuthorizationNsHandler.java
URL: http://svn.apache.org/viewvc/aries/branches/java6support/blueprint/blueprint-authz/src/main/java/org/apache/aries/blueprint/authorization/impl/AuthorizationNsHandler.java?rev=1738981&r1=1738980&r2=1738981&view=diff
==============================================================================
--- aries/branches/java6support/blueprint/blueprint-authz/src/main/java/org/apache/aries/blueprint/authorization/impl/AuthorizationNsHandler.java (original)
+++ aries/branches/java6support/blueprint/blueprint-authz/src/main/java/org/apache/aries/blueprint/authorization/impl/AuthorizationNsHandler.java Wed Apr 13 18:41:23 2016
@@ -19,6 +19,7 @@
 package org.apache.aries.blueprint.authorization.impl;
 
 import java.net.URL;
+import java.util.Collections;
 import java.util.Set;
 
 import org.apache.aries.blueprint.ComponentDefinitionRegistry;
@@ -28,19 +29,18 @@ import org.apache.aries.blueprint.mutabl
 import org.apache.aries.blueprint.mutable.MutablePassThroughMetadata;
 import org.osgi.service.blueprint.reflect.ComponentMetadata;
 import org.osgi.service.blueprint.reflect.Metadata;
-
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 
 public class AuthorizationNsHandler implements NamespaceHandler {
+    private static final String NS_AUTHZ = "http://aries.apache.org/xmlns/authorization/v1.0.0";
 
     private void parseElement(Element elt, ComponentMetadata cm, ParserContext pc) {
         ComponentDefinitionRegistry cdr = pc.getComponentDefinitionRegistry();
         
-        if ("enable".equals(elt.getLocalName())) {
-            if (!cdr.containsComponentDefinition(AuthorizationBeanProcessor.AUTH_PROCESSOR_BEAN_NAME)) {
-                cdr.registerComponentDefinition(authBeanProcessor(pc, cdr));
-            }
+        if ("enable".equals(elt.getLocalName()) && NS_AUTHZ.equals(elt.getNamespaceURI()) 
+            && !cdr.containsComponentDefinition(AuthorizationBeanProcessor.AUTH_PROCESSOR_BEAN_NAME)) {
+            cdr.registerComponentDefinition(authBeanProcessor(pc, cdr));
         }
     }
 
@@ -72,12 +72,16 @@ public class AuthorizationNsHandler impl
     }
 
     public URL getSchemaLocation(String namespace) {
-        return this.getClass().getResource("/authz10.xsd");
+        if (NS_AUTHZ.equals(namespace)) {
+            return this.getClass().getResource("/authz10.xsd");
+        } else {
+            return null;
+        }
     }
 
     @SuppressWarnings("rawtypes")
     public Set<Class> getManagedClasses() {
-        return null;
+        return Collections.emptySet();
     }
 
 }

Modified: aries/branches/java6support/blueprint/blueprint-bundle/pom.xml
URL: http://svn.apache.org/viewvc/aries/branches/java6support/blueprint/blueprint-bundle/pom.xml?rev=1738981&r1=1738980&r2=1738981&view=diff
==============================================================================
--- aries/branches/java6support/blueprint/blueprint-bundle/pom.xml (original)
+++ aries/branches/java6support/blueprint/blueprint-bundle/pom.xml Wed Apr 13 18:41:23 2016
@@ -122,7 +122,7 @@
         <dependency>
             <groupId>org.apache.aries.blueprint</groupId>
             <artifactId>org.apache.aries.blueprint.core</artifactId>
-            <version>1.5.0-SNAPSHOT</version>
+            <version>1.6.0-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
         <dependency>

Modified: aries/branches/java6support/blueprint/blueprint-core/pom.xml
URL: http://svn.apache.org/viewvc/aries/branches/java6support/blueprint/blueprint-core/pom.xml?rev=1738981&r1=1738980&r2=1738981&view=diff
==============================================================================
--- aries/branches/java6support/blueprint/blueprint-core/pom.xml (original)
+++ aries/branches/java6support/blueprint/blueprint-core/pom.xml Wed Apr 13 18:41:23 2016
@@ -32,7 +32,7 @@
     <artifactId>org.apache.aries.blueprint.core</artifactId>
     <packaging>bundle</packaging>
     <name>Apache Aries Blueprint Core</name>
-    <version>1.5.0-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <description>
         This bundle contains the core implementation of Blueprint
         along with the "ext" namespace handler.
@@ -91,7 +91,7 @@
         </aries.osgi.include.resource>
         <blueprint.annotation.api.version>1.0.0</blueprint.annotation.api.version>
         <blueprint.api.version>1.0.0</blueprint.api.version>
-        <blueprint.parser.version>1.4.0-SNAPSHOT</blueprint.parser.version>
+        <blueprint.parser.version>1.5.0-SNAPSHOT</blueprint.parser.version>
         <proxy.api.version>1.0.0</proxy.api.version>
         <proxy.impl.version>1.0.3</proxy.impl.version>
         <quiesce.api.version>1.0.0</quiesce.api.version>
@@ -105,7 +105,7 @@
             <properties>
                 <blueprint.annotation.api.version>1.0.1</blueprint.annotation.api.version>
                 <blueprint.api.version>1.0.1</blueprint.api.version>
-                <blueprint.parser.version>1.4.0-SNAPSHOT</blueprint.parser.version>
+                <blueprint.parser.version>1.5.0-SNAPSHOT</blueprint.parser.version>
                 <proxy.api.version>1.0.1</proxy.api.version>
                 <proxy.impl.version>1.0.1</proxy.impl.version>
                 <quiesce.api.version>1.0.0</quiesce.api.version>

Modified: aries/branches/java6support/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintContainerImpl.java
URL: http://svn.apache.org/viewvc/aries/branches/java6support/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintContainerImpl.java?rev=1738981&r1=1738980&r2=1738981&view=diff
==============================================================================
--- aries/branches/java6support/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintContainerImpl.java (original)
+++ aries/branches/java6support/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintContainerImpl.java Wed Apr 13 18:41:23 2016
@@ -140,6 +140,7 @@ public class BlueprintContainerImpl
     private final AggregateConverter converter;
     private final ExecutorService executors;
     private final ScheduledExecutorService timer;
+    private final Collection<URI> additionalNamespaces;
     private Set<URI> namespaces;
     private State state = State.Unknown;
     private NamespaceHandlerSet handlerSet;
@@ -162,7 +163,7 @@ public class BlueprintContainerImpl
 
     public BlueprintContainerImpl(Bundle bundle, BundleContext bundleContext, Bundle extenderBundle, BlueprintListener eventDispatcher,
                                   NamespaceHandlerRegistry handlers, ExecutorService executor, ScheduledExecutorService timer,
-                                  List<Object> pathList, ProxyManager proxyManager) {
+                                  List<Object> pathList, ProxyManager proxyManager, Collection<URI> namespaces) {
         this.bundle = bundle;
         this.bundleContext = bundleContext;
         this.extenderBundle = extenderBundle;
@@ -180,6 +181,7 @@ public class BlueprintContainerImpl
             this.accessControlContext = null;
         }
         this.proxyManager = proxyManager;
+        this.additionalNamespaces = namespaces;
     }
 
     public ExecutorService getExecutors() {
@@ -301,6 +303,9 @@ public class BlueprintContainerImpl
                         parser = new Parser();
                         parser.parse(getResources());
                         namespaces = parser.getNamespaces();
+                        if (additionalNamespaces != null) {
+                            namespaces.addAll(additionalNamespaces);
+                        }
                         handlerSet = handlers.getNamespaceHandlers(namespaces, getBundle());
                         handlerSet.addListener(this);
                         state = State.WaitForNamespaceHandlers;

Modified: aries/branches/java6support/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintExtender.java
URL: http://svn.apache.org/viewvc/aries/branches/java6support/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintExtender.java?rev=1738981&r1=1738980&r2=1738981&view=diff
==============================================================================
--- aries/branches/java6support/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintExtender.java (original)
+++ aries/branches/java6support/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintExtender.java Wed Apr 13 18:41:23 2016
@@ -20,8 +20,10 @@ package org.apache.aries.blueprint.conta
 
 import java.io.File;
 import java.net.MalformedURLException;
+import java.net.URI;
 import java.net.URL;
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.Enumeration;
@@ -264,7 +266,11 @@ public class BlueprintExtender implement
     }
 
     private boolean createContainer(Bundle bundle, List<Object> paths) {
-    try {
+        return createContainer(bundle, paths, null);
+    }
+
+    private boolean createContainer(Bundle bundle, List<Object> paths, Collection<URI> namespaces) {
+        try {
             if (paths == null || paths.isEmpty()) {
                 // This bundle is not a blueprint bundle, so ignore it
                 return false;
@@ -282,7 +288,7 @@ public class BlueprintExtender implement
             BlueprintContainerImpl blueprintContainer = new BlueprintContainerImpl(bundle, bundleContext,
                                                                 context.getBundle(), eventDispatcher,
                                                                 handlers, getExecutorService(bundle),
-                                                                executors, paths, pm);
+                                                                executors, paths, pm, namespaces);
             synchronized (containers) {
                 if (containers.putIfAbsent(bundle, blueprintContainer) != null) {
                     return false;
@@ -597,6 +603,14 @@ public class BlueprintExtender implement
                 return getContainer(bundle);
             } else {
                 return null;
+            }
+        }
+
+        public BlueprintContainer createContainer(Bundle bundle, List<Object> blueprintPaths, Collection<URI> namespaces) {
+            if (BlueprintExtender.this.createContainer(bundle, blueprintPaths, namespaces)) {
+                return getContainer(bundle);
+            } else {
+                return null;
             }
         }
 

Modified: aries/branches/java6support/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintRepository.java
URL: http://svn.apache.org/viewvc/aries/branches/java6support/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintRepository.java?rev=1738981&r1=1738980&r2=1738981&view=diff
==============================================================================
--- aries/branches/java6support/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintRepository.java (original)
+++ aries/branches/java6support/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintRepository.java Wed Apr 13 18:41:23 2016
@@ -35,6 +35,7 @@ import java.util.concurrent.CopyOnWriteA
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.Future;
 
+import org.apache.aries.blueprint.reflect.MetadataUtil;
 import org.apache.aries.blueprint.services.ExtendedBlueprintContainer;
 import org.apache.aries.blueprint.container.BeanRecipe.UnwrapperedBeanHolder;
 import org.apache.aries.blueprint.di.CircularDependencyException;
@@ -47,6 +48,8 @@ import org.apache.aries.blueprint.di.Col
 import org.osgi.service.blueprint.container.ReifiedType;
 import org.osgi.service.blueprint.container.ComponentDefinitionException;
 import org.osgi.service.blueprint.container.NoSuchComponentException;
+import org.osgi.service.blueprint.reflect.BeanMetadata;
+import org.osgi.service.blueprint.reflect.ComponentMetadata;
 
 /**
  * The default repository implementation
@@ -242,9 +245,15 @@ public class BlueprintRepository impleme
         DependencyGraph graph = new DependencyGraph(this);
         HashMap<String, Object> objects = new LinkedHashMap<String, Object>();
         for (Map.Entry<String, Recipe> entry : graph.getSortedRecipes(names).entrySet()) {
-            objects.put(
-                    entry.getKey(), 
-                    entry.getValue().create());
+            String name = entry.getKey();
+            ComponentMetadata component = blueprintContainer.getComponentDefinitionRegistry().getComponentDefinition(name);
+            boolean prototype = (component instanceof BeanMetadata)
+                    && MetadataUtil.isPrototypeScope((BeanMetadata) component);
+            if (!prototype || names.contains(name)) {
+                objects.put(
+                        name,
+                        entry.getValue().create());
+            }
         }
         return objects;
     }

Modified: aries/branches/java6support/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/RecipeBuilder.java
URL: http://svn.apache.org/viewvc/aries/branches/java6support/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/RecipeBuilder.java?rev=1738981&r1=1738980&r2=1738981&view=diff
==============================================================================
--- aries/branches/java6support/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/RecipeBuilder.java (original)
+++ aries/branches/java6support/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/RecipeBuilder.java Wed Apr 13 18:41:23 2016
@@ -352,7 +352,7 @@ public class RecipeBuilder {
             IdRefRecipe rnr = new IdRefRecipe(getName(null), componentName);
             return rnr;
         } else {
-            throw new IllegalStateException("Unsupported value: " + v.getClass().getName());
+            throw new IllegalStateException("Unsupported value: " + (v != null ? v.getClass().getName() : "null"));
         }
     }
 

Modified: aries/branches/java6support/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/ServiceRecipe.java
URL: http://svn.apache.org/viewvc/aries/branches/java6support/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/ServiceRecipe.java?rev=1738981&r1=1738980&r2=1738981&view=diff
==============================================================================
--- aries/branches/java6support/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/ServiceRecipe.java (original)
+++ aries/branches/java6support/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/ServiceRecipe.java Wed Apr 13 18:41:23 2016
@@ -192,7 +192,7 @@ public class ServiceRecipe extends Abstr
         if (registration.get() == null) {
             ServiceRegistration reg = blueprintContainer.registerService(classArray, new TriggerServiceFactory(this, metadata), props);
             if (!registration.compareAndSet(null, reg) && registration.get() != reg) {
-                reg.unregister();
+                AriesFrameworkUtil.safeUnregisterService(reg);
             }
         }
         initialServiceRegistration = false;

Modified: aries/branches/java6support/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/namespace/NamespaceHandlerRegistryImpl.java
URL: http://svn.apache.org/viewvc/aries/branches/java6support/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/namespace/NamespaceHandlerRegistryImpl.java?rev=1738981&r1=1738980&r2=1738981&view=diff
==============================================================================
--- aries/branches/java6support/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/namespace/NamespaceHandlerRegistryImpl.java (original)
+++ aries/branches/java6support/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/namespace/NamespaceHandlerRegistryImpl.java Wed Apr 13 18:41:23 2016
@@ -122,8 +122,13 @@ public class NamespaceHandlerRegistryImp
                 LOGGER.warn("Error registering NamespaceHandler", e);
             }
         } else {
-            LOGGER.warn("Error resolving NamespaceHandler, null Service obtained from tracked ServiceReference {} for bundle {}/{}",
-                    reference.toString(), reference.getBundle().getSymbolicName(), reference.getBundle().getVersion());
+            Bundle bundle = reference.getBundle();
+            // If bundle is null, the service has already been unregistered,
+            // so do nothing in that case
+            if (bundle != null) {
+                LOGGER.warn("Error resolving NamespaceHandler, null Service obtained from tracked ServiceReference {} for bundle {}/{}",
+                        reference.toString(), reference.getBundle().getSymbolicName(), reference.getBundle().getVersion());
+            }
         }
         return handler;
     }

Modified: aries/branches/java6support/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/services/BlueprintExtenderService.java
URL: http://svn.apache.org/viewvc/aries/branches/java6support/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/services/BlueprintExtenderService.java?rev=1738981&r1=1738980&r2=1738981&view=diff
==============================================================================
--- aries/branches/java6support/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/services/BlueprintExtenderService.java (original)
+++ aries/branches/java6support/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/services/BlueprintExtenderService.java Wed Apr 13 18:41:23 2016
@@ -16,6 +16,8 @@
  */
 package org.apache.aries.blueprint.services;
 
+import java.net.URI;
+import java.util.Collection;
 import java.util.List;
 
 import org.osgi.framework.Bundle;
@@ -35,10 +37,19 @@ public interface BlueprintExtenderServic
      * @param bundle the application bundle
      * @param blueprintPaths the application blueprint resources
      * @return container
-     */    
+     */
     BlueprintContainer createContainer(Bundle bundle, List<Object> blueprintPaths);
 
     /**
+     * Create Blueprint container for the application bundle using a list of Blueprint resources
+     * @param bundle the application bundle
+     * @param blueprintPaths the application blueprint resources
+     * @param namespaces additional namespaces to force reference to
+     * @return container
+     */
+    BlueprintContainer createContainer(Bundle bundle, List<Object> blueprintPaths, Collection<URI> namespaces);
+
+    /**
      * Get an existing container for the application bundle
      * @param bundle the application bundle
      * @return container

Modified: aries/branches/java6support/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/services/packageinfo
URL: http://svn.apache.org/viewvc/aries/branches/java6support/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/services/packageinfo?rev=1738981&r1=1738980&r2=1738981&view=diff
==============================================================================
--- aries/branches/java6support/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/services/packageinfo (original)
+++ aries/branches/java6support/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/services/packageinfo Wed Apr 13 18:41:23 2016
@@ -16,4 +16,4 @@
 # specific language governing permissions and limitations
 # under the License.
 #
-version 1.2.0
+version 1.3.0

Modified: aries/branches/java6support/blueprint/blueprint-core/src/test/java/org/apache/aries/blueprint/TestBlueprintContainer.java
URL: http://svn.apache.org/viewvc/aries/branches/java6support/blueprint/blueprint-core/src/test/java/org/apache/aries/blueprint/TestBlueprintContainer.java?rev=1738981&r1=1738980&r2=1738981&view=diff
==============================================================================
--- aries/branches/java6support/blueprint/blueprint-core/src/test/java/org/apache/aries/blueprint/TestBlueprintContainer.java (original)
+++ aries/branches/java6support/blueprint/blueprint-core/src/test/java/org/apache/aries/blueprint/TestBlueprintContainer.java Wed Apr 13 18:41:23 2016
@@ -44,7 +44,7 @@ public class TestBlueprintContainer exte
     }
 
     public TestBlueprintContainer(ComponentDefinitionRegistryImpl registry, ProxyManager proxyManager) throws Exception {
-        super(null, new TestBundleContext(), null, null, null, null, null, null, proxyManager);
+        super(null, new TestBundleContext(), null, null, null, null, null, null, proxyManager, null);
         this.registry = registry;
         if (registry != null) {
             registry.registerComponentDefinition(new PassThroughMetadataImpl("blueprintContainer", this));

Modified: aries/branches/java6support/blueprint/blueprint-core/src/test/java/org/apache/aries/blueprint/container/BeanRecipeTest.java
URL: http://svn.apache.org/viewvc/aries/branches/java6support/blueprint/blueprint-core/src/test/java/org/apache/aries/blueprint/container/BeanRecipeTest.java?rev=1738981&r1=1738980&r2=1738981&view=diff
==============================================================================
--- aries/branches/java6support/blueprint/blueprint-core/src/test/java/org/apache/aries/blueprint/container/BeanRecipeTest.java (original)
+++ aries/branches/java6support/blueprint/blueprint-core/src/test/java/org/apache/aries/blueprint/container/BeanRecipeTest.java Wed Apr 13 18:41:23 2016
@@ -120,7 +120,7 @@ public class BeanRecipeTest {
 
     @Test
     public void parameterWithGenerics() throws Exception {
-        BlueprintContainerImpl container = new BlueprintContainerImpl(null, null, null, null, null, null, null, null, null);
+        BlueprintContainerImpl container = new BlueprintContainerImpl(null, null, null, null, null, null, null, null, null, null);
         BeanRecipe recipe = new BeanRecipe("example", container, ExampleService.class, false);
         recipe.setArguments(Arrays.<Object>asList(new ExampleImpl()));
         recipe.setArgTypes(Arrays.<String>asList((String) null));
@@ -195,7 +195,7 @@ public class BeanRecipeTest {
 
     @Test
     public void protectedClassAccess() throws Exception {
-        BlueprintContainerImpl container = new BlueprintContainerImpl(null, null, null, null, null, null, null, null, null);
+        BlueprintContainerImpl container = new BlueprintContainerImpl(null, null, null, null, null, null, null, null, null, null);
         BeanRecipe recipe = new BeanRecipe("a", container, null, false);
         recipe.setFactoryComponent(new PassThroughRecipe("factory", new Factory().create()));
         recipe.setFactoryMethod("getA");

Modified: aries/branches/java6support/blueprint/blueprint-itests/pom.xml
URL: http://svn.apache.org/viewvc/aries/branches/java6support/blueprint/blueprint-itests/pom.xml?rev=1738981&r1=1738980&r2=1738981&view=diff
==============================================================================
--- aries/branches/java6support/blueprint/blueprint-itests/pom.xml (original)
+++ aries/branches/java6support/blueprint/blueprint-itests/pom.xml Wed Apr 13 18:41:23 2016
@@ -62,12 +62,12 @@
         <dependency>
             <groupId>org.apache.aries.blueprint</groupId>
             <artifactId>org.apache.aries.blueprint.core</artifactId>
-            <version>1.5.0-SNAPSHOT</version>
+            <version>1.6.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.aries.blueprint</groupId>
             <artifactId>blueprint-parser</artifactId>
-            <version>1.4.0-SNAPSHOT</version>
+            <version>1.5.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.aries.blueprint</groupId>
@@ -75,6 +75,16 @@
             <version>1.0.1-SNAPSHOT</version>
         </dependency>
         <dependency>
+            <groupId>org.apache.aries.blueprint</groupId>
+            <artifactId>org.apache.aries.blueprint.spring</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.aries.blueprint</groupId>
+            <artifactId>org.apache.aries.blueprint.spring.extender</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
             <groupId>org.apache.aries.proxy</groupId>
             <artifactId>org.apache.aries.proxy.impl</artifactId>
             <version>1.0.3</version>
@@ -188,6 +198,12 @@
         </dependency>
         <dependency>
             <groupId>org.apache.aries.blueprint</groupId>
+            <artifactId>org.apache.aries.blueprint.testbundlee</artifactId>
+            <scope>test</scope>
+            <version>1.0.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.aries.blueprint</groupId>
             <artifactId>org.apache.aries.blueprint.testbundles</artifactId>
             <scope>test</scope>
             <version>1.0.0-SNAPSHOT</version>

Modified: aries/branches/java6support/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/Helper.java
URL: http://svn.apache.org/viewvc/aries/branches/java6support/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/Helper.java?rev=1738981&r1=1738980&r2=1738981&view=diff
==============================================================================
--- aries/branches/java6support/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/Helper.java (original)
+++ aries/branches/java6support/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/Helper.java Wed Apr 13 18:41:23 2016
@@ -79,8 +79,7 @@ public class Helper {
                 mvnBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint.core", startBlueprint),
                 mvnBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint.cm", startBlueprint),
                 mvnBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint.annotation.api", startBlueprint),
-                mvnBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint.annotation.impl", startBlueprint),
-                mvnBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint.spring", startBlueprint)
+                mvnBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint.annotation.impl", startBlueprint)
         );
     }
 

Modified: aries/branches/java6support/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/SpringTest.java
URL: http://svn.apache.org/viewvc/aries/branches/java6support/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/SpringTest.java?rev=1738981&r1=1738980&r2=1738981&view=diff
==============================================================================
--- aries/branches/java6support/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/SpringTest.java (original)
+++ aries/branches/java6support/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/SpringTest.java Wed Apr 13 18:41:23 2016
@@ -61,6 +61,9 @@ public class SpringTest extends Abstract
         return new Option[] {
             baseOptions(),
             Helper.blueprintBundles(),
+            // Blueprint spring
+            mvnBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint.spring"),
+            // Spring
             mvnBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.aopalliance"),
             mvnBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.spring-core"),
             mvnBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.spring-context"),

Modified: aries/branches/java6support/blueprint/blueprint-maven-plugin/pom.xml
URL: http://svn.apache.org/viewvc/aries/branches/java6support/blueprint/blueprint-maven-plugin/pom.xml?rev=1738981&r1=1738980&r2=1738981&view=diff
==============================================================================
--- aries/branches/java6support/blueprint/blueprint-maven-plugin/pom.xml (original)
+++ aries/branches/java6support/blueprint/blueprint-maven-plugin/pom.xml Wed Apr 13 18:41:23 2016
@@ -31,7 +31,7 @@
     <groupId>org.apache.aries.blueprint</groupId>
     <artifactId>blueprint-maven-plugin</artifactId>
     <packaging>maven-plugin</packaging>
-    <version>1.3.0-SNAPSHOT</version>
+    <version>1.4.0-SNAPSHOT</version>
     <name>Apache Aries Blueprint Maven Plugin</name>
     <description>
         Maven plugin to create blueprint files from annotations
@@ -59,39 +59,40 @@
             </plugin>
         </plugins>
         <pluginManagement>
-        	<plugins>
-        		<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
-        		<plugin>
-        			<groupId>org.eclipse.m2e</groupId>
-        			<artifactId>lifecycle-mapping</artifactId>
-        			<version>1.0.0</version>
-        			<configuration>
-        				<lifecycleMappingMetadata>
-        					<pluginExecutions>
-        						<pluginExecution>
-        							<pluginExecutionFilter>
-        								<groupId>
-        									org.apache.maven.plugins
-        								</groupId>
-        								<artifactId>
-        									maven-plugin-plugin
-        								</artifactId>
-        								<versionRange>
-        									[3.2,)
-        								</versionRange>
-        								<goals>
-        									<goal>descriptor</goal>
-        								</goals>
-        							</pluginExecutionFilter>
-        							<action>
-        								<ignore />
-        							</action>
-        						</pluginExecution>
-        					</pluginExecutions>
-        				</lifecycleMappingMetadata>
-        			</configuration>
-        		</plugin>
-        	</plugins>
+            <plugins>
+                <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build 
+                    itself. -->
+                <plugin>
+                    <groupId>org.eclipse.m2e</groupId>
+                    <artifactId>lifecycle-mapping</artifactId>
+                    <version>1.0.0</version>
+                    <configuration>
+                        <lifecycleMappingMetadata>
+                            <pluginExecutions>
+                                <pluginExecution>
+                                    <pluginExecutionFilter>
+                                        <groupId>
+                                            org.apache.maven.plugins
+                                        </groupId>
+                                        <artifactId>
+                                            maven-plugin-plugin
+                                        </artifactId>
+                                        <versionRange>
+                                            [3.2,)
+                                        </versionRange>
+                                        <goals>
+                                            <goal>descriptor</goal>
+                                        </goals>
+                                    </pluginExecutionFilter>
+                                    <action>
+                                        <ignore />
+                                    </action>
+                                </pluginExecution>
+                            </pluginExecutions>
+                        </lifecycleMappingMetadata>
+                    </configuration>
+                </plugin>
+            </plugins>
         </pluginManagement>
     </build>
 
@@ -232,6 +233,7 @@
                 <version>2.9</version>
             </plugin>
         </plugins>
+
     </reporting>
 
 </project>

Modified: aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/FilteredClassFinder.java
URL: http://svn.apache.org/viewvc/aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/FilteredClassFinder.java?rev=1738981&r1=1738980&r2=1738981&view=diff
==============================================================================
--- aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/FilteredClassFinder.java (original)
+++ aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/FilteredClassFinder.java Wed Apr 13 18:41:23 2016
@@ -23,6 +23,7 @@ import java.util.Collection;
 import java.util.HashSet;
 import java.util.Set;
 
+import javax.inject.Named;
 import javax.inject.Singleton;
 
 import org.apache.xbean.finder.ClassFinder;
@@ -32,7 +33,7 @@ public class FilteredClassFinder {
     
     @SuppressWarnings("unchecked")
     public static Set<Class<?>> findClasses(ClassFinder finder, Collection<String> packageNames) {
-        return findClasses(finder, packageNames, new Class[]{Singleton.class, Component.class});
+        return findClasses(finder, packageNames, new Class[]{ Singleton.class, Component.class, Named.class});
     }
 
     public static Set<Class<?>> findClasses(ClassFinder finder, Collection<String> packageNames, Class<? extends Annotation>[] annotations) {

Modified: aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/GenerateMojo.java
URL: http://svn.apache.org/viewvc/aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/GenerateMojo.java?rev=1738981&r1=1738980&r2=1738981&view=diff
==============================================================================
--- aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/GenerateMojo.java (original)
+++ aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/GenerateMojo.java Wed Apr 13 18:41:23 2016
@@ -79,27 +79,35 @@ public class GenerateMojo extends Abstra
         }
         
         try {
-            String buildDir = project.getBuild().getDirectory();
-            String generatedDir = buildDir + "/generated-resources";
-            Resource resource = new Resource();
-            resource.setDirectory(generatedDir);
-            project.addResource(resource);
             ClassFinder finder = createProjectScopeFinder();
             
-            File file = new File(generatedDir, "OSGI-INF/blueprint/autowire.xml");
-            file.getParentFile().mkdirs();
-            System.out.println("Generating blueprint to " + file);
             Set<Class<?>> classes = FilteredClassFinder.findClasses(finder, scanPaths);
             Context context = new Context(classes);
             context.resolve();
-            OutputStream fos = buildContext.newFileOutputStream(file);
-            new Generator(context, fos, namespaces).generate();
-            fos.close();
+            if (context.getBeans().size() > 0) {
+                writeBlueprint(context);
+            }
         } catch (Exception e) {
             throw new MojoExecutionException("Error building commands help", e);
         }
     }
 
+    private void writeBlueprint(Context context) throws Exception {
+        String buildDir = project.getBuild().getDirectory();
+        String generatedDir = buildDir + "/generated-resources";
+        Resource resource = new Resource();
+        resource.setDirectory(generatedDir);
+        project.addResource(resource);
+
+        File file = new File(generatedDir, "OSGI-INF/blueprint/autowire.xml");
+        file.getParentFile().mkdirs();
+        System.out.println("Generating blueprint to " + file);
+
+        OutputStream fos = buildContext.newFileOutputStream(file);
+        new Generator(context, fos, namespaces).generate();
+        fos.close();
+    }
+
     private ClassFinder createProjectScopeFinder() throws MalformedURLException {
         List<URL> urls = new ArrayList<URL>();
 

Modified: aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/Generator.java
URL: http://svn.apache.org/viewvc/aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/Generator.java?rev=1738981&r1=1738980&r2=1738981&view=diff
==============================================================================
--- aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/Generator.java (original)
+++ aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/Generator.java Wed Apr 13 18:41:23 2016
@@ -22,6 +22,7 @@ import java.io.OutputStream;
 import java.lang.reflect.Field;
 import java.util.Arrays;
 import java.util.HashSet;
+import java.util.List;
 import java.util.Set;
 
 import javax.persistence.PersistenceContext;
@@ -44,7 +45,7 @@ public class Generator implements Proper
     public static final String NS_JPA2 = "http://aries.apache.org/xmlns/jpa/v2.0.0";
     public static final String NS_TX = "http://aries.apache.org/xmlns/transactions/v1.2.0";
     public static final String NS_TX2 = "http://aries.apache.org/xmlns/transactions/v2.0.0";
-    
+
     private Context context;
     private XMLStreamWriter writer;
     private Set<String> namespaces;
@@ -65,7 +66,7 @@ public class Generator implements Proper
             writer.writeCharacters("\n");
             writeBlueprint();
             writer.writeCharacters("\n");
-            
+
             if (namespaces.contains(NS_JPA2) && isJpaUsed()) {
                 writer.writeEmptyElement(NS_JPA2, "enable");
                 writer.writeCharacters("\n");
@@ -84,10 +85,10 @@ public class Generator implements Proper
                 writer.writeEndElement();
                 writer.writeCharacters("\n");
             }
-            
+
             new OsgiServiceRefWriter(writer).write(context.getServiceRefs());
             new OsgiServiceProviderWriter(writer).write(context.getBeans());
-            
+
             writer.writeEndElement();
             writer.writeCharacters("\n");
             writer.writeEndDocument();
@@ -101,7 +102,7 @@ public class Generator implements Proper
     private boolean isJpaUsed() {
         boolean jpaUsed = false;
         for (Bean bean : context.getBeans()) {
-        if (bean.persistenceFields.length > 0) {
+        if (bean.persistenceFields.size() > 0) {
             jpaUsed = true;
         }
         }
@@ -109,14 +110,12 @@ public class Generator implements Proper
     }
 
     private boolean isJtaUsed() {
-        boolean jtaUsed = false;
         for (Bean bean : context.getBeans()) {
-            if (bean.transactionDef != null) {
-                jtaUsed = true;
+            if (!bean.transactionDefs.isEmpty()) {
+                return true;
             }
-
         }
-        return jtaUsed;
+        return false;
     }
 
     private void writeBlueprint() throws XMLStreamException {
@@ -128,7 +127,7 @@ public class Generator implements Proper
             writer.writeNamespace(prefix, namespace);
         }
     }
-    
+
     private String getPrefixForNamesapace(String namespace) {
         if (namespace.contains("jpa")) {
             return "jpa";
@@ -143,6 +142,9 @@ public class Generator implements Proper
         writer.writeAttribute("id", bean.id);
         writer.writeAttribute("class", bean.clazz.getName());
         writer.writeAttribute("ext", NS_EXT, "field-injection", "true");
+        if (bean.isPrototype) {
+            writer.writeAttribute("scope", "prototype");
+        }
         if (bean instanceof ProducedBean) {
             writeFactory((ProducedBean)bean);
         }
@@ -153,15 +155,17 @@ public class Generator implements Proper
             writer.writeAttribute("destroy-method", bean.destroyMethod);
         }
         writer.writeCharacters("\n");
-        
+
         if (namespaces.contains(NS_TX)) {
-            writeTransactional(bean.transactionDef);
+            for (TransactionalDef transactionalDef : bean.transactionDefs) {
+                writeTransactional(transactionalDef);
+            }
         }
         if (namespaces.contains(NS_JPA)) {
             writePersistenceFields(bean.persistenceFields);
         }
     }
-    
+
     private void writeFactory(ProducedBean bean) throws XMLStreamException {
         writer.writeAttribute("factory-ref", bean.factoryBean.id);
         writer.writeAttribute("factory-method", bean.factoryMethod);
@@ -178,8 +182,8 @@ public class Generator implements Proper
         }
     }
 
-    
-    private void writePersistenceFields(Field[] fields) throws XMLStreamException {
+
+    private void writePersistenceFields(List<Field> fields) throws XMLStreamException {
         for (Field field : fields) {
             writePersistenceField(field);
         }

Modified: aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/OsgiServiceProviderWriter.java
URL: http://svn.apache.org/viewvc/aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/OsgiServiceProviderWriter.java?rev=1738981&r1=1738980&r2=1738981&view=diff
==============================================================================
--- aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/OsgiServiceProviderWriter.java (original)
+++ aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/OsgiServiceProviderWriter.java Wed Apr 13 18:41:23 2016
@@ -19,6 +19,7 @@
 package org.apache.aries.blueprint.plugin;
 
 import java.util.Collection;
+import java.util.List;
 
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamWriter;
@@ -28,6 +29,9 @@ import org.ops4j.pax.cdi.api.OsgiService
 import org.ops4j.pax.cdi.api.Properties;
 import org.ops4j.pax.cdi.api.Property;
 
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+
 public class OsgiServiceProviderWriter {
     private XMLStreamWriter writer;
 
@@ -40,30 +44,64 @@ public class OsgiServiceProviderWriter {
             write(bean);
         }
     }
-    
+
     public void write(Bean bean) throws XMLStreamException {
         OsgiServiceProvider serviceProvider = bean.clazz.getAnnotation(OsgiServiceProvider.class);
         if (serviceProvider == null) {
             return;
         }
-        if (serviceProvider.classes().length == 0) {
-            throw new IllegalArgumentException("Need to provide the interface class in the @OsgiServiceProvider(classes={...}) annotation on " + bean.clazz);
-        }
+
         Properties properties = bean.clazz.getAnnotation(Properties.class);
-        if (properties == null) {
+        List<String> interfaceNames = Lists.newArrayList();
+        for (Class<?> serviceIf : serviceProvider.classes()) {
+            interfaceNames.add(serviceIf.getName());
+        }
+
+        // If there are no properties to write and only one service attribute (either
+        // interface="MyServiceInterface" or auto-export="interfaces") then create an
+        // empty element
+        boolean writeEmptyElement = properties == null && interfaceNames.size() < 2;
+        if (writeEmptyElement) {
             writer.writeEmptyElement("service");
         } else {
             writer.writeStartElement("service");
         }
         writer.writeAttribute("ref", bean.id);
-        Class<?> serviceIf = serviceProvider.classes()[0];
-        writer.writeAttribute("interface", serviceIf.getName());
+
+        if (interfaceNames.size() == 0) {
+            writer.writeAttribute("auto-export", "interfaces");
+        } else if (interfaceNames.size() == 1) {
+            writer.writeAttribute("interface", Iterables.getOnlyElement(interfaceNames));
+        } else {
+            writeInterfacesElement(interfaceNames);
+        }
+
         writer.writeCharacters("\n");
         if (properties != null) {
             writeProperties(properties);
+        }
+
+        if (!writeEmptyElement) {
+            writer.writeEndElement();
+            writer.writeCharacters("\n");
+        }
+    }
+
+    private void writeInterfacesElement(Iterable<String> interfaceNames) throws XMLStreamException
+    {
+        writer.writeCharacters("\n");
+        writer.writeCharacters("    ");
+        writer.writeStartElement("interfaces");
+        writer.writeCharacters("\n");
+        for (String interfaceName : interfaceNames) {
+            writer.writeCharacters("        ");
+            writer.writeStartElement("value");
+            writer.writeCharacters(interfaceName);
             writer.writeEndElement();
             writer.writeCharacters("\n");
         }
+        writer.writeCharacters("    ");
+        writer.writeEndElement();
     }
 
     private void writeProperties(Properties properties) throws XMLStreamException {

Modified: aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/Bean.java
URL: http://svn.apache.org/viewvc/aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/Bean.java?rev=1738981&r1=1738980&r2=1738981&view=diff
==============================================================================
--- aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/Bean.java (original)
+++ aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/Bean.java Wed Apr 13 18:41:23 2016
@@ -18,70 +18,64 @@
  */
 package org.apache.aries.blueprint.plugin.model;
 
-import java.lang.annotation.Annotation;
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
-import java.util.ArrayList;
+import java.util.HashSet;
 import java.util.List;
+import java.util.Set;
 import java.util.SortedSet;
 import java.util.TreeSet;
 
 import javax.annotation.PostConstruct;
 import javax.annotation.PreDestroy;
+import javax.inject.Inject;
+import javax.inject.Singleton;
 import javax.persistence.PersistenceContext;
 import javax.persistence.PersistenceUnit;
 
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+
 public class Bean extends BeanRef {
     public String initMethod;
     public String destroyMethod;
     public SortedSet<Property> properties;
-    public Field[] persistenceFields;
-    public TransactionalDef transactionDef;
+    public List<Field> persistenceFields;
+    public Set<TransactionalDef> transactionDefs = new HashSet<TransactionalDef>();
+    public boolean isPrototype;
 
     public Bean(Class<?> clazz) {
         super(clazz, BeanRef.getBeanName(clazz));
+        Introspector introspector = new Introspector(clazz);
 
-        for (Method method : clazz.getDeclaredMethods()) {
-            PostConstruct postConstruct = getEffectiveAnnotation(method, PostConstruct.class);
-            if (postConstruct != null) {
-                this.initMethod = method.getName();
-            }
-            PreDestroy preDestroy = getEffectiveAnnotation(method, PreDestroy.class);
-            if (preDestroy != null) {
-                this.destroyMethod = method.getName();
-            }
+        // Init method
+        Method initMethod = introspector.methodWith(PostConstruct.class);
+        if (initMethod != null) {
+            this.initMethod = initMethod.getName();
         }
-        this.persistenceFields = getPersistenceFields();
-        this.transactionDef = new JavaxTransactionFactory().create(clazz);
-        if (this.transactionDef == null) {
-            this.transactionDef = new SpringTransactionFactory().create(clazz);
+
+        // Destroy method
+        Method destroyMethod = introspector.methodWith(PreDestroy.class);
+        if (destroyMethod != null) {
+            this.destroyMethod = destroyMethod.getName();
         }
+
+        // Transactional methods
+        transactionDefs.addAll(new JavaxTransactionFactory().create(clazz));
+        transactionDefs.addAll(new SpringTransactionFactory().create(clazz));
+        this.isPrototype = isPrototype(clazz);
+        this.persistenceFields = introspector.fieldsWith(PersistenceContext.class, PersistenceUnit.class);
         properties = new TreeSet<Property>();
     }
 
-    private Field[] getPersistenceFields() {
-        List<Field> persistenceFields = new ArrayList<Field>();
-        Field[] fields = clazz.getDeclaredFields();
-        for (Field field : fields) {
-            PersistenceContext persistenceContext = field.getAnnotation(PersistenceContext.class);
-            PersistenceUnit persistenceUnit = field.getAnnotation(PersistenceUnit.class);
-            if (persistenceContext !=null || persistenceUnit != null) {
-                 persistenceFields.add(field);
-            }
-        }
-        return persistenceFields.toArray(new Field[]{});
+    private boolean isPrototype(Class<?> clazz)
+    {
+        return clazz.getAnnotation(Singleton.class) == null && clazz.getAnnotation(Component.class) == null;
     }
-    
+
     public void resolve(Matcher matcher) {
-        Class<?> curClass = this.clazz;
-        while (curClass != null && curClass != Object.class) {
-            resolveProperties(matcher, curClass);
-            curClass = curClass.getSuperclass();
-        }
-    }
-    
-    private void resolveProperties(Matcher matcher, Class<?> curClass) {
-        for (Field field : curClass.getDeclaredFields()) {
+        for (Field field : new Introspector(clazz).fieldsWith(Value.class, Autowired.class, Inject.class)) {
             Property prop = Property.create(matcher, field);
             if (prop != null) {
                 properties.add(prop);
@@ -89,44 +83,6 @@ public class Bean extends BeanRef {
         }
     }
 
-    private static <T extends Annotation> T getEffectiveAnnotation(Method method, Class<T> annotationClass) {
-        final Class<?> methodClass = method.getDeclaringClass();
-        final String name = method.getName();
-        final Class<?>[] params = method.getParameterTypes();
-
-        // 1. Current class
-        final T rootAnnotation = method.getAnnotation(annotationClass);
-        if (rootAnnotation != null) {
-            return rootAnnotation;
-        }
-
-        // 2. Superclass
-        final Class<?> superclass = methodClass.getSuperclass();
-        if (superclass != null) {
-            final T annotation = getMethodAnnotation(superclass, name, params, annotationClass);
-            if (annotation != null)
-                return annotation;
-        }
-
-        // 3. Interfaces
-        for (final Class<?> intfs : methodClass.getInterfaces()) {
-            final T annotation = getMethodAnnotation(intfs, name, params, annotationClass);
-            if (annotation != null)
-                return annotation;
-        }
-
-        return null;
-    }
-
-    private static <T extends Annotation> T getMethodAnnotation(Class<?> searchClass, String name, Class<?>[] params,
-            Class<T> annotationClass) {
-        try {
-            Method method = searchClass.getMethod(name, params);
-            return getEffectiveAnnotation(method, annotationClass);
-        } catch (NoSuchMethodException e) {
-            return null;
-        }
-    }
 
 
     @Override
@@ -148,5 +104,5 @@ public class Bean extends BeanRef {
             writer.writeProperty(property);
         }
     }
-    
+
 }

Modified: aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/Context.java
URL: http://svn.apache.org/viewvc/aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/Context.java?rev=1738981&r1=1738980&r2=1738981&view=diff
==============================================================================
--- aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/Context.java (original)
+++ aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/Context.java Wed Apr 13 18:41:23 2016
@@ -79,11 +79,8 @@ public class Context implements Matcher
     }
 
     private void addServiceRefs(Class<?> clazz) {
-        for (Field field : clazz.getDeclaredFields()) {
-            OsgiService osgiService = field.getAnnotation(OsgiService.class);
-            if (osgiService != null) {
-                reg.add(new OsgiServiceRef(field));
-            }
+        for (Field field : new Introspector(clazz).fieldsWith(OsgiService.class)) {
+            reg.add(new OsgiServiceRef(field));
         }
     }
 
@@ -92,7 +89,7 @@ public class Context implements Matcher
             bean.resolve(this);
         }
     }
-    
+
     public BeanRef getMatching(BeanRef template) {
         for (BeanRef bean : reg) {
             if (bean.matches(template)) {

Modified: aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/JavaxTransactionFactory.java
URL: http://svn.apache.org/viewvc/aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/JavaxTransactionFactory.java?rev=1738981&r1=1738980&r2=1738981&view=diff
==============================================================================
--- aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/JavaxTransactionFactory.java (original)
+++ aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/JavaxTransactionFactory.java Wed Apr 13 18:41:23 2016
@@ -23,7 +23,9 @@ import java.util.HashMap;
 import javax.transaction.Transactional;
 import javax.transaction.Transactional.TxType;
 
-public class JavaxTransactionFactory {
+import com.google.common.base.CaseFormat;
+
+public class JavaxTransactionFactory extends AbstractTransactionalFactory<Transactional> {
     private static HashMap<TxType, String> txTypeNames;
 
     static {
@@ -31,10 +33,16 @@ public class JavaxTransactionFactory {
         txTypeNames.put(TxType.REQUIRED, TransactionalDef.TYPE_REQUIRED);
         txTypeNames.put(TxType.REQUIRES_NEW, TransactionalDef.TYPE_REQUIRES_NEW);
     }
-    
-    TransactionalDef create(Class<?> clazz) {
-        Transactional transactional = clazz.getAnnotation(Transactional.class);
-        return transactional != null ? 
-                new TransactionalDef("*", txTypeNames.get(transactional.value())) : null;
+
+    @Override
+    public String getTransactionTypeName(Transactional transactional)
+    {
+        return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, transactional.value().name());
+    }
+
+    @Override
+    public Class<Transactional> getTransactionalClass()
+    {
+        return Transactional.class;
     }
 }

Modified: aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/SpringTransactionFactory.java
URL: http://svn.apache.org/viewvc/aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/SpringTransactionFactory.java?rev=1738981&r1=1738980&r2=1738981&view=diff
==============================================================================
--- aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/SpringTransactionFactory.java (original)
+++ aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/SpringTransactionFactory.java Wed Apr 13 18:41:23 2016
@@ -18,23 +18,25 @@
  */
 package org.apache.aries.blueprint.plugin.model;
 
-import java.util.HashMap;
-
 import org.springframework.transaction.annotation.Propagation;
 import org.springframework.transaction.annotation.Transactional;
 
-public class SpringTransactionFactory {
-    private static HashMap<Propagation, String> txTypeNames;
+import com.google.common.base.CaseFormat;
 
-    static {
-        txTypeNames = new HashMap<Propagation, String>();
-        txTypeNames.put(Propagation.REQUIRED, TransactionalDef.TYPE_REQUIRED);
-        txTypeNames.put(Propagation.REQUIRES_NEW, TransactionalDef.TYPE_REQUIRES_NEW);
+public class SpringTransactionFactory extends AbstractTransactionalFactory<Transactional> {
+    @Override
+    public String getTransactionTypeName(Transactional transactional)
+    {
+        Propagation propagation = transactional.propagation();
+        if (propagation == Propagation.NESTED) {
+            throw new UnsupportedOperationException("Nested transactions not supported");
+        }
+        return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, propagation.name());
     }
 
-    TransactionalDef create(Class<?> clazz) {
-        Transactional transactional = clazz.getAnnotation(Transactional.class);
-        return transactional != null ? 
-                new TransactionalDef("*", txTypeNames.get(transactional.propagation())) : null;
+    @Override
+    public Class<Transactional> getTransactionalClass()
+    {
+        return Transactional.class;
     }
 }

Modified: aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/TransactionalDef.java
URL: http://svn.apache.org/viewvc/aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/TransactionalDef.java?rev=1738981&r1=1738980&r2=1738981&view=diff
==============================================================================
--- aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/TransactionalDef.java (original)
+++ aries/branches/java6support/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/TransactionalDef.java Wed Apr 13 18:41:23 2016
@@ -18,13 +18,14 @@
  */
 package org.apache.aries.blueprint.plugin.model;
 
+import com.google.common.base.Objects;
 
 public class TransactionalDef {
     public static final String TYPE_REQUIRED = "Required";
     public static final String TYPE_REQUIRES_NEW = "RequiresNew";
     private String method;
     private String type;
-    
+
     public TransactionalDef(String method, String type) {
         this.method = method;
         this.type = type;
@@ -33,8 +34,35 @@ public class TransactionalDef {
     public String getMethod() {
         return method;
     }
-    
+
     public String getType() {
         return type;
     }
+
+    @Override
+    public boolean equals(Object o)
+    {
+        if (this == o)
+        {
+            return true;
+        }
+        if (o == null || getClass() != o.getClass())
+        {
+            return false;
+        }
+        TransactionalDef that = (TransactionalDef) o;
+        return Objects.equal(method, that.method) && Objects.equal(type, that.type);
+    }
+
+    @Override
+    public int hashCode()
+    {
+        return Objects.hashCode(method, type);
+    }
+
+    @Override
+    public String toString()
+    {
+        return Objects.toStringHelper(this).add("method", method).add("type", type).toString();
+    }
 }



Mime
View raw message