felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r802687 - /felix/trunk/karaf/features/core/src/main/java/org/apache/felix/karaf/features/internal/FeaturesServiceImpl.java
Date Mon, 10 Aug 2009 08:14:38 GMT
Author: gnodet
Date: Mon Aug 10 08:14:37 2009
New Revision: 802687

URL: http://svn.apache.org/viewvc?rev=802687&view=rev
Log:
FELIX-1133: Allow usage of fragments in Karaf features

Modified:
    felix/trunk/karaf/features/core/src/main/java/org/apache/felix/karaf/features/internal/FeaturesServiceImpl.java

Modified: felix/trunk/karaf/features/core/src/main/java/org/apache/felix/karaf/features/internal/FeaturesServiceImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/karaf/features/core/src/main/java/org/apache/felix/karaf/features/internal/FeaturesServiceImpl.java?rev=802687&r1=802686&r2=802687&view=diff
==============================================================================
--- felix/trunk/karaf/features/core/src/main/java/org/apache/felix/karaf/features/internal/FeaturesServiceImpl.java
(original)
+++ felix/trunk/karaf/features/core/src/main/java/org/apache/felix/karaf/features/internal/FeaturesServiceImpl.java
Mon Aug 10 08:14:37 2009
@@ -211,7 +211,13 @@
             bundles.add(b.getBundleId());
         }
         for (long id : bundles) {
-            bundleContext.getBundle(id).start();
+            Bundle b = bundleContext.getBundle(id);
+            // do not start fragment bundles.
+            Dictionary d = b.getHeaders();
+            String fragmentHostHeader = (String) d.get(Constants.FRAGMENT_HOST);
+            if (fragmentHostHeader == null || fragmentHostHeader.trim().length() == 0) {
+                b.start();
+            }
         }
 
         callListeners(new FeatureEvent(f, FeatureEvent.EventType.FeatureInstalled, false));



Mime
View raw message