aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject 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
Date Thu, 08 Mar 2012 14:22:17 GMT
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>



Mime
View raw message