felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r705298 - in /felix/trunk/main/src/main/java/org/apache/felix/main: AutoActivator.java Main.java
Date Thu, 16 Oct 2008 18:00:40 GMT
Author: rickhall
Date: Thu Oct 16 11:00:39 2008
New Revision: 705298

URL: http://svn.apache.org/viewvc?rev=705298&view=rev
Log:
Minor modifications to improve main and align it wit the new API. (FELIX-753)

Modified:
    felix/trunk/main/src/main/java/org/apache/felix/main/AutoActivator.java
    felix/trunk/main/src/main/java/org/apache/felix/main/Main.java

Modified: felix/trunk/main/src/main/java/org/apache/felix/main/AutoActivator.java
URL: http://svn.apache.org/viewvc/felix/trunk/main/src/main/java/org/apache/felix/main/AutoActivator.java?rev=705298&r1=705297&r2=705298&view=diff
==============================================================================
--- felix/trunk/main/src/main/java/org/apache/felix/main/AutoActivator.java (original)
+++ felix/trunk/main/src/main/java/org/apache/felix/main/AutoActivator.java Thu Oct 16 11:00:39
2008
@@ -88,7 +88,7 @@
         // level is assumed.
         for (Iterator i = m_configMap.keySet().iterator(); i.hasNext(); )
         {
-            String key = (String) i.next();
+            String key = ((String) i.next()).toLowerCase();
 
             // Ignore all keys that are not an auto property.
             if (!key.startsWith(AUTO_INSTALL_PROP) && !key.startsWith(AUTO_START_PROP))
@@ -131,7 +131,7 @@
         // Now loop through the auto-start bundles and start them.
         for (Iterator i = m_configMap.keySet().iterator(); i.hasNext(); )
         {
-            String key = (String) i.next();
+            String key = ((String) i.next()).toLowerCase();
             if (key.startsWith(AUTO_START_PROP))
             {
                 StringTokenizer st = new StringTokenizer((String) m_configMap.get(key), "\"
", true);

Modified: felix/trunk/main/src/main/java/org/apache/felix/main/Main.java
URL: http://svn.apache.org/viewvc/felix/trunk/main/src/main/java/org/apache/felix/main/Main.java?rev=705298&r1=705297&r2=705298&view=diff
==============================================================================
--- felix/trunk/main/src/main/java/org/apache/felix/main/Main.java (original)
+++ felix/trunk/main/src/main/java/org/apache/felix/main/Main.java Thu Oct 16 11:00:39 2008
@@ -22,9 +22,8 @@
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.*;
-
 import org.apache.felix.framework.Felix;
-import org.apache.felix.framework.util.StringMap;
+import org.apache.felix.framework.util.FelixConstants;
 import org.osgi.framework.Constants;
 
 /**
@@ -164,7 +163,6 @@
      * @param argv An array of arguments, all of which are ignored.
      * @throws Exception If an error occurs.
     **/
-
     public static void main(String[] args) throws Exception
     {
         // We support at most one argument, which is the bundle
@@ -191,23 +189,24 @@
             configProps.setProperty(Constants.FRAMEWORK_STORAGE, args[0]);
         }
 
+        // Create a list for custom framework activators and
+        // add an instance of the auto-activator it for processing
+        // auto-install and auto-start properties. Add this list
+        // to the configuration properties.
+        List list = new ArrayList();
+        list.add(new AutoActivator(configProps));
+        configProps.put(FelixConstants.SYSTEMBUNDLE_ACTIVATORS_PROP, list);
+
         // Print welcome banner.
         System.out.println("\nWelcome to Felix.");
         System.out.println("=================\n");
 
         try
         {
-            // Create a list for custom framework activators and
-            // add an instance of the auto-activator it for processing
-            // auto-install and auto-start properties.
-            List list = new ArrayList();
-            list.add(new AutoActivator(configProps));
-            // Create a case-insensitive property map.
-            Map configMap = new StringMap(configProps, false);
-            configMap.put("felix.systembundle.activators", list);
-            // Create an instance of the framework.
-            m_felix = new Felix(configMap);
+            // Create an instance and start the framework.
+            m_felix = new Felix(configProps);
             m_felix.start();
+            // Wait for framework to stop to exit the VM.
             m_felix.waitForStop(0);
             System.exit(0);
         }



Mime
View raw message