felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r1124728 - in /felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal: deppack/DepPackServlet.java servlet/PluginHolder.java
Date Thu, 19 May 2011 13:02:43 GMT
Author: fmeschbe
Date: Thu May 19 13:02:42 2011
New Revision: 1124728

URL: http://svn.apache.org/viewvc?rev=1124728&view=rev
Log:
FELIX-2727 Do not check whether the plugin is "loaded" when creating the plugin map and allow
the Deployment Admin plugin to load even in the absence of the DeploymentAdmin API.

Modified:
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/deppack/DepPackServlet.java
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/PluginHolder.java

Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/deppack/DepPackServlet.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/deppack/DepPackServlet.java?rev=1124728&r1=1124727&r2=1124728&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/deppack/DepPackServlet.java
(original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/deppack/DepPackServlet.java
Thu May 19 13:02:42 2011
@@ -36,7 +36,6 @@ import org.apache.felix.webconsole.inter
 import org.json.JSONException;
 import org.json.JSONWriter;
 import org.osgi.service.deploymentadmin.DeploymentAdmin;
-import org.osgi.service.deploymentadmin.DeploymentException;
 import org.osgi.service.deploymentadmin.DeploymentPackage;
 
 
@@ -55,7 +54,7 @@ public class DepPackServlet extends Simp
     private static final String ACTION_UNINSTALL = "uninstalldp";
     private static final String PARAMETER_PCK_FILE = "pckfile";
 
-    private static final String DEPL_SERVICE = DeploymentAdmin.class.getName();
+    private static final String DEPL_SERVICE = "org.osgi.service.deploymentadmin.DeploymentAdmin";
 
     // templates
     private final String TEMPLATE;
@@ -94,7 +93,7 @@ public class DepPackServlet extends Simp
                         resp.sendRedirect( uri );
                         return;
                     }
-                    catch ( DeploymentException e )
+                    catch ( /*Deployment*/ Exception e )
                     {
                         throw new ServletException( "Unable to deploy package.", e );
                     }
@@ -118,7 +117,7 @@ public class DepPackServlet extends Simp
                             pck.uninstall();
                         }
                     }
-                    catch ( DeploymentException e )
+                    catch ( /*Deployment*/ Exception e )
                     {
                         throw new ServletException( "Unable to undeploy package.", e );
                     }

Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/PluginHolder.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/PluginHolder.java?rev=1124728&r1=1124727&r2=1124728&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/PluginHolder.java
(original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/PluginHolder.java
Thu May 19 13:02:42 2011
@@ -239,7 +239,10 @@ class PluginHolder implements ServiceLis
         for ( int i = 0; i < plugins.length; i++ )
         {
             final Plugin plugin = plugins[i];
-            if (!plugin.isEnabled() || null == plugin.getConsolePlugin()) continue;
+
+            if (!plugin.isEnabled()) {
+                continue;
+            }
 
             final String label = plugin.getLabel();
             String title = plugin.getTitle();
@@ -745,7 +748,7 @@ class PluginHolder implements ServiceLis
         protected AbstractWebConsolePlugin doGetConsolePlugin()
         {
             if (null == plugin) {
-                if (!isEnabled()) 
+                if (!isEnabled())
                 {
                     if (doLog)
                     {
@@ -759,7 +762,7 @@ class PluginHolder implements ServiceLis
                 {
                     Class pluginClass = getClass().getClassLoader().loadClass(pluginClassName);
                     plugin = (AbstractWebConsolePlugin) pluginClass.newInstance();
-    
+
                     if (plugin instanceof OsgiManagerPlugin)
                     {
                         ((OsgiManagerPlugin) plugin).activate(getBundle().getBundleContext());



Mime
View raw message