Author: robbie
Date: Tue Nov 10 15:05:14 2009
New Revision: 834490

URL: http://svn.apache.org/viewvc?rev=834490&view=rev
Log:
QPID-2195: only enable moving messages for newer brokers that dont suffer from 
issues impacting message delivery and results signalling

Modified:
    
qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/queue/QueueOperationsTabControl.java

Modified: 
qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/queue/QueueOperationsTabControl.java
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/queue/QueueOperationsTabControl.java?rev=834490&r1=834489&r2=834490&view=diff
==============================================================================
--- 
qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/queue/QueueOperationsTabControl.java
 (original)
+++ 
qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/queue/QueueOperationsTabControl.java
 Tue Nov 10 15:05:14 2009
@@ -383,22 +383,6 @@
             }
         });
         
-        final Button moveMessagesButton = 
_toolkit.createButton(buttonsComposite, "Move Message(s) ...", SWT.PUSH);
-        moveMessagesButton.setLayoutData(new GridData(SWT.FILL, SWT.TOP, 
false, false));
-        moveMessagesButton.setEnabled(false);
-        moveMessagesButton.addSelectionListener(new SelectionAdapter()
-        {
-            public void widgetSelected(SelectionEvent e)
-            {
-                if (_table.getSelectionIndex() == -1)
-                {
-                    return;
-                }
-                
-                moveOrCopyMessages(moveMessagesButton.getShell(), 
QueueOperations.MOVE);
-            }
-        });
-        
         if(_ApiVersion.lessThan(1, 3)) //if the server predates Qpid JMX API 
1.3
         {
             final Button deleteFirstMessageButton = 
_toolkit.createButton(buttonsComposite, "Delete 1st Unacquired Msg", SWT.PUSH);
@@ -428,6 +412,35 @@
             });
         }
         
+        final Button moveMessagesButton;
+        if(_ApiVersion.greaterThanOrEqualTo(1, 3)) 
+        {
+            //If the server supports Qpid JMX API 1.3, show the move message 
button.
+            //This is being disabled for earlier brokers due to bugs affecting 
the result appearance
+            //and impacting on the ability of the source queues to deliver 
further messages.
+            
+            moveMessagesButton = _toolkit.createButton(buttonsComposite, "Move 
Message(s) ...", SWT.PUSH);
+
+            moveMessagesButton.setLayoutData(new GridData(SWT.FILL, SWT.TOP, 
false, false));
+            moveMessagesButton.setEnabled(false);
+            moveMessagesButton.addSelectionListener(new SelectionAdapter()
+            {
+                public void widgetSelected(SelectionEvent e)
+                {
+                    if (_table.getSelectionIndex() == -1)
+                    {
+                        return;
+                    }
+
+                    moveOrCopyMessages(moveMessagesButton.getShell(), 
QueueOperations.MOVE);
+                }
+            });
+        }
+        else
+        {
+            moveMessagesButton = null;
+        }
+        
         final Button copyMessagesButton;
         if(_ApiVersion.greaterThanOrEqualTo(1, 3))//if the server supports 
Qpid JMX API 1.3
         {
@@ -570,7 +583,10 @@
                     headerText.setText("Select a message to view its header.");
                     redeliveredText.setText("-");
                     viewSelectedMsgButton.setEnabled(false);
-                    moveMessagesButton.setEnabled(false);
+                    if(moveMessagesButton != null)
+                    {
+                        moveMessagesButton.setEnabled(false);
+                    }
                     if(copyMessagesButton != null)
                     {
                         copyMessagesButton.setEnabled(false);
@@ -584,7 +600,10 @@
                 }
                 else
                 {   
-                    moveMessagesButton.setEnabled(true);
+                    if(moveMessagesButton != null)
+                    {
+                        moveMessagesButton.setEnabled(true);
+                    }
                     if(copyMessagesButton != null)
                     {
                         copyMessagesButton.setEnabled(true);



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to