geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwo...@apache.org
Subject svn commit: r1145896 - /geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/main/FrameworkLauncher.java
Date Wed, 13 Jul 2011 07:42:32 GMT
Author: rwonly
Date: Wed Jul 13 07:42:32 2011
New Revision: 1145896

URL: http://svn.apache.org/viewvc?rev=1145896&view=rev
Log:
GERONIMO-5764 should not start the fragment bundle

Modified:
    geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/main/FrameworkLauncher.java

Modified: geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/main/FrameworkLauncher.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/main/FrameworkLauncher.java?rev=1145896&r1=1145895&r2=1145896&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/main/FrameworkLauncher.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/main/FrameworkLauncher.java
Wed Jul 13 07:42:32 2011
@@ -44,6 +44,7 @@ import org.osgi.framework.Constants;
 import org.osgi.framework.FrameworkEvent;
 import org.osgi.framework.launch.Framework;
 import org.osgi.framework.launch.FrameworkFactory;
+import org.osgi.service.packageadmin.PackageAdmin;
 import org.osgi.service.startlevel.StartLevel;
 
 public class FrameworkLauncher {
@@ -353,8 +354,14 @@ public class FrameworkLauncher {
             info.bundle = bundle;
         }
         
+
+        // Retrieve the PackageAdmin service
+        PackageAdmin pa = (PackageAdmin) context.getService(context.getServiceReference(PackageAdmin.class.getName()));
+                
         for (BundleInfo info : startList) {
-            info.bundle.start();
+            if (pa.getBundleType(info.bundle) != PackageAdmin.BUNDLE_TYPE_FRAGMENT) { //Fragment
bundle can not start
+                 info.bundle.start();
+            } 
         }
         
     }



Mime
View raw message