qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhupend...@apache.org
Subject svn commit: r532002 - in /incubator/qpid/branches/M2/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui: ApplicationRegistry.java jmx/JMXServerRegistry.java
Date Tue, 24 Apr 2007 16:35:44 GMT
Author: bhupendrab
Date: Tue Apr 24 09:35:43 2007
New Revision: 532002

URL: http://svn.apache.org/viewvc?view=rev&rev=532002
Log:
Management Console SASL changes

Modified:
    incubator/qpid/branches/M2/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ApplicationRegistry.java
    incubator/qpid/branches/M2/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/JMXServerRegistry.java

Modified: incubator/qpid/branches/M2/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ApplicationRegistry.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/M2/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ApplicationRegistry.java?view=diff&rev=532002&r1=532001&r2=532002
==============================================================================
--- incubator/qpid/branches/M2/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ApplicationRegistry.java
(original)
+++ incubator/qpid/branches/M2/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ApplicationRegistry.java
Tue Apr 24 09:35:43 2007
@@ -41,8 +41,9 @@
 {
     private static ImageRegistry imageRegistry = new ImageRegistry();
     private static FontRegistry fontRegistry = new FontRegistry();
-    public static final boolean debug = Boolean.getBoolean("debug");
-    public static final String securityMechanism = System.getProperty("security", null);
   
+    public static final boolean debug = Boolean.getBoolean("eclipse.consoleLog");
+    public static final String securityMechanism = System.getProperty("security", null);
+    public static final String connectorClass =  System.getProperty("jmxconnector");
     
     static
     {
@@ -136,5 +137,10 @@
     public static String getSecurityMechanism()
     {
         return securityMechanism;
+    }
+    
+    public static String getJMXConnectorClass()
+    {
+        return connectorClass;
     }
 }

Modified: incubator/qpid/branches/M2/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/JMXServerRegistry.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/M2/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/JMXServerRegistry.java?view=diff&rev=532002&r1=532001&r2=532002
==============================================================================
--- incubator/qpid/branches/M2/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/JMXServerRegistry.java
(original)
+++ incubator/qpid/branches/M2/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/JMXServerRegistry.java
Tue Apr 24 09:35:43 2007
@@ -96,19 +96,20 @@
     {
         super(server);
         String securityMechanism = ApplicationRegistry.getSecurityMechanism();
+        String connectorClassName = ApplicationRegistry.getJMXConnectorClass();
+        
         boolean saslPluginAvailable = false;
        
-        if (securityMechanism != null)
+        if ((securityMechanism != null) && (connectorClassName != null))
         { 
             try
             {
-                createSASLConnector(securityMechanism);
+                createSASLConnector(securityMechanism, connectorClassName);
                 saslPluginAvailable = true;
             }
             catch (Exception ex)
             {
-                ex.printStackTrace();
-                saslPluginAvailable = false;
+                MBeanUtility.printStackTrace(ex);
             }
         }
         
@@ -133,11 +134,11 @@
         return _mbsc;
     }
     
-    private void createSASLConnector(String mech) throws Exception
+    private void createSASLConnector(String mech, String className) throws Exception
     {
         String text = "Security mechanism " + mech + " is not supported.";
-        // Check if the JMXMP connector is available
-        Class klass = Class.forName("javax.management.remote.jmxmp.JMXMPConnector");
+        // Check if the given connector, which supports SASL is available
+        Class connectorClass = Class.forName(className);
 
         _jmxUrl = new JMXServiceURL("jmxmp", getManagedServer().getHost(), getManagedServer().getPort());
         _env = new HashMap<String, Object>();
@@ -171,7 +172,7 @@
         }
         // Now create the instance of JMXMPConnector                                    
          
         Class[] paramTypes = {JMXServiceURL.class, Map.class};                          

-        Constructor cons = klass.getConstructor(paramTypes);
+        Constructor cons = connectorClass.getConstructor(paramTypes);
 
         Object[] args = {_jmxUrl, _env};           
         Object theObject = cons.newInstance(args);



Mime
View raw message