summaryrefslogtreecommitdiff
path: root/java/management/eclipse-plugin/src
diff options
context:
space:
mode:
authorRobert Gemmell <robbie@apache.org>2010-01-06 22:04:43 +0000
committerRobert Gemmell <robbie@apache.org>2010-01-06 22:04:43 +0000
commit7df8c36dcbee682d7ad22d3e8088fbc2015e0df6 (patch)
tree2f3697aae3ce02fe044af392f53b84a407ca059a /java/management/eclipse-plugin/src
parent23a64e9e8dab5829da0b1bfa9a501124f95667b9 (diff)
downloadqpid-python-7df8c36dcbee682d7ad22d3e8088fbc2015e0df6.tar.gz
QPID-2322: Add new createUser and setPassword methods using String for passwords. Position these after the older now-deprecated char[] methods within the UserManagement interface to manipulate the MBeanInfo generated, resulting in overwriting the OperationData of the deprecated method on the old 0.5 management console and forcing use of these newer methods rather than the incompatible char[] based methods. Remove previously added compatibility check as it is no longer required. Update current management console to use the new String based methods when available.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@896693 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/management/eclipse-plugin/src')
-rw-r--r--java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ApplicationRegistry.java2
-rw-r--r--java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/users/UserManagementTabControl.java12
2 files changed, 12 insertions, 2 deletions
diff --git a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ApplicationRegistry.java b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ApplicationRegistry.java
index f3fc135efb..13485df718 100644
--- a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ApplicationRegistry.java
+++ b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ApplicationRegistry.java
@@ -47,7 +47,7 @@ public abstract class ApplicationRegistry
//max supported broker management interface supported by this release of the management console
public static final int SUPPORTED_QPID_JMX_API_MAJOR_VERSION = 1;
- public static final int SUPPORTED_QPID_JMX_API_MINOR_VERSION = 6;
+ public static final int SUPPORTED_QPID_JMX_API_MINOR_VERSION = 7;
public static final String DATA_DIR = System.getProperty("user.home") + File.separator + ".qpidmc";
diff --git a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/users/UserManagementTabControl.java b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/users/UserManagementTabControl.java
index 2051beafac..d7cd19e705 100644
--- a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/users/UserManagementTabControl.java
+++ b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/users/UserManagementTabControl.java
@@ -792,7 +792,17 @@ public class UserManagementTabControl extends TabControl
shell.dispose();
try
{
- boolean result = _ummb.createUser(username, passwordChars, read, write, admin);
+ boolean result = false;
+ // If we have Qpid JMX API 1.7 or above, use newer createUser method with String based password.
+ if (_ApiVersion.greaterThanOrEqualTo(1,7))
+ {
+ result = _ummb.createUser(username, password, read, write, admin);
+ }
+ else
+ {
+ result = _ummb.createUser(username, passwordChars, read, write, admin);
+ }
+
ViewUtility.operationResultFeedback(result, "Created user", "Failed to create user");
}
catch(Exception e5)