You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by bh...@apache.org on 2007/02/01 11:13:56 UTC

svn commit: r502180 - in /incubator/qpid/trunk/qpid/java: broker/src/main/java/org/apache/qpid/server/ management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/ man...

Author: bhupendrab
Date: Thu Feb  1 02:13:55 2007
New Revision: 502180

URL: http://svn.apache.org/viewvc?view=rev&rev=502180
Log:
QPID-331
and setting operation parameters to default values after executing the operation once.

Modified:
    incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQBrokerManagerMBean.java
    incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/Constants.java
    incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ManagedBean.java
    incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ServerRegistry.java
    incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/JMXManagedObject.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/jmx/MBeanUtility.java
    incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/model/ParameterData.java
    incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/NavigationView.java
    incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/OperationTabControl.java

Modified: incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQBrokerManagerMBean.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQBrokerManagerMBean.java?view=diff&rev=502180&r1=502179&r2=502180
==============================================================================
--- incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQBrokerManagerMBean.java (original)
+++ incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQBrokerManagerMBean.java Thu Feb  1 02:13:55 2007
@@ -153,7 +153,12 @@
 
         try
         {
-            queue = new AMQQueue(new AMQShortString(queueName), durable, new AMQShortString(owner), autoDelete, getVirtualHost());
+            AMQShortString ownerShortString = null;
+            if (owner != null)
+            {
+                ownerShortString = new AMQShortString(owner);
+            }
+            queue = new AMQQueue(new AMQShortString(queueName), durable, ownerShortString, autoDelete, getVirtualHost());
             if (queue.isDurable() && !queue.isAutoDelete())
             {
                 _messageStore.createQueue(queue);

Modified: incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/Constants.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/Constants.java?view=diff&rev=502180&r1=502179&r2=502180
==============================================================================
--- incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/Constants.java (original)
+++ incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/Constants.java Thu Feb  1 02:13:55 2007
@@ -41,6 +41,9 @@
     public final static String NOTIFICATION = "Notifications";
     public final static String RESULT = "Result";
     public final static String VIRTUAL_HOST = "VirtualHost";
+    public final static String QUEUE_OWNER = "owner";
+    public final static String OPERATION_CREATE_QUEUE = "createNewQueue";
+    public final static String OPERATION_CREATE_BINDING = "createNewBinding";
     
     public final static String ATTRIBUTE_QUEUE_DEPTH = "QueueDepth"; 
     
@@ -49,11 +52,11 @@
     public final static String NAVIGATION_ROOT = "Qpid Connections";
     public final static String DESCRIPTION = " Description";
     
-    public final static String BROKER_MANAGER = "Broker_Manager";
     public final static String QUEUE  = "Queue";
     public final static String EXCHANGE = "Exchange";
     public final static String EXCHANGE_TYPE = "ExchangeType";
     public final static String[] EXCHANGE_TYPE_VALUES = {"direct", "topic", "headers"};
+    public final static String[] BOOLEAN_TYPE_VALUES = {"false", "true"};
     public final static String CONNECTION ="Connection";
     
     public final static String ACTION_ADDSERVER = "New Connection";

Modified: incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ManagedBean.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ManagedBean.java?view=diff&rev=502180&r1=502179&r2=502180
==============================================================================
--- incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ManagedBean.java (original)
+++ incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ManagedBean.java Thu Feb  1 02:13:55 2007
@@ -32,7 +32,7 @@
     private String _uniqueName = "";
     private String _domain = "";
     private String _type = "";
-    private String _virtualHostName = "Default";
+    private String _virtualHostName = null;
     private ManagedServer _server = null;
     private HashMap _properties = null;
     
@@ -48,7 +48,9 @@
     public void setProperties(HashMap properties)
     {
         this._properties = properties;
-        setVirtualHostName(getProperty(Constants.VIRTUAL_HOST));
+        setName(getProperty("name"));
+        setType(getProperty("type"));
+        _virtualHostName = getProperty(Constants.VIRTUAL_HOST);
     }
     public String getDomain()
     {
@@ -89,12 +91,30 @@
         return _virtualHostName;
     }
     
-    public void setVirtualHostName(String virtualHost)
+    /**
+     * Returns mbean instance name. MBeans which have only one instance, the type attribute will be returned
+     * @return
+     */
+    public String getInstanceName()
+    {
+        if (getName() != null)
+            return getName();
+        else
+            return getType();
+    }
+    
+    public boolean isQueue()
     {
-        if (virtualHost != null)
-        {
-            this._virtualHostName = virtualHost;
-        }
+        return _type.endsWith(Constants.QUEUE);
     }
     
+    public boolean isConnection()
+    {
+        return _type.endsWith(Constants.CONNECTION);
+    }
+    
+    public boolean isExchange()
+    {
+        return _type.endsWith(Constants.EXCHANGE);
+    }
 }

Modified: incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ServerRegistry.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ServerRegistry.java?view=diff&rev=502180&r1=502179&r2=502180
==============================================================================
--- incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ServerRegistry.java (original)
+++ incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ServerRegistry.java Thu Feb  1 02:13:55 2007
@@ -34,14 +34,11 @@
 public abstract class ServerRegistry
 {
     private ManagedServer _managedServer = null;
-    // list of all Connection mbeans
-    //private List<ManagedBean> _connections = new ArrayList<ManagedBean>();
+    // map of all Connection mbeans
     private ConcurrentMap<String,List<ManagedBean>> _connections = new ConcurrentHashMap<String,List<ManagedBean>>();
-    // list of all exchange mbeans
-    //private List<ManagedBean> _exchanges = new ArrayList<ManagedBean>();
+    // map of all exchange mbeans
     private ConcurrentMap<String,List<ManagedBean>> _exchanges = new ConcurrentHashMap<String,List<ManagedBean>>();
-    // list of all queue mbenas
-    //private List<ManagedBean> _queues = new ArrayList<ManagedBean>();
+    // map of all queue mbenas
     private ConcurrentMap<String,List<ManagedBean>> _queues = new ConcurrentHashMap<String,List<ManagedBean>>();
     
     public ServerRegistry()
@@ -68,31 +65,26 @@
     {
         String vHost = mbean.getVirtualHostName();
         _connections.putIfAbsent(vHost, new ArrayList<ManagedBean>());
-        List<ManagedBean> beans = _connections.get(vHost);
-        beans.add(mbean);
+        _connections.get(vHost).add(mbean);
     }
     
     protected void addExchangeMBean(ManagedBean mbean)
     {
         String vHost = mbean.getVirtualHostName();
         _exchanges.putIfAbsent(vHost, new ArrayList<ManagedBean>());
-        List<ManagedBean> beans = _exchanges.get(vHost);
-        beans.add(mbean);
+        _exchanges.get(vHost).add(mbean);
     }
     
     protected void addQueueMBean(ManagedBean mbean)
     {
         String vHost = mbean.getVirtualHostName();
         _queues.putIfAbsent(vHost, new ArrayList<ManagedBean>());
-        List<ManagedBean> beans = _queues.get(vHost);
-        beans.add(mbean);
+        _queues.get(vHost).add(mbean);
     }
     
     protected void removeConnectionMBean(ManagedBean mbean)
     {
-        String vHost = mbean.getVirtualHostName();
-        List<ManagedBean> beans = _connections.get(vHost);
-        beans.remove(mbean);
+        _connections.get(mbean.getVirtualHostName()).remove(mbean);
     }
     
     protected void removeExchangeMBean(ManagedBean mbean)
@@ -126,10 +118,7 @@
     
     public abstract void removeManagedObject(ManagedBean mbean);
    
-    public List<ManagedBean> getObjectsToBeRemoved()
-    {
-        return null;
-    }
+    public abstract List<ManagedBean> getObjectsToBeRemoved();
     
     public abstract ManagedAttributeModel getAttributeModel(ManagedBean mbean);
     

Modified: incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/JMXManagedObject.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/JMXManagedObject.java?view=diff&rev=502180&r1=502179&r2=502180
==============================================================================
--- incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/JMXManagedObject.java (original)
+++ incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/JMXManagedObject.java Thu Feb  1 02:13:55 2007
@@ -36,10 +36,8 @@
     {
         super();
         this._objName = objName;
-        setName(_objName.getKeyProperty("name"));
-        setType(_objName.getKeyProperty("type"));
         setUniqueName(_objName.toString());
-        setDomain(_objName.getDomain());
+        setDomain(_objName.getDomain());       
         super.setProperties(new HashMap(_objName.getKeyPropertyList()));
     }
     

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=502180&r1=502179&r2=502180
==============================================================================
--- 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 Feb  1 02:13:55 2007
@@ -131,15 +131,15 @@
     
     public void addManagedObject(ManagedBean mbean)
     {
-        if (mbean.getType().endsWith(Constants.QUEUE) && !mbean.getName().startsWith("tmp_"))
+        if (mbean.isQueue() && !mbean.getName().startsWith("tmp_"))
         {
             addQueueMBean(mbean);
         }
-        else if (mbean.getType().endsWith(Constants.EXCHANGE))
+        else if (mbean.isExchange())
         {
             addExchangeMBean(mbean);
         }
-        else if (mbean.getType().endsWith(Constants.CONNECTION))
+        else if (mbean.isConnection())
         {
             addConnectionMBean(mbean);
         }
@@ -149,12 +149,18 @@
 
     public void removeManagedObject(ManagedBean mbean)
     {
-        if (mbean.getType().endsWith(Constants.QUEUE))
+        if (mbean.isQueue())
+        {
             removeQueueMBean(mbean);
-        else if (mbean.getType().endsWith(Constants.EXCHANGE))
+        }
+        else if (mbean.isExchange())
+        {
             removeExchangeMBean(mbean);
-        else if (mbean.getType().endsWith(Constants.CONNECTION))
+        }
+        else if (mbean.isConnection())
+        {
             removeConnectionMBean(mbean);
+        }
         
         _mbeansMap.remove(mbean.getUniqueName());
     }
@@ -319,6 +325,12 @@
         }
     }
     
+    /**
+     * When the mbean registration request is received from the mbean server, then the client listener
+     * can use this method.  It will add the mbean to a list, which will be used to add the mbean to
+     * the registry and gui
+     * @param objName
+     */
     public void registerManagedObject(ObjectName objName)
     {
         JMXManagedObject managedObject = new JMXManagedObject(objName);
@@ -327,10 +339,20 @@
         addManagedObject(managedObject);
     }
     
+    /**
+     * When mbean unregistration notification is received from the mbean server, then client listener
+     * can invoke this method. It will add the mbean to the list of mbeans to be removed from registry
+     * @param objName
+     */
     public void unregisterManagedObject(ObjectName objName)
     {
         ManagedBean mbean = _mbeansMap.get(objName.toString());
-        _mbeansToBeRemoved.add(mbean);
+        // Check if mbean was not available in the map. It can happen if mbean unregistration
+        // notification is received and the mbean is not added in the map.
+        if (mbean != null)
+        {
+            _mbeansToBeRemoved.add(mbean);
+        }
     }
 
     public List<ManagedBean> getObjectsToBeRemoved()

Modified: incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/MBeanUtility.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/MBeanUtility.java?view=diff&rev=502180&r1=502179&r2=502180
==============================================================================
--- incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/MBeanUtility.java (original)
+++ incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/MBeanUtility.java Thu Feb  1 02:13:55 2007
@@ -144,39 +144,44 @@
         if (mbean == null)
         {
             ViewUtility.popupErrorMessage("Error", "Managed Object is null \n" + ex.toString());
+            ex.printStackTrace();
         }
         else if (ex instanceof IOException)
         {
-            ViewUtility.popupErrorMessage(mbean.getName(), "IO Error occured \n" + ex.toString());
+            ViewUtility.popupErrorMessage(mbean.getInstanceName(), "IO Error occured \n" + ex.toString());
+            ex.printStackTrace();
         }
         else if (ex instanceof ReflectionException)
         {
-            ViewUtility.popupErrorMessage(mbean.getName(), "Server has thrown error \n" + ex.toString());
+            ViewUtility.popupErrorMessage(mbean.getInstanceName(), "Server has thrown error \n" + ex.toString());
+            ex.printStackTrace();
         }
         else if (ex instanceof InstanceNotFoundException)
         {
-            ViewUtility.popupErrorMessage(mbean.getName(), "Managed Object Not Found \n" + ex.toString());
+            ViewUtility.popupErrorMessage(mbean.getInstanceName(), "Managed Object Not Found \n" + ex.toString());
+            ex.printStackTrace();
         }
         else if (ex instanceof MBeanException)
         {
             String cause = ((MBeanException)ex).getTargetException().toString();
             if (cause == null)
                 cause = ex.toString();
-            ViewUtility.popupInfoMessage(mbean.getName(), cause);
+            ViewUtility.popupInfoMessage(mbean.getInstanceName(), cause);
         }
         else if (ex instanceof JMException)
         {
-            ViewUtility.popupErrorMessage(mbean.getName(), "Management Exception occured \n" + ex.toString());
+            ViewUtility.popupErrorMessage(mbean.getInstanceName(), "Management Exception occured \n" + ex.toString());
         }
         else if (ex instanceof ManagementConsoleException)
         {
-            ViewUtility.popupErrorMessage(mbean.getName(), ex.getMessage());
+            ViewUtility.popupErrorMessage(mbean.getInstanceName(), ex.getMessage());
         }
         else 
         {
-            ViewUtility.popupErrorMessage(mbean.getName(), ex.toString());
+            ViewUtility.popupErrorMessage(mbean.getInstanceName(), ex.toString());
+            ex.printStackTrace();
         }
-        ex.printStackTrace();
+        
     }
     
     /**

Modified: incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/model/ParameterData.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/model/ParameterData.java?view=diff&rev=502180&r1=502179&r2=502180
==============================================================================
--- incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/model/ParameterData.java (original)
+++ incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/model/ParameterData.java Thu Feb  1 02:13:55 2007
@@ -20,60 +20,81 @@
  */
 package org.apache.qpid.management.ui.model;
 
+/**
+ * Class representing an mbean operation parameter
+ * @author Bhupendra Bhardwaj
+ */
 public class ParameterData
 {
-    private String name;
-    private String description;
-    private String type;
-    private Object value;
+    private String _name;
+    private String _description;
+    private String _type;
+    private Object _value;
     
-    ParameterData(String value)
+    ParameterData(String name)
     {
-        this.name = value;
+        this._name = name;
     }
     
     public String getDescription()
     {
-        return description;
+        return _description;
     }
     public void setDescription(String description)
     {
-        this.description = description;
+        this._description = description;
     }
     
     public String getName()
     {
-        return name;
+        return _name;
     }
 
     public String getType()
     {
-        return type;
+        return _type;
     }
     public void setType(String type)
     {
-        this.type = type;
+        this._type = type;
     }
 
     public Object getValue()
     {
-        return value;
+        return _value;
     }
     
     public void setValueFromString(String strValue)
     {
-        if ("int".equals(type))
-            value = Integer.parseInt(strValue);
-        else if ("boolean".equals(type))
-            value = Boolean.valueOf(strValue);
-        else if ("long".equals(type))
-            value = Long.parseLong(strValue);
+        if ("int".equals(_type))
+            _value = Integer.parseInt(strValue);
+        else if (isBoolean())
+            _value = Boolean.valueOf(strValue);
+        else if ("long".equals(_type))
+            _value = Long.parseLong(strValue);
         else
-            value = strValue; 
+            _value = strValue; 
     }
     
     public void setValue(Object value)
     {
-        this.value = value;
+        this._value = value;
+    }
+    
+    public boolean isBoolean()
+    {
+        return (_type.equals("boolean") || _type.equals("java.lang.Boolean"));
+    }
+    
+    public void setDefaultValue()
+    {
+        if (isBoolean())
+        {
+            _value = Boolean.valueOf("false");
+        }
+        else
+        {
+            _value = null;
+        }
     }
 }

Modified: incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/NavigationView.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/NavigationView.java?view=diff&rev=502180&r1=502179&r2=502180
==============================================================================
--- incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/NavigationView.java (original)
+++ incubator/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/NavigationView.java Thu Feb  1 02:13:55 2007
@@ -33,11 +33,9 @@
 import org.apache.qpid.management.ui.ApplicationRegistry;
 import org.apache.qpid.management.ui.Constants;
 import org.apache.qpid.management.ui.ManagedBean;
-import org.apache.qpid.management.ui.ManagedObject;
 import org.apache.qpid.management.ui.ManagedServer;
 import org.apache.qpid.management.ui.ServerRegistry;
 import org.apache.qpid.management.ui.exceptions.InfoRequiredException;
-import org.apache.qpid.management.ui.exceptions.ManagementConsoleException;
 import org.apache.qpid.management.ui.jmx.JMXServerRegistry;
 import org.apache.qpid.management.ui.jmx.MBeanUtility;
 import org.eclipse.jface.viewers.DoubleClickEvent;
@@ -243,7 +241,7 @@
         String domain = server.getDomain();
         try
         {
-            if (!domain.equals("All"))
+            if (!domain.equals(Constants.ALL))
             {
                 TreeObject domainNode = new TreeObject(domain, Constants.DOMAIN);
                 domainNode.setParent(serverNode);
@@ -281,17 +279,6 @@
     private void populateDomain(TreeObject domain) throws IOException, Exception
     {
         ManagedServer server = (ManagedServer)domain.getParent().getManagedObject();
-        /*
-        // Add these three types - Connection, Exchange, Queue
-        // By adding these, these will always be available, even if there are no mbeans under thse types
-        // This is required because, the mbeans will be added from mbeanview, by selecting from the list
-        TreeObject typeChild = new TreeObject(Constants.CONNECTION, Constants.TYPE);
-        typeChild.setParent(domain);
-        typeChild = new TreeObject(Constants.EXCHANGE, Constants.TYPE);
-        typeChild.setParent(domain);
-        typeChild = new TreeObject(Constants.QUEUE, Constants.TYPE);
-        typeChild.setParent(domain);
-        */
         
         // Now populate the mbenas under those types
         List<ManagedBean> mbeans = MBeanUtility.getManagedObjectsForDomain(server, domain.getName());
@@ -302,17 +289,20 @@
             serverRegistry.addManagedObject(mbean);     
             
             // Add all mbeans other than Connections, Exchanges and Queues. Because these will be added
-            // manually by selecting from MBeanView
-            
-            if (!(mbean.getType().endsWith(Constants.CONNECTION) ||
-                  mbean.getType().endsWith(Constants.EXCHANGE) ||
-                  mbean.getType().endsWith(Constants.QUEUE)))
+            // manually by selecting from MBeanView           
+            if (!(mbean.isConnection() || mbean.isExchange() || mbean.isQueue()) )
             {
                 addManagedBean(domain, mbean);
             }
         }
     }
     
+    /**
+     * Add these three types - Connection, Exchange, Queue
+     * By adding these, these will always be available, even if there are no mbeans under thse types
+     * This is required because, the mbeans will be added from mbeanview, by selecting from the list
+     * @param parent Node
+     */
     private void addDefaultNodes(TreeObject parent)
     {
         TreeObject typeChild = new TreeObject(Constants.CONNECTION, Constants.NODE_TYPE_MBEANTYPE);
@@ -360,6 +350,7 @@
      * Adds the given MBean to the given domain node. Creates Notification node for the MBean.
      * @param domain
      * @param mbean mbean
+     * @throws Exception
      */
     private void addManagedBean(TreeObject domain, ManagedBean mbean) throws Exception
     {
@@ -797,6 +788,11 @@
         }// end of run method.        
     }// end of Worker class
     
+    /**
+     * Adds the mbean to the navigation tree
+     * @param mbean
+     * @throws Exception
+     */
     public void addManagedBean(ManagedBean mbean) throws Exception
     {
         TreeObject treeServerObject = _managedServerMap.get(mbean.getServer());
@@ -833,7 +829,6 @@
                         {
                             for (ManagedBean mbean : removalList)
                             {
-                                System.out.println("removing  " + mbean.getName() + " " + mbean.getType());
                                 TreeObject treeServerObject = _managedServerMap.get(mbean.getServer());
                                 List<TreeObject> domains = treeServerObject.getChildren();
                                 TreeObject domain = null;

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=502180&r1=502179&r2=502180
==============================================================================
--- 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 Feb  1 02:13:55 2007
@@ -218,9 +218,9 @@
         }
         
         // Customised parameter widgets        
-        if (_mbean.getType().endsWith(Constants.EXCHANGE) &&
+        if (_mbean.isExchange() &&
             Constants.EXCHANGE_TYPE_VALUES[2].equals(_mbean.getProperty(Constants.EXCHANGE_TYPE)) &&
-            _opData.getName().equalsIgnoreCase("createNewBinding"))
+            _opData.getName().equalsIgnoreCase(Constants.OPERATION_CREATE_BINDING))
         {                                  
             customCreateNewBinding(); 
             return;
@@ -278,10 +278,10 @@
                 combo.addSelectionListener(parameterSelectionListener);
                 valueInCombo = true;                
             }
-            else if (param.getType().equals("boolean") || param.getType().equals("java.lang.Boolean"))
+            else if (param.isBoolean())
             {
                 Combo combo = new Combo(_paramsComposite, SWT.READ_ONLY | SWT.DROP_DOWN);
-                combo.setItems(new String[] {"false", "true"});
+                combo.setItems(Constants.BOOLEAN_TYPE_VALUES);
                 combo.select(0);
                 param.setValueFromString(combo.getItem(0));
                 combo.setLayoutData(formData);
@@ -492,7 +492,7 @@
         {
             for (ParameterData param : params)
             {
-                param.setValue(null);
+                param.setDefaultValue();
             }
         }
     }
@@ -535,6 +535,14 @@
                 { 
                     if (param.getValue() == null || param.getValue().toString().length() == 0)
                     {
+                        // Customized check, because for this parameter null is allowed
+                        if (param.getName().equals(Constants.QUEUE_OWNER) &&
+                            _opData.getName().equals(Constants.OPERATION_CREATE_QUEUE))
+                        {
+                            continue;
+                        }
+                        // End of custom code
+                        
                         ViewUtility.popupInfoMessage(_form.getText(),
                                 "Please select the " + ViewUtility.getDisplayText(param.getName()));