diff options
| author | Robert Gemmell <robbie@apache.org> | 2009-11-10 15:05:14 +0000 |
|---|---|---|
| committer | Robert Gemmell <robbie@apache.org> | 2009-11-10 15:05:14 +0000 |
| commit | 4132f2521d6ee7e08b257ea0abdffd759208c445 (patch) | |
| tree | 7eb7495dee63c4cdbc23e925300ca39f785e45a3 /java | |
| parent | e8e9bbb924b0e31a86ad69a03f3912c73fd9e848 (diff) | |
| download | qpid-python-4132f2521d6ee7e08b257ea0abdffd759208c445.tar.gz | |
QPID-2195: only enable moving messages for newer brokers that dont suffer from issues impacting message delivery and results signalling
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@834490 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java')
| -rw-r--r-- | java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/queue/QueueOperationsTabControl.java | 55 |
1 files changed, 37 insertions, 18 deletions
diff --git a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/queue/QueueOperationsTabControl.java b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/queue/QueueOperationsTabControl.java index 28f4c5acba..8e0dc7d981 100644 --- a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/queue/QueueOperationsTabControl.java +++ b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/queue/QueueOperationsTabControl.java @@ -383,22 +383,6 @@ public class QueueOperationsTabControl extends TabControl } }); - 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 @@ public class QueueOperationsTabControl extends TabControl }); } + 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 @@ public class QueueOperationsTabControl extends TabControl 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 @@ public class QueueOperationsTabControl extends TabControl } else { - moveMessagesButton.setEnabled(true); + if(moveMessagesButton != null) + { + moveMessagesButton.setEnabled(true); + } if(copyMessagesButton != null) { copyMessagesButton.setEnabled(true); |
