aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject svn commit: r1299638 - in /aries/trunk/spi-fly: spi-fly-core/src/main/java/org/apache/aries/spifly/api/ spi-fly-core/src/test/java/org/apache/aries/spifly/ spi-fly-examples/spi-fly-example-client2-bundle/ spi-fly-examples/spi-fly-example-provider2-bundle/
Date Mon, 12 Mar 2012 11:48:05 GMT
Author: davidb
Date: Mon Mar 12 11:48:04 2012
New Revision: 1299638

URL: http://svn.apache.org/viewvc?rev=1299638&view=rev
Log:
Update ServiceLoader to the latest API.

Modified:
    aries/trunk/spi-fly/spi-fly-core/src/main/java/org/apache/aries/spifly/api/SpiFlyConstants.java
    aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/ProviderBundleTrackerCustomizerGenericCapabilityTest.java
    aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-client2-bundle/pom.xml
    aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider2-bundle/pom.xml

Modified: aries/trunk/spi-fly/spi-fly-core/src/main/java/org/apache/aries/spifly/api/SpiFlyConstants.java
URL: http://svn.apache.org/viewvc/aries/trunk/spi-fly/spi-fly-core/src/main/java/org/apache/aries/spifly/api/SpiFlyConstants.java?rev=1299638&r1=1299637&r2=1299638&view=diff
==============================================================================
--- aries/trunk/spi-fly/spi-fly-core/src/main/java/org/apache/aries/spifly/api/SpiFlyConstants.java
(original)
+++ aries/trunk/spi-fly/spi-fly-core/src/main/java/org/apache/aries/spifly/api/SpiFlyConstants.java
Mon Mar 12 11:48:04 2012
@@ -38,8 +38,8 @@ public interface SpiFlyConstants {
     String SERVICELOADER_URL_PROPERTY = "serviceloader.url";
 
     // The names of the extenders involved
-    String PROCESSOR_EXTENDER_NAME = "serviceloader.processor";
-    String REGISTRAR_EXTENDER_NAME = "serviceloader.registrar";
+    String PROCESSOR_EXTENDER_NAME = "osgi.serviceloader.processor";
+    String REGISTRAR_EXTENDER_NAME = "osgi.serviceloader.registrar";
 
     // Pre-baked requirements for consumer and provider
     String CLIENT_REQUIREMENT = EXTENDER_CAPABILITY_NAMESPACE + "; " + FILTER_DIRECTIVE +

Modified: aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/ProviderBundleTrackerCustomizerGenericCapabilityTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/ProviderBundleTrackerCustomizerGenericCapabilityTest.java?rev=1299638&r1=1299637&r2=1299638&view=diff
==============================================================================
--- aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/ProviderBundleTrackerCustomizerGenericCapabilityTest.java
(original)
+++ aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/ProviderBundleTrackerCustomizerGenericCapabilityTest.java
Mon Mar 12 11:48:04 2012
@@ -112,8 +112,7 @@ public class ProviderBundleTrackerCustom
         Dictionary<String, String> headers = new Hashtable<String, String>();
         headers.put(SpiFlyConstants.REQUIRE_CAPABILITY, SpiFlyConstants.PROVIDER_REQUIREMENT);
         headers.put(SpiFlyConstants.PROVIDE_CAPABILITY, SpiFlyConstants.SERVICELOADER_CAPABILITY_NAMESPACE
+ "; " +
-                SpiFlyConstants.SERVICELOADER_CAPABILITY_NAMESPACE + "=org.apache.aries.mytest.MySPI;
approval=yeah; " +
-                SpiFlyConstants.REGISTER_DIRECTIVE + ":=*");
+                SpiFlyConstants.SERVICELOADER_CAPABILITY_NAMESPACE + "=org.apache.aries.mytest.MySPI;
approval=yeah; ");
         Bundle implBundle = mockSPIBundle(implBC, headers);
 
         List<ServiceRegistration> registrations = customizer.addingBundle(implBundle,
null);

Modified: aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-client2-bundle/pom.xml
URL: http://svn.apache.org/viewvc/aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-client2-bundle/pom.xml?rev=1299638&r1=1299637&r2=1299638&view=diff
==============================================================================
--- aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-client2-bundle/pom.xml (original)
+++ aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-client2-bundle/pom.xml Mon Mar 12
11:48:04 2012
@@ -65,7 +65,7 @@
                             org.apache.aries.spifly.examples.client2.impl
                         </Private-Package>
                         <Bundle-Activator>org.apache.aries.spifly.examples.client2.impl.Activator</Bundle-Activator>
-                        <Require-Capability>osgi.extender; filter:="(osgi.extender=serviceloader.processor)"</Require-Capability>
+                        <Require-Capability>osgi.serviceloader; filter:="(osgi.serviceloader=org.apache.aries.spifly.mysvc.SPIProvider)";cardinality:=multiple,osgi.extender;
filter:="(osgi.extender=osgi.serviceloader.processor)"</Require-Capability>
                     </instructions>
                 </configuration>
             </plugin>

Modified: aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider2-bundle/pom.xml
URL: http://svn.apache.org/viewvc/aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider2-bundle/pom.xml?rev=1299638&r1=1299637&r2=1299638&view=diff
==============================================================================
--- aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider2-bundle/pom.xml (original)
+++ aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider2-bundle/pom.xml Mon Mar
12 11:48:04 2012
@@ -59,7 +59,7 @@
                         <Private-Package>
                             org.apache.aries.spifly.mysvc.impl2
                         </Private-Package>
-                        <Require-Capability>osgi.extender; filter:="(osgi.extender=serviceloader.registrar)"</Require-Capability>
+                        <Require-Capability>osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)"</Require-Capability>
                         <Provide-Capability>osgi.serviceloader; osgi.serviceloader=org.apache.aries.spifly.mysvc.SPIProvider</Provide-Capability>
                     </instructions>
                 </configuration>



Mime
View raw message