incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i..@apache.org
Subject svn commit: r940718 - /sling/trunk/bundles/extensions/fsresource/src/main/java/org/apache/sling/fsprovider/internal/FsResourceProvider.java
Date Tue, 04 May 2010 02:49:34 GMT
Author: ieb
Date: Tue May  4 02:49:33 2010
New Revision: 940718

URL: http://svn.apache.org/viewvc?rev=940718&view=rev
Log:
SLING-1516 Fixed by looking for a factory pid on activation.

Modified:
    sling/trunk/bundles/extensions/fsresource/src/main/java/org/apache/sling/fsprovider/internal/FsResourceProvider.java

Modified: sling/trunk/bundles/extensions/fsresource/src/main/java/org/apache/sling/fsprovider/internal/FsResourceProvider.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/fsresource/src/main/java/org/apache/sling/fsprovider/internal/FsResourceProvider.java?rev=940718&r1=940717&r2=940718&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/fsresource/src/main/java/org/apache/sling/fsprovider/internal/FsResourceProvider.java
(original)
+++ sling/trunk/bundles/extensions/fsresource/src/main/java/org/apache/sling/fsprovider/internal/FsResourceProvider.java
Tue May  4 02:49:33 2010
@@ -201,6 +201,13 @@ public class FsResourceProvider implemen
 
     protected void activate(BundleContext bundleContext, Map<?, ?> props) {
 
+        String serviceFactoryPid = (String) props.get("service.factoryPid");
+        if ( serviceFactoryPid == null ) {
+            // this is the activate for the Alias PID and not the configured service, therefore
we should not
+            // do anything here, see OSGi 4.2 compendium v1.1 section 115.3.1 for more details.
+            return;
+        }
+
         String providerRoot = (String) props.get(ROOTS);
         if (providerRoot == null || providerRoot.length() == 0) {
             throw new IllegalArgumentException(ROOTS + " property must be set");



Mime
View raw message