geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwo...@apache.org
Subject svn commit: r1146683 - /geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/EmbeddedDaemon.java
Date Thu, 14 Jul 2011 13:13:57 GMT
Author: rwonly
Date: Thu Jul 14 13:13:57 2011
New Revision: 1146683

URL: http://svn.apache.org/viewvc?rev=1146683&view=rev
Log:
GEGERONIMO-5764 try start all the "resolved" bundle after Geronimo modules started. This is
a work around for a bundle recorded in startup.properties and depends on some geronimo plugin
bundles. Even we set its startlevel higher than 60, it still can not start correctly after
a clean cache. This could be deleted after we smooth out geronimo life cycle with osgi.

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

Modified: geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/EmbeddedDaemon.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/EmbeddedDaemon.java?rev=1146683&r1=1146682&r2=1146683&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/EmbeddedDaemon.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/EmbeddedDaemon.java
Thu Jul 14 13:13:57 2011
@@ -42,7 +42,9 @@ import org.apache.geronimo.kernel.config
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.util.FileUtils;
 import org.apache.geronimo.kernel.util.Main;
+import org.apache.xbean.osgi.bundle.util.BundleUtils;
 import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -263,6 +265,22 @@ public class EmbeddedDaemon implements M
             e.printStackTrace();
             return 1;
         }
+        
+        // Because currently we start Geronimo bundles out of the osgi framework life cycle,
+        // so there might be some bundles, which depends on geronimo bundles, can not be
resovled during osgi framework launch.
+        // we need re-try start it after geronimo start.
+        // This could be deleted after we smooth out geronimo life cycle with osgi.
+        for (Bundle b : bundle.getBundleContext().getBundles()) {
+            if (BundleUtils.canStart(b)) {
+                try {
+                    b.start(Bundle.START_TRANSIENT);
+                } catch (BundleException e) {
+                    log.warn("Bundle: " + bundle.getBundleId() + "can not start" + e.getMessage());
+                }
+            }
+        }
+        
+        
         return 0;
     }
 



Mime
View raw message