Author: jm
Date: 2012-10-03 12:33:29 -0700 (Wed, 03 Oct 2012)
New Revision: 30599

Modified:
   
core3/gui-distribution/trunk/assembly/src/main/resources/etc/custom.properties
   
core3/gui-distribution/trunk/assembly/src/main/resources/etc/org.apache.felix.fileinstall-deploy.cfg
   
core3/support/trunk/splash-updater-impl/src/main/java/org/cytoscape/splash/internal/SplashManipulator.java
Log:
References #1494: Added workaround for issues with bundle loading order when 
starting Cy3 with an empty bundle cache.

Modified: 
core3/gui-distribution/trunk/assembly/src/main/resources/etc/custom.properties
===================================================================
--- 
core3/gui-distribution/trunk/assembly/src/main/resources/etc/custom.properties  
    2012-10-03 19:31:51 UTC (rev 30598)
+++ 
core3/gui-distribution/trunk/assembly/src/main/resources/etc/custom.properties  
    2012-10-03 19:33:29 UTC (rev 30599)
@@ -1,5 +1,4 @@
 karaf.systemBundlesStartLevel=99
 karaf.startlevel.bundle=200
-org.osgi.framework.startlevel.beginning=200
 org.osgi.framework.system.packages.extra = 
org.apache.karaf.branding,org.cytoscape.launcher.internal,com.sun.xml.internal.bind,com.apple.eawt;
 org.osgi.framework.bootdelegation=org.netbeans.lib.profiler.*
\ No newline at end of file

Modified: 
core3/gui-distribution/trunk/assembly/src/main/resources/etc/org.apache.felix.fileinstall-deploy.cfg
===================================================================
--- 
core3/gui-distribution/trunk/assembly/src/main/resources/etc/org.apache.felix.fileinstall-deploy.cfg
        2012-10-03 19:31:51 UTC (rev 30598)
+++ 
core3/gui-distribution/trunk/assembly/src/main/resources/etc/org.apache.felix.fileinstall-deploy.cfg
        2012-10-03 19:33:29 UTC (rev 30599)
@@ -1,3 +1,4 @@
 felix.fileinstall.dir = ${user.home}/CytoscapeConfiguration/3/apps/installed
 felix.fileinstall.tmpdir  = ${karaf.data}/generated-bundles
 felix.fileinstall.poll    = 1000
+felix.fileinstall.active.level = 200
\ No newline at end of file

Modified: 
core3/support/trunk/splash-updater-impl/src/main/java/org/cytoscape/splash/internal/SplashManipulator.java
===================================================================
--- 
core3/support/trunk/splash-updater-impl/src/main/java/org/cytoscape/splash/internal/SplashManipulator.java
  2012-10-03 19:31:51 UTC (rev 30598)
+++ 
core3/support/trunk/splash-updater-impl/src/main/java/org/cytoscape/splash/internal/SplashManipulator.java
  2012-10-03 19:33:29 UTC (rev 30599)
@@ -13,6 +13,8 @@
 import org.osgi.framework.BundleListener;
 import org.osgi.framework.FrameworkEvent;
 import org.osgi.framework.FrameworkListener;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.startlevel.StartLevel;
 
 public class SplashManipulator implements
        BundleListener,
@@ -30,6 +32,8 @@
        resolved = new HashSet<Long>();
        started = new HashSet<Long>();
        
+       applyStartLevelHack();
+       
        for (Bundle bundle : context.getBundles()) {
                long id = bundle.getBundleId();
                resolved.add(id);
@@ -46,7 +50,16 @@
                font = new Font(Font.MONOSPACED,Font.PLAIN,12);
        }
 
-    public void bundleChanged(BundleEvent event) {
+    private void applyStartLevelHack() {
+       // See ticket #1494.  This hack needs to remain in place until Karaf
+       // is patched.
+       ServiceReference reference = 
context.getServiceReference(StartLevel.class.getName());
+       StartLevel level = (StartLevel) context.getService(reference);
+       level.setStartLevel(200);
+       context.ungetService(reference);
+       }
+
+       public void bundleChanged(BundleEvent event) {
                if ( event.getType() == BundleEvent.RESOLVED )
                        resolved.add(event.getBundle().getBundleId());
                

-- 
You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cytoscape-cvs?hl=en.

Reply via email to