qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ritch...@apache.org
Subject svn commit: r534859 - in /incubator/qpid/trunk/qpid: ./ java/broker/src/main/java/org/apache/qpid/server/exchange/ java/broker/src/main/java/org/apache/qpid/server/security/access/ java/management/eclipse-plugin/src/main/java/org/apache/qpid/management...
Date Thu, 03 May 2007 13:47:45 GMT
Author: ritchiem
Date: Thu May  3 06:47:43 2007
New Revision: 534859

URL: http://svn.apache.org/viewvc?view=rev&rev=534859
Log:
Merged revisions 534473-534477,534479-534763 via svnmerge from 
https://svn.apache.org/repos/asf/incubator/qpid/branches/M2

........
  r534473 | bhupendrab | 2007-05-02 15:19:52 +0100 (Wed, 02 May 2007) | 2 lines
  
  Exchange MBeans updated - init method moved to super class. 
  Exception handling of management console updated for SecurityException.
........
  r534763 | bhupendrab | 2007-05-03 10:35:11 +0100 (Thu, 03 May 2007) | 1 line
  
  Management console users list display is updated.
........

Modified:
    incubator/qpid/trunk/qpid/   (props changed)
    incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java
    incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/DestNameExchange.java
    incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/DestWildExchange.java
    incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/FanoutExchange.java
    incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/HeadersExchange.java
    incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/AMQUserManagementMBean.java
    incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ApplicationRegistry.java
    incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/AbstractAction.java
    incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/AddServer.java
    incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/ReconnectServer.java
    incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/JMXServerRegistry.java
    incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/OperationTabControl.java
    incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/ViewUtility.java

Propchange: incubator/qpid/trunk/qpid/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java?view=diff&rev=534859&r1=534858&r2=534859
==============================================================================
--- incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java
(original)
+++ incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java
Thu May  3 06:47:43 2007
@@ -23,6 +23,13 @@
 import javax.management.MalformedObjectNameException;
 import javax.management.NotCompliantMBeanException;
 import javax.management.ObjectName;
+import javax.management.openmbean.OpenType;
+import javax.management.openmbean.CompositeType;
+import javax.management.openmbean.TabularType;
+import javax.management.openmbean.TabularDataSupport;
+import javax.management.openmbean.OpenDataException;
+import javax.management.openmbean.SimpleType;
+import javax.management.openmbean.ArrayType;
 
 import org.apache.qpid.AMQException;
 import org.apache.qpid.framing.AMQShortString;
@@ -60,9 +67,31 @@
      */
     protected abstract class ExchangeMBean extends AMQManagedObject implements ManagedExchange
     {
+        // open mbean data types for representing exchange bindings
+        protected String[] _bindingItemNames;
+        protected String[] _bindingItemIndexNames;
+        protected OpenType[] _bindingItemTypes;
+        protected CompositeType _bindingDataType;
+        protected TabularType _bindinglistDataType;
+        protected TabularDataSupport _bindingList;
+        
         public ExchangeMBean() throws NotCompliantMBeanException
         {
             super(ManagedExchange.class, ManagedExchange.TYPE);
+        }
+
+        protected void init() throws OpenDataException
+        {
+            _bindingItemNames = new String[]{"Binding Key", "Queue Names"};
+            _bindingItemIndexNames = new String[]{_bindingItemNames[0]};
+            
+            _bindingItemTypes = new OpenType[2];
+            _bindingItemTypes[0] = SimpleType.STRING;
+            _bindingItemTypes[1] = new ArrayType(1, SimpleType.STRING);
+            _bindingDataType = new CompositeType("Exchange Binding", "Binding key and Queue
names",
+                                                 _bindingItemNames, _bindingItemNames, _bindingItemTypes);
+            _bindinglistDataType = new TabularType("Exchange Bindings", "Exchange Bindings
for " + getName(),
+                                                   _bindingDataType, _bindingItemIndexNames);
         }
 
         public ManagedObject getParentObject()

Modified: incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/DestNameExchange.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/DestNameExchange.java?view=diff&rev=534859&r1=534858&r2=534859
==============================================================================
--- incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/DestNameExchange.java
(original)
+++ incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/DestNameExchange.java
Thu May  3 06:47:43 2007
@@ -64,33 +64,12 @@
     @MBeanDescription("Management Bean for Direct Exchange")
     private final class DestNameExchangeMBean extends ExchangeMBean
     {
-        // open mbean data types for representing exchange bindings
-        private String[]   _bindingItemNames = {"Routing Key", "Queue Names"};
-        private String[]   _bindingItemIndexNames = {_bindingItemNames[0]};
-        private OpenType[] _bindingItemTypes = new OpenType[2];
-        private CompositeType      _bindingDataType = null;
-        private TabularType        _bindinglistDataType = null;
-        private TabularDataSupport _bindingList = null;
-
         @MBeanConstructor("Creates an MBean for AMQ direct exchange")
         public DestNameExchangeMBean()  throws JMException
         {
             super();
             _exchangeType = "direct";
             init();
-        }
-
-        /**
-         * initialises the OpenType objects.
-         */
-        private void init() throws OpenDataException
-        {
-            _bindingItemTypes[0] = SimpleType.STRING;
-            _bindingItemTypes[1] = new ArrayType(1, SimpleType.STRING);
-            _bindingDataType = new CompositeType("Exchange Binding", "Routing key and Queue
names",
-                                                 _bindingItemNames, _bindingItemNames, _bindingItemTypes);
-            _bindinglistDataType = new TabularType("Exchange Bindings", "Exchange Bindings
for " + getName(),
-                                                 _bindingDataType, _bindingItemIndexNames);
         }
 
         public TabularData bindings() throws OpenDataException

Modified: incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/DestWildExchange.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/DestWildExchange.java?view=diff&rev=534859&r1=534858&r2=534859
==============================================================================
--- incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/DestWildExchange.java
(original)
+++ incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/DestWildExchange.java
Thu May  3 06:47:43 2007
@@ -61,31 +61,12 @@
     @MBeanDescription("Management Bean for Topic Exchange")
     private final class DestWildExchangeMBean extends ExchangeMBean
     {
-        // open mbean data types for representing exchange bindings
-        private String[] _bindingItemNames = {"Routing Key", "Queue Names"};
-        private String[] _bindingItemIndexNames = {_bindingItemNames[0]};
-        private OpenType[] _bindingItemTypes = new OpenType[2];
-        private CompositeType _bindingDataType = null;
-        private TabularType _bindinglistDataType = null;
-        private TabularDataSupport _bindingList = null;
-
         @MBeanConstructor("Creates an MBean for AMQ topic exchange")
         public DestWildExchangeMBean() throws JMException
         {
             super();
             _exchangeType = "topic";
             init();
-        }
-
-        /** initialises the OpenType objects. */
-        private void init() throws OpenDataException
-        {
-            _bindingItemTypes[0] = SimpleType.STRING;
-            _bindingItemTypes[1] = new ArrayType(1, SimpleType.STRING);
-            _bindingDataType = new CompositeType("Exchange Binding", "Routing key and Queue
names",
-                                                 _bindingItemNames, _bindingItemNames, _bindingItemTypes);
-            _bindinglistDataType = new TabularType("Exchange Bindings", "Exchange Bindings
for " + getName(),
-                                                   _bindingDataType, _bindingItemIndexNames);
         }
 
         /** returns exchange bindings in tabular form */

Modified: incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/FanoutExchange.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/FanoutExchange.java?view=diff&rev=534859&r1=534858&r2=534859
==============================================================================
--- incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/FanoutExchange.java
(original)
+++ incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/FanoutExchange.java
Thu May  3 06:47:43 2007
@@ -41,33 +41,12 @@
     @MBeanDescription("Management Bean for Fanout Exchange")
     private final class FanoutExchangeMBean extends ExchangeMBean
     {
-        // open mbean data types for representing exchange bindings
-        private String[]   _bindingItemNames = {"Routing Key", "Queue Names"};
-        private String[]   _bindingItemIndexNames = {_bindingItemNames[0]};
-        private OpenType[] _bindingItemTypes = new OpenType[2];
-        private CompositeType _bindingDataType = null;
-        private TabularType _bindinglistDataType = null;
-        private TabularDataSupport _bindingList = null;
-
         @MBeanConstructor("Creates an MBean for AMQ fanout exchange")
         public FanoutExchangeMBean()  throws JMException
         {
             super();
             _exchangeType = "fanout";
             init();
-        }
-
-        /**
-         * initialises the OpenType objects.
-         */
-        private void init() throws OpenDataException
-        {
-            _bindingItemTypes[0] = SimpleType.STRING;
-            _bindingItemTypes[1] = new ArrayType(1, SimpleType.STRING);
-            _bindingDataType = new CompositeType("Exchange Binding", "Routing key and Queue
names",
-                                                 _bindingItemNames, _bindingItemNames, _bindingItemTypes);
-            _bindinglistDataType = new TabularType("Exchange Bindings", "Exchange Bindings
for " + getName(),
-                                                 _bindingDataType, _bindingItemIndexNames);
         }
 
         public TabularData bindings() throws OpenDataException

Modified: incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/HeadersExchange.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/HeadersExchange.java?view=diff&rev=534859&r1=534858&r2=534859
==============================================================================
--- incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/HeadersExchange.java
(original)
+++ incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/HeadersExchange.java
Thu May  3 06:47:43 2007
@@ -90,14 +90,6 @@
     @MBeanDescription("Management Bean for Headers Exchange")
     private final class HeadersExchangeMBean extends ExchangeMBean
     {
-        // open mbean data types for representing exchange bindings
-        private String[]   _bindingItemNames = {"S.No.", "Queue Name", "Header Bindings"};
-        private String[]   _bindingItemIndexNames = {_bindingItemNames[0]};
-        private OpenType[] _bindingItemTypes = new OpenType[3];
-        private CompositeType      _bindingDataType = null;
-        private TabularType        _bindinglistDataType = null;
-        private TabularDataSupport _bindingList = null;
-
         @MBeanConstructor("Creates an MBean for AMQ Headers exchange")
         public HeadersExchangeMBean()  throws JMException
         {
@@ -105,11 +97,16 @@
             _exchangeType = "headers";
             init();
         }
+        
         /**
          * initialises the OpenType objects.
          */
-        private void init() throws OpenDataException
+        protected void init() throws OpenDataException
         {
+            _bindingItemNames = new String[]{"Binding No", "Queue  Name", "Queue Bindings"};
+            _bindingItemIndexNames = new String[]{_bindingItemNames[0]};
+
+            _bindingItemTypes = new OpenType[3];
             _bindingItemTypes[0] = SimpleType.INTEGER;
             _bindingItemTypes[1] = SimpleType.STRING;
             _bindingItemTypes[2] = new ArrayType(1, SimpleType.STRING);

Modified: incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/AMQUserManagementMBean.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/AMQUserManagementMBean.java?view=diff&rev=534859&r1=534858&r2=534859
==============================================================================
--- incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/AMQUserManagementMBean.java
(original)
+++ incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/AMQUserManagementMBean.java
Thu May  3 06:47:43 2007
@@ -72,7 +72,7 @@
     static TabularType _userlistDataType; // Datatype for representing User Lists
 
     static CompositeType _userDataType; // Composite type for representing User
-    static String[] _userItemNames = {"Username", "Read", "Write", "Admin"};
+    static String[] _userItemNames = {"Username", "read", "write", "admin"};
 
     static
     {

Modified: incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ApplicationRegistry.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ApplicationRegistry.java?view=diff&rev=534859&r1=534858&r2=534859
==============================================================================
--- incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ApplicationRegistry.java
(original)
+++ incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ApplicationRegistry.java
Thu May  3 06:47:43 2007
@@ -106,7 +106,7 @@
     public static ServerRegistry getServerRegistry(ManagedBean mbean)
     {
         ManagedServer server = mbean.getServer();
-        return _serverRegistryMap.get(server);
+        return getServerRegistry(server);
     }
     
     public static boolean isServerConnected(ManagedServer server)
@@ -118,7 +118,7 @@
     public static void serverConnectionClosed(ManagedServer server)
     {
         _closedServerList.add(server);
-        _serverRegistryMap.remove(server);
+        removeServer(server);
     }
     
     /*

Modified: incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/AbstractAction.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/AbstractAction.java?view=diff&rev=534859&r1=534858&r2=534859
==============================================================================
--- incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/AbstractAction.java
(original)
+++ incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/AbstractAction.java
Thu May  3 06:47:43 2007
@@ -22,6 +22,8 @@
 
 import static org.apache.qpid.management.ui.Constants.ERROR_SERVER_CONNECTION;
 
+import java.io.IOException;
+
 import org.apache.qpid.management.ui.ApplicationRegistry;
 import org.apache.qpid.management.ui.ApplicationWorkbenchAdvisor;
 import org.apache.qpid.management.ui.Constants;
@@ -75,8 +77,27 @@
         MBeanUtility.printStackTrace(ex);
         if (msg == null)
         {
-            msg = ex.getMessage();
+            if (ex instanceof IOException)
+            {
+                if ((ex.getMessage() != null) && (ex.getMessage().indexOf(RMI_SASL_ERROR)
!= -1))
+                {
+                    msg = SECURITY_FAILURE;
+                }
+                else
+                {
+                    msg = SERVER_UNAVAILABLE;
+                }
+            }
+            else if (ex instanceof SecurityException)
+            {
+                msg = SECURITY_FAILURE;
+            }
+            else
+            {
+                msg = ex.getMessage();
+            }
         }
+        
         if ((msg == null) && (ex.getCause() != null))
         {
             msg = ex.getCause().getMessage();

Modified: incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/AddServer.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/AddServer.java?view=diff&rev=534859&r1=534858&r2=534859
==============================================================================
--- incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/AddServer.java
(original)
+++ incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/AddServer.java
Thu May  3 06:47:43 2007
@@ -22,8 +22,6 @@
 
 import static org.apache.qpid.management.ui.Constants.*;
 
-import java.io.IOException;
-
 import org.apache.qpid.management.ui.ApplicationRegistry;
 import org.apache.qpid.management.ui.exceptions.InfoRequiredException;
 import org.apache.qpid.management.ui.views.NumberVerifyListener;
@@ -63,36 +61,25 @@
     
     public void run(IAction action)
     {
-        if(_window != null)
-        {   
-            reset();
-            createAddServerPopup();
-            try
-            {
-                if (_addServer)
-                {
-                    getNavigationView().addNewServer(_transport, _host, Integer.parseInt(_port),
_domain, _user, _password);
-                }
-            }
-            catch(InfoRequiredException ex)
-            {
-                ViewUtility.popupInfoMessage(ACTION_ADDSERVER, ex.getMessage());
-            }
-            catch (IOException ex)
-            {
-                if ((ex.getMessage() != null) && (ex.getMessage().indexOf(RMI_SASL_ERROR)
!= -1))
-                {
-                    handleException(ex, null, SECURITY_FAILURE);
-                }
-                else
-                {
-                    handleException(ex, null, SERVER_UNAVAILABLE);
-                }
-            }
-            catch (Exception ex)
+        if(_window == null)
+            return;
+        
+        reset();
+        createAddServerPopup();
+        try
+        {
+            if (_addServer)
             {
-                handleException(ex, null, null);
+                getNavigationView().addNewServer(_transport, _host, Integer.parseInt(_port),
_domain, _user, _password);
             }
+        }
+        catch(InfoRequiredException ex)
+        {
+            ViewUtility.popupInfoMessage(ACTION_ADDSERVER, ex.getMessage());
+        }
+        catch (Exception ex)
+        {
+            handleException(ex, null, null);
         }
     }
     

Modified: incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/ReconnectServer.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/ReconnectServer.java?view=diff&rev=534859&r1=534858&r2=534859
==============================================================================
--- incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/ReconnectServer.java
(original)
+++ incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/ReconnectServer.java
Thu May  3 06:47:43 2007
@@ -27,8 +27,6 @@
 import static org.apache.qpid.management.ui.Constants.PASSWORD;
 import static org.apache.qpid.management.ui.Constants.USERNAME;
 
-import java.io.IOException;
-
 import org.apache.qpid.management.ui.ApplicationRegistry;
 import org.apache.qpid.management.ui.Constants;
 import org.apache.qpid.management.ui.exceptions.InfoRequiredException;
@@ -58,44 +56,33 @@
     
     public void run(IAction action)
     {
-        if(_window != null)
-        {   
-            try
-            {
-                reset();
-                // Check if a server node is selected to be reconnected.
-                TreeObject serverNode = getNavigationView().getSelectedServerNode();
-                _serverName = serverNode.getName();
-                _title = ACTION_LOGIN + " (" + _serverName + ")";
-                
-                // Get the login details(username/password)
-                createLoginPopup();
-                
-                if (_connect)
-                {
-                    // Connect the server
-                    getNavigationView().reconnect(_user, _password);
-                }
-            }
-            catch(InfoRequiredException ex)
-            {
-                ViewUtility.popupInfoMessage("Reconnect Qpid server", ex.getMessage());
-            }
-            catch (IOException ex)
-            {
-                if ((ex.getMessage() != null) && (ex.getMessage().indexOf(RMI_SASL_ERROR)
!= -1))
-                {
-                    handleException(ex, null, SECURITY_FAILURE);
-                }
-                else
-                {
-                    handleException(ex, null, SERVER_UNAVAILABLE);
-                }
-            }
-            catch (Exception ex)
+        if(_window == null)
+            return;
+  
+        try
+        {
+            reset();
+            // Check if a server node is selected to be reconnected.
+            TreeObject serverNode = getNavigationView().getSelectedServerNode();
+            _serverName = serverNode.getName();
+            _title = ACTION_LOGIN + " (" + _serverName + ")";
+
+            // Get the login details(username/password)
+            createLoginPopup();
+
+            if (_connect)
             {
-                handleException(ex, null, null);
+                // Connect the server
+                getNavigationView().reconnect(_user, _password);
             }
+        }
+        catch(InfoRequiredException ex)
+        {
+            ViewUtility.popupInfoMessage("Reconnect Qpid server", ex.getMessage());
+        }
+        catch (Exception ex)
+        {
+            handleException(ex, null, null);
         }
     }
     

Modified: incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/JMXServerRegistry.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/JMXServerRegistry.java?view=diff&rev=534859&r1=534858&r2=534859
==============================================================================
--- incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/JMXServerRegistry.java
(original)
+++ incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/JMXServerRegistry.java
Thu May  3 06:47:43 2007
@@ -65,6 +65,7 @@
     private JMXServiceURL _jmxUrl = null;
     private JMXConnector _jmxc = null;
     private MBeanServerConnection _mbsc = null;
+    private Exception _connectionException = null;
     
     private List<String> _usersList;
     // When an mbean gets removed from mbean server, then the notification listener
@@ -175,9 +176,16 @@
         long timeNow = System.currentTimeMillis();
         connectorThread.join(ApplicationRegistry.timeout);
         
-        if (!_connected && (System.currentTimeMillis() - timeNow >= ApplicationRegistry.timeout))
+        if (_connectionException != null)
         {
-            throw new Exception("Qpid server connection timed out");
+            throw _connectionException;
+        }
+        if (!_connected)
+        {
+            if (System.currentTimeMillis() - timeNow >= ApplicationRegistry.timeout)
+                throw new Exception("Qpid server connection timed out");
+            else
+                throw new Exception("Qpid server connection failed");
         }
     }
     
@@ -188,11 +196,14 @@
             try
             {
                 _connected = false;
+                _connectionException = null;
+                
                 _jmxc.connect();
                 _connected = true;
             }
             catch (Exception ex)
             {
+                _connectionException = ex;
                 MBeanUtility.printStackTrace(ex);
             }
         }
@@ -205,10 +216,10 @@
     {
         try
         {
-            if (_jmxc != null)
+            if (_jmxc != null && _clientListener != null)
                 _jmxc.removeConnectionNotificationListener(_clientListener);
 
-            if (_mbsc != null)
+            if (_mbsc != null && _clientListener != null)
                 _mbsc.removeNotificationListener(_serverObjectName, _clientListener);
 
             // remove mbean notification listeners
@@ -219,7 +230,7 @@
         }
         catch (ListenerNotFoundException ex)
         {
-            System.out.println(ex.toString());
+            MBeanUtility.printOutput(ex.toString());
         }
     }
     

Modified: incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/OperationTabControl.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/OperationTabControl.java?view=diff&rev=534859&r1=534858&r2=534859
==============================================================================
--- incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/OperationTabControl.java
(original)
+++ incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/OperationTabControl.java
Thu May  3 06:47:43 2007
@@ -749,7 +749,10 @@
         List<String> list = new ArrayList<String>();
         for (CompositeData data : records)
         {
-            list.add(data.get(USERNAME).toString());
+            if (data.containsKey(USERNAME))
+            {
+                list.add(data.get(USERNAME).toString());
+            }
         }
         
         return list;

Modified: incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/ViewUtility.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/ViewUtility.java?view=diff&rev=534859&r1=534858&r2=534859
==============================================================================
--- incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/ViewUtility.java
(original)
+++ incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/ViewUtility.java
Thu May  3 06:47:43 2007
@@ -335,11 +335,15 @@
                     if (data.containsKey("MimeType"))
                     {
                         mimeType = (String)data.get("MimeType");
+                    }
+                    if (data.containsKey("Encoding"))
+                    {
                         encoding = (String)data.get("Encoding");
-                        if (encoding == null || encoding.length() == 0)
-                        {
-                            encoding = Charset.defaultCharset().name();
-                        }
+                    }
+                    
+                    if (encoding == null || encoding.length() == 0)
+                    {
+                        encoding = Charset.defaultCharset().name();
                     }
 
                     if ("text/plain".equals(mimeType))



Mime
View raw message