You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aries.apache.org by da...@apache.org on 2012/03/08 15:22:17 UTC

svn commit: r1298405 - in /aries/trunk/spi-fly: spi-fly-core/src/main/java/org/apache/aries/spifly/ProviderBundleTrackerCustomizer.java spi-fly-examples/spi-fly-example-client2-bundle/pom.xml spi-fly-examples/spi-fly-example-provider2-bundle/pom.xml

Author: davidb
Date: Thu Mar  8 14:22:17 2012
New Revision: 1298405

URL: http://svn.apache.org/viewvc?rev=1298405&view=rev
Log:
Update the examples to work with the new capabilities. 

Also: small fix in ProviderBundleTrackerCustomizer.

Modified:
    aries/trunk/spi-fly/spi-fly-core/src/main/java/org/apache/aries/spifly/ProviderBundleTrackerCustomizer.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/ProviderBundleTrackerCustomizer.java
URL: http://svn.apache.org/viewvc/aries/trunk/spi-fly/spi-fly-core/src/main/java/org/apache/aries/spifly/ProviderBundleTrackerCustomizer.java?rev=1298405&r1=1298404&r2=1298405&view=diff
==============================================================================
--- aries/trunk/spi-fly/spi-fly-core/src/main/java/org/apache/aries/spifly/ProviderBundleTrackerCustomizer.java (original)
+++ aries/trunk/spi-fly/spi-fly-core/src/main/java/org/apache/aries/spifly/ProviderBundleTrackerCustomizer.java Thu Mar  8 14:22:17 2012
@@ -66,9 +66,11 @@ public class ProviderBundleTrackerCustom
         log(LogService.LOG_INFO, "Bundle Considered for SPI providers: "
                 + bundle.getSymbolicName());
 
-        if (bundle.equals(spiBundle)) {
-            return null;
-        }
+        if (bundle.getBundleId() == 0)
+            return null; // don't process the system bundle
+
+        if (bundle.equals(spiBundle))
+            return null; // don't process the SPI bundle itself
 
         List<String> providedServices = null;
         Map<String, Object> customAttributes = new HashMap<String, Object>();

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=1298405&r1=1298404&r2=1298405&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 Thu Mar  8 14:22:17 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; osgi.extender=serviceloader.processor</Require-Capability>
+                        <Require-Capability>osgi.extender; filter:="(osgi.extender=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=1298405&r1=1298404&r2=1298405&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 Thu Mar  8 14:22:17 2012
@@ -59,7 +59,8 @@
                         <Private-Package>
                             org.apache.aries.spifly.mysvc.impl2
                         </Private-Package>
-                        <Require-Capability>osgi.extender; osgi.extender=serviceloader.registrar</Require-Capability>
+                        <Require-Capability>osgi.extender; filter:="(osgi.extender=serviceloader.registrar)"</Require-Capability>
+                        <Provide-Capability>osgi.serviceloader; osgi.serviceloader=org.apache.aries.spifly.mysvc.SPIProvider</Provide-Capability>
                     </instructions>
                 </configuration>
             </plugin>