[jboss-cvs] JBoss Messaging SVN: r7292 - in trunk: src/main/org/jboss/messaging/core/client and 11 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Jun 10 07:17:22 EDT 2009
Author: jmesnil
Date: 2009-06-10 07:17:21 -0400 (Wed, 10 Jun 2009)
New Revision: 7292
Modified:
trunk/src/config/common/schema/jbm-configuration.xsd
trunk/src/main/org/jboss/messaging/core/client/ClientRequestor.java
trunk/src/main/org/jboss/messaging/core/config/Configuration.java
trunk/src/main/org/jboss/messaging/core/config/impl/ConfigurationImpl.java
trunk/src/main/org/jboss/messaging/core/config/impl/FileConfiguration.java
trunk/src/main/org/jboss/messaging/core/management/ManagementService.java
trunk/src/main/org/jboss/messaging/core/management/impl/ManagementServiceImpl.java
trunk/src/main/org/jboss/messaging/core/management/impl/ReplicationOperationInvokerImpl.java
trunk/src/main/org/jboss/messaging/core/security/impl/SecurityStoreImpl.java
trunk/src/main/org/jboss/messaging/core/server/cluster/impl/BridgeImpl.java
trunk/src/main/org/jboss/messaging/core/server/cluster/impl/ClusterConnectionImpl.java
trunk/src/main/org/jboss/messaging/core/server/cluster/impl/ClusterManagerImpl.java
trunk/src/main/org/jboss/messaging/core/server/impl/MessagingServerImpl.java
trunk/tests/config/ConfigurationTest-full-config.xml
trunk/tests/joram-tests/src/org/jboss/test/jms/JBossMessagingAdmin.java
trunk/tests/src/org/jboss/messaging/tests/integration/management/AddressControlUsingCoreTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/management/SecurityManagementWithConfiguredAdminUserTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/management/SecurityManagementWithDefaultConfigurationTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/management/SecurityManagementWithModifiedConfigurationTest.java
trunk/tests/src/org/jboss/messaging/tests/unit/core/config/impl/ConfigurationImplTest.java
trunk/tests/src/org/jboss/messaging/tests/unit/core/config/impl/DefaultsFileConfigurationTest.java
trunk/tests/src/org/jboss/messaging/tests/unit/core/config/impl/FileConfigurationTest.java
Log:
JBMESSAGING-1629: do not hard-code management cluster admin user
* removed management-related code from SecurityStoreImpl
* added management-cluster-user in configuration
* the ManagementServiceImpl will create a user for cluster management and add
a role for it to MANAGE the management address
* ClientRequestor temp queue is prefixed by the address passed in parameter
* updated doc
Modified: trunk/src/config/common/schema/jbm-configuration.xsd
===================================================================
--- trunk/src/config/common/schema/jbm-configuration.xsd 2009-06-10 08:46:27 UTC (rev 7291)
+++ trunk/src/config/common/schema/jbm-configuration.xsd 2009-06-10 11:17:21 UTC (rev 7292)
@@ -1,249 +1,192 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema xmlns="urn:jboss:messaging" xmlns:xsd="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="urn:jboss:messaging" version="1.0">
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- targetNamespace="urn:jboss:messaging" xmlns="urn:jboss:messaging"
- elementFormDefault="qualified" attributeFormDefault="unqualified"
- version="1.0">
-
<xsd:element name="configuration">
<xsd:complexType>
<xsd:all>
- <xsd:element ref="clustered" maxOccurs="1"
- minOccurs="0" />
- <xsd:element ref="file-deployment-enabled" maxOccurs="1"
- minOccurs="0" />
- <xsd:element ref="persistence-enabled" maxOccurs="1"
- minOccurs="0" />
- <xsd:element name="scheduled-thread-pool-max-size"
- type="xsd:int" maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" ref="clustered"/>
+ <xsd:element maxOccurs="1" minOccurs="0" ref="file-deployment-enabled"/>
+ <xsd:element maxOccurs="1" minOccurs="0" ref="persistence-enabled"/>
+ <xsd:element maxOccurs="1" minOccurs="0" name="scheduled-thread-pool-max-size" type="xsd:int">
<xsd:annotation>
<xsd:documentation>
Maximum number of threads to use for the scheduled thread pool
</xsd:documentation>
</xsd:annotation>
</xsd:element>
- <xsd:element name="thread-pool-max-size"
- type="xsd:int" maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="thread-pool-max-size" type="xsd:int">
<xsd:annotation>
<xsd:documentation>
Maximum number of threads to use for the thread pool
</xsd:documentation>
</xsd:annotation>
</xsd:element>
- <xsd:element name="security-enabled" type="xsd:boolean"
- maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="security-enabled" type="xsd:boolean">
</xsd:element>
- <xsd:element name="security-invalidation-interval"
- type="xsd:unsignedLong" maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="security-invalidation-interval" type="xsd:unsignedLong">
</xsd:element>
- <xsd:element name="wild-card-routing-enabled"
- type="xsd:boolean" maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="wild-card-routing-enabled" type="xsd:boolean">
</xsd:element>
- <xsd:element name="management-address" type="xsd:string"
- maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="management-address" type="xsd:string">
</xsd:element>
- <xsd:element name="management-notification-address"
- type="xsd:string" maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="management-notification-address" type="xsd:string">
</xsd:element>
- <xsd:element name="management-cluster-password"
- type="xsd:string" maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="management-cluster-user" type="xsd:string">
</xsd:element>
- <xsd:element name="management-request-timeout"
- type="xsd:unsignedLong" maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="management-cluster-password" type="xsd:string">
+ </xsd:element>
+ <xsd:element maxOccurs="1" minOccurs="0" name="management-request-timeout" type="xsd:unsignedLong">
</xsd:element>
- <xsd:element name="jmx-management-enabled"
- type="xsd:boolean" maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="jmx-management-enabled" type="xsd:boolean">
</xsd:element>
- <xsd:element name="message-counter-enabled"
- type="xsd:boolean" maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="message-counter-enabled" type="xsd:boolean">
</xsd:element>
- <xsd:element name="message-counter-sample-period"
- type="xsd:unsignedLong" maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="message-counter-sample-period" type="xsd:unsignedLong">
</xsd:element>
- <xsd:element name="message-counter-max-day-history"
- type="xsd:positiveInteger" maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="message-counter-max-day-history" type="xsd:positiveInteger">
</xsd:element>
- <xsd:element name="connection-ttl-override"
- type="xsd:long" maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="connection-ttl-override" type="xsd:long">
</xsd:element>
- <xsd:element name="transaction-timeout" type="xsd:unsignedLong"
- maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="transaction-timeout" type="xsd:unsignedLong">
</xsd:element>
- <xsd:element name="transaction-timeout-scan-period"
- type="xsd:unsignedLong" maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="transaction-timeout-scan-period" type="xsd:unsignedLong">
</xsd:element>
- <xsd:element name="message-expiry-scan-period"
- type="xsd:unsignedLong" maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="message-expiry-scan-period" type="xsd:unsignedLong">
</xsd:element>
- <xsd:element name="message-expiry-thread-priority"
- type="xsd:positiveInteger" maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="message-expiry-thread-priority" type="xsd:positiveInteger">
</xsd:element>
- <xsd:element name="id-cache-size" type="xsd:positiveInteger"
- maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="id-cache-size" type="xsd:positiveInteger">
</xsd:element>
- <xsd:element name="persist-id-cache" type="xsd:boolean"
- maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="persist-id-cache" type="xsd:boolean">
</xsd:element>
- <xsd:element ref="remoting-interceptors" maxOccurs="1"
- minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" ref="remoting-interceptors">
</xsd:element>
- <xsd:element name="queue-activation-timeout"
- type="xsd:unsignedLong" maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="queue-activation-timeout" type="xsd:unsignedLong">
</xsd:element>
- <xsd:element name="backup" type="xsd:boolean"
- maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="backup" type="xsd:boolean">
</xsd:element>
- <xsd:element name="persist-delivery-count-before-delivery" type="xsd:boolean"
- maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="persist-delivery-count-before-delivery" type="xsd:boolean">
</xsd:element>
- <xsd:element name="backup-connector-ref"
- type="backup-connectorType" maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="backup-connector-ref" type="backup-connectorType">
</xsd:element>
- <xsd:element name="connectors" maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="connectors">
<xsd:complexType>
<xsd:sequence>
- <xsd:element name="connector" type="connectorType" maxOccurs="unbounded" minOccurs="0"></xsd:element>
+ <xsd:element maxOccurs="unbounded" minOccurs="0" name="connector" type="connectorType"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
- <xsd:element name="acceptors" maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="acceptors">
<xsd:complexType>
<xsd:sequence>
- <xsd:element name="acceptor" type="acceptorType"
- minOccurs="1" maxOccurs="unbounded">
+ <xsd:element maxOccurs="unbounded" minOccurs="1" name="acceptor" type="acceptorType">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
- <xsd:element name="broadcast-groups" maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="broadcast-groups">
<xsd:complexType>
<xsd:sequence>
- <xsd:element ref="broadcast-group" maxOccurs="unbounded"
- minOccurs="0">
+ <xsd:element maxOccurs="unbounded" minOccurs="0" ref="broadcast-group">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
- <xsd:element name="discovery-groups" maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="discovery-groups">
<xsd:complexType>
<xsd:sequence>
- <xsd:element ref="discovery-group" maxOccurs="unbounded"
- minOccurs="0">
+ <xsd:element maxOccurs="unbounded" minOccurs="0" ref="discovery-group">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
- <xsd:element name="diverts" maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="diverts">
<xsd:complexType>
<xsd:sequence>
- <xsd:element name="divert" type="divertType"
- maxOccurs="unbounded" minOccurs="0">
+ <xsd:element maxOccurs="unbounded" minOccurs="0" name="divert" type="divertType">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
- <xsd:element name="queues" maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="queues">
</xsd:element>
- <xsd:element name="bridges" maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="bridges">
<xsd:complexType>
<xsd:sequence>
- <xsd:element name="bridge" type="bridgeType"
- maxOccurs="unbounded" minOccurs="0">
+ <xsd:element maxOccurs="unbounded" minOccurs="0" name="bridge" type="bridgeType">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
- <xsd:element name="cluster-connections" maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="cluster-connections">
<xsd:complexType>
<xsd:sequence>
- <xsd:element name="cluster-connection" type="clusterConnectionType"
- maxOccurs="unbounded" minOccurs="0">
+ <xsd:element maxOccurs="unbounded" minOccurs="0" name="cluster-connection" type="clusterConnectionType">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
- <xsd:element name="paging-directory" type="xsd:string"
- maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="paging-directory" type="xsd:string">
</xsd:element>
- <xsd:element name="global-page-size" type="xsd:unsignedLong"
- maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="global-page-size" type="xsd:unsignedLong">
</xsd:element>
- <xsd:element name="paging-max-global-size-bytes"
- type="xsd:unsignedLong" maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="paging-max-global-size-bytes" type="xsd:unsignedLong">
</xsd:element>
- <xsd:element name="bindings-directory" type="xsd:string"
- maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="bindings-directory" type="xsd:string">
</xsd:element>
- <xsd:element name="create-bindings-dir"
- type="xsd:boolean" maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="create-bindings-dir" type="xsd:boolean">
</xsd:element>
- <xsd:element name="journal-directory" type="xsd:string"
- maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="journal-directory" type="xsd:string">
</xsd:element>
- <xsd:element name="create-journal-dir"
- type="xsd:boolean" maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="create-journal-dir" type="xsd:boolean">
</xsd:element>
- <xsd:element name="journal-type" type="journalType"
- maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="journal-type" type="journalType">
</xsd:element>
- <xsd:element name="journal-aio-buffer-timeout"
- type="xsd:long" maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="journal-aio-buffer-timeout" type="xsd:long">
</xsd:element>
- <xsd:element name="journal-aio-buffer-size"
- type="xsd:long" maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="journal-aio-buffer-size" type="xsd:long">
</xsd:element>
- <xsd:element name="journal-aio-flush-on-sync"
- type="xsd:boolean" maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="journal-aio-flush-on-sync" type="xsd:boolean">
</xsd:element>
- <xsd:element name="journal-sync-transactional"
- type="xsd:boolean" maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="journal-sync-transactional" type="xsd:boolean">
</xsd:element>
- <xsd:element name="journal-sync-non-transactional"
- type="xsd:boolean" maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="journal-sync-non-transactional" type="xsd:boolean">
</xsd:element>
- <xsd:element name="log-journal-write-rate"
- type="xsd:boolean" maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="log-journal-write-rate" type="xsd:boolean">
</xsd:element>
- <xsd:element name="journal-file-size" type="xsd:unsignedLong"
- maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="journal-file-size" type="xsd:unsignedLong">
</xsd:element>
- <xsd:element name="journal-min-files" type="xsd:positiveInteger"
- maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="journal-min-files" type="xsd:positiveInteger">
</xsd:element>
- <xsd:element name="journal-max-aio" type="xsd:positiveInteger"
- maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="journal-max-aio" type="xsd:positiveInteger">
</xsd:element>
- <xsd:element name="perf-blast-pages" type="xsd:positiveInteger"
- maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="perf-blast-pages" type="xsd:positiveInteger">
</xsd:element>
- <xsd:element name="large-messages-directory"
- type="xsd:string" maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="large-messages-directory" type="xsd:string">
</xsd:element>
- <xsd:element name="security-settings" maxOccurs="1"
- minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="security-settings">
</xsd:element>
- <xsd:element name="address-settings" maxOccurs="1"
- minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="address-settings">
</xsd:element>
</xsd:all>
</xsd:complexType>
</xsd:element>
- <xsd:element name="clustered" type="xsd:boolean"></xsd:element>
+ <xsd:element name="clustered" type="xsd:boolean"/>
- <xsd:element name="file-deployment-enabled" type="xsd:boolean"></xsd:element>
+ <xsd:element name="file-deployment-enabled" type="xsd:boolean"/>
- <xsd:element name="persistence-enabled" type="xsd:boolean"></xsd:element>
+ <xsd:element name="persistence-enabled" type="xsd:boolean"/>
- <xsd:element name="local-bind-address" type="xsd:string"></xsd:element>
+ <xsd:element name="local-bind-address" type="xsd:string"/>
- <xsd:element name="local-bind-port" type="portRange"></xsd:element>
+ <xsd:element name="local-bind-port" type="portRange"/>
- <xsd:element name="group-address" type="xsd:string"></xsd:element>
+ <xsd:element name="group-address" type="xsd:string"/>
- <xsd:element name="group-port" type="portRange"></xsd:element>
+ <xsd:element name="group-port" type="portRange"/>
- <xsd:element name="broadcast-period" type="xsd:unsignedLong"></xsd:element>
+ <xsd:element name="broadcast-period" type="xsd:unsignedLong"/>
<xsd:element name="connector-ref" type="connector-refType">
</xsd:element>
@@ -251,87 +194,74 @@
<xsd:element name="broadcast-group">
<xsd:complexType>
<xsd:sequence>
- <xsd:element ref="local-bind-address" maxOccurs="1"
- minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" ref="local-bind-address">
</xsd:element>
- <xsd:element ref="local-bind-port" maxOccurs="1"
- minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" ref="local-bind-port">
</xsd:element>
- <xsd:element ref="group-address" maxOccurs="1"
- minOccurs="1">
+ <xsd:element maxOccurs="1" minOccurs="1" ref="group-address">
</xsd:element>
- <xsd:element ref="group-port" maxOccurs="1"
- minOccurs="1">
+ <xsd:element maxOccurs="1" minOccurs="1" ref="group-port">
</xsd:element>
- <xsd:element ref="broadcast-period" maxOccurs="1"
- minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" ref="broadcast-period">
</xsd:element>
- <xsd:element ref="connector-ref" maxOccurs="unbounded"
- minOccurs="0">
+ <xsd:element maxOccurs="unbounded" minOccurs="0" ref="connector-ref">
</xsd:element>
</xsd:sequence>
- <xsd:attribute name="name" type="xsd:ID" use="required"></xsd:attribute>
+ <xsd:attribute name="name" type="xsd:ID" use="required"/>
</xsd:complexType>
</xsd:element>
- <xsd:element name="refresh-timeout" type="xsd:unsignedLong"></xsd:element>
+ <xsd:element name="refresh-timeout" type="xsd:unsignedLong"/>
<xsd:element name="discovery-group">
<xsd:complexType>
<xsd:sequence>
- <xsd:element ref="group-address" maxOccurs="1"
- minOccurs="1">
+ <xsd:element maxOccurs="1" minOccurs="1" ref="group-address">
</xsd:element>
- <xsd:element ref="group-port" maxOccurs="1"
- minOccurs="1">
+ <xsd:element maxOccurs="1" minOccurs="1" ref="group-port">
</xsd:element>
- <xsd:element ref="refresh-timeout" maxOccurs="1"
- minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" ref="refresh-timeout">
</xsd:element>
</xsd:sequence>
- <xsd:attribute name="name" type="xsd:ID" use="required"></xsd:attribute>
+ <xsd:attribute name="name" type="xsd:ID" use="required"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="discovery-group-ref">
<xsd:complexType>
- <xsd:attribute name="discovery-group-name"
- type="xsd:IDREF">
+ <xsd:attribute name="discovery-group-name" type="xsd:IDREF">
</xsd:attribute>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="connector-refType">
- <xsd:attribute name="connector-name" type="xsd:IDREF"
- use="required">
+ <xsd:attribute name="connector-name" type="xsd:IDREF" use="required">
</xsd:attribute>
- <xsd:attribute name="backup-connector-name" type="xsd:IDREF"
- use="optional">
+ <xsd:attribute name="backup-connector-name" type="xsd:IDREF" use="optional">
</xsd:attribute>
</xsd:complexType>
<xsd:element name="remoting-interceptors">
<xsd:complexType>
<xsd:sequence>
- <xsd:element name="class-name" type="xsd:string"
- maxOccurs="unbounded" minOccurs="1">
+ <xsd:element maxOccurs="unbounded" minOccurs="1" name="class-name" type="xsd:string">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="paramType">
- <xsd:attribute name="key" type="xsd:string" use="required"></xsd:attribute>
- <xsd:attribute name="value" type="xsd:string" use="required"></xsd:attribute>
+ <xsd:attribute name="key" type="xsd:string" use="required"/>
+ <xsd:attribute name="value" type="xsd:string" use="required"/>
<xsd:attribute name="type" use="required">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
- <xsd:enumeration value="String"></xsd:enumeration>
- <xsd:enumeration value="Integer"></xsd:enumeration>
- <xsd:enumeration value="Long"></xsd:enumeration>
- <xsd:enumeration value="Boolean"></xsd:enumeration>
- <xsd:enumeration value="Float"></xsd:enumeration>
- <xsd:enumeration value="Double"></xsd:enumeration>
+ <xsd:enumeration value="String"/>
+ <xsd:enumeration value="Integer"/>
+ <xsd:enumeration value="Long"/>
+ <xsd:enumeration value="Boolean"/>
+ <xsd:enumeration value="Float"/>
+ <xsd:enumeration value="Double"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
@@ -339,151 +269,120 @@
<xsd:complexType name="connectorType">
<xsd:sequence>
- <xsd:element name="factory-class" type="xsd:string"
- minOccurs="1" maxOccurs="1">
+ <xsd:element maxOccurs="1" minOccurs="1" name="factory-class" type="xsd:string">
</xsd:element>
- <xsd:element name="param" type="paramType"
- maxOccurs="unbounded" minOccurs="0">
+ <xsd:element maxOccurs="unbounded" minOccurs="0" name="param" type="paramType">
</xsd:element>
</xsd:sequence>
- <xsd:attribute name="name" type="xsd:ID" use="required"></xsd:attribute>
+ <xsd:attribute name="name" type="xsd:ID" use="required"/>
</xsd:complexType>
<xsd:complexType name="acceptorType">
<xsd:sequence>
- <xsd:element name="factory-class" type="xsd:string"
- minOccurs="1" maxOccurs="1">
+ <xsd:element maxOccurs="1" minOccurs="1" name="factory-class" type="xsd:string">
</xsd:element>
- <xsd:element name="param" type="paramType"
- maxOccurs="unbounded" minOccurs="0">
+ <xsd:element maxOccurs="unbounded" minOccurs="0" name="param" type="paramType">
</xsd:element>
</xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="optional"></xsd:attribute>
+ <xsd:attribute name="name" type="xsd:string" use="optional"/>
</xsd:complexType>
<xsd:complexType name="bridgeType">
<xsd:sequence>
- <xsd:element name="queue-name" type="xsd:IDREF"
- maxOccurs="1" minOccurs="1">
+ <xsd:element maxOccurs="1" minOccurs="1" name="queue-name" type="xsd:IDREF">
</xsd:element>
- <xsd:element name="forwarding-address" type="xsd:string"
- maxOccurs="1" minOccurs="1">
+ <xsd:element maxOccurs="1" minOccurs="1" name="forwarding-address" type="xsd:string">
</xsd:element>
- <xsd:element name="filter"
- maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="filter">
<xsd:complexType>
- <xsd:attribute name="string" type="xsd:string" use="required"></xsd:attribute>
+ <xsd:attribute name="string" type="xsd:string" use="required"/>
</xsd:complexType>
</xsd:element>
- <xsd:element name="transformer-class-name" type="xsd:string"
- maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="transformer-class-name" type="xsd:string">
</xsd:element>
- <xsd:element name="retry-interval" type="xsd:unsignedLong"
- maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="retry-interval" type="xsd:unsignedLong">
</xsd:element>
- <xsd:element name="retry-interval-multiplier"
- type="xsd:double" maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="retry-interval-multiplier" type="xsd:double">
</xsd:element>
- <xsd:element name="reconnect-attempts"
- type="minusOneOrMoreInteger" maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="reconnect-attempts" type="minusOneOrMoreInteger">
</xsd:element>
- <xsd:element name="failover-on-server-shutdown"
- type="xsd:boolean" maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="failover-on-server-shutdown" type="xsd:boolean">
</xsd:element>
- <xsd:element name="use-duplicate-detection"
- type="xsd:boolean" maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="use-duplicate-detection" type="xsd:boolean">
</xsd:element>
<xsd:choice>
- <xsd:element name="connector-ref"
- type="connector-refType" minOccurs="1" maxOccurs="1">
+ <xsd:element maxOccurs="1" minOccurs="1" name="connector-ref" type="connector-refType">
</xsd:element>
- <xsd:element name="discovery-group-ref" minOccurs="1"
- maxOccurs="1">
+ <xsd:element maxOccurs="1" minOccurs="1" name="discovery-group-ref">
<xsd:complexType>
- <xsd:attribute name="discovery-group-name"
- type="xsd:IDREF" use="required">
+ <xsd:attribute name="discovery-group-name" type="xsd:IDREF" use="required">
</xsd:attribute>
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required"></xsd:attribute>
+ <xsd:attribute name="name" type="xsd:string" use="required"/>
</xsd:complexType>
<xsd:complexType name="clusterConnectionType">
<xsd:sequence>
- <xsd:element name="address" type="xsd:string"
- maxOccurs="1" minOccurs="1">
+ <xsd:element maxOccurs="1" minOccurs="1" name="address" type="xsd:string">
</xsd:element>
- <xsd:element name="retry-interval" type="xsd:unsignedLong"
- maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="retry-interval" type="xsd:unsignedLong">
</xsd:element>
- <xsd:element name="use-duplicate-detection"
- type="xsd:boolean" maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="use-duplicate-detection" type="xsd:boolean">
</xsd:element>
- <xsd:element name="forward-when-no-consumers"
- type="xsd:boolean" maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="forward-when-no-consumers" type="xsd:boolean">
</xsd:element>
- <xsd:element name="max-hops"
- type="xsd:positiveInteger" maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="max-hops" type="xsd:positiveInteger">
</xsd:element>
<xsd:choice>
- <xsd:element name="connector-ref"
- type="connector-refType" minOccurs="1" maxOccurs="unbounded">
+ <xsd:element maxOccurs="unbounded" minOccurs="1" name="connector-ref" type="connector-refType">
</xsd:element>
- <xsd:element name="discovery-group-ref" minOccurs="1"
- maxOccurs="1">
+ <xsd:element maxOccurs="1" minOccurs="1" name="discovery-group-ref">
<xsd:complexType>
- <xsd:attribute name="discovery-group-name"
- type="xsd:IDREF" use="required">
+ <xsd:attribute name="discovery-group-name" type="xsd:IDREF" use="required">
</xsd:attribute>
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required"></xsd:attribute>
+ <xsd:attribute name="name" type="xsd:string" use="required"/>
</xsd:complexType>
<xsd:complexType name="divertType">
<xsd:sequence>
- <xsd:element name="routing-name" type="xsd:string"
- maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="routing-name" type="xsd:string">
</xsd:element>
- <xsd:element name="address" type="xsd:string" maxOccurs="1"
- minOccurs="1">
+ <xsd:element maxOccurs="1" minOccurs="1" name="address" type="xsd:string">
</xsd:element>
- <xsd:element name="forwarding-address" type="xsd:string"
- maxOccurs="1" minOccurs="1">
+ <xsd:element maxOccurs="1" minOccurs="1" name="forwarding-address" type="xsd:string">
</xsd:element>
- <xsd:element name="filter"
- maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="filter">
<xsd:complexType>
- <xsd:attribute name="string" type="xsd:string" use="required"></xsd:attribute>
+ <xsd:attribute name="string" type="xsd:string" use="required"/>
</xsd:complexType>
</xsd:element>
- <xsd:element name="transformer-class-name" type="xsd:string"
- maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="transformer-class-name" type="xsd:string">
</xsd:element>
- <xsd:element name="exclusive" type="xsd:boolean"
- maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="exclusive" type="xsd:boolean">
</xsd:element>
</xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required"></xsd:attribute>
+ <xsd:attribute name="name" type="xsd:string" use="required"/>
</xsd:complexType>
<xsd:simpleType name="journalType">
<xsd:restriction base="xsd:string">
- <xsd:enumeration value="ASYNCIO"></xsd:enumeration>
- <xsd:enumeration value="NIO"></xsd:enumeration>
+ <xsd:enumeration value="ASYNCIO"/>
+ <xsd:enumeration value="NIO"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:element name="security-settings">
<xsd:complexType>
<xsd:sequence>
- <xsd:element name="security-setting"
- maxOccurs="unbounded" minOccurs="0">
+ <xsd:element maxOccurs="unbounded" minOccurs="0" name="security-setting">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
@@ -492,22 +391,21 @@
<xsd:element name="security-setting">
<xsd:complexType>
<xsd:sequence>
- <xsd:element name="permission" minOccurs="0" maxOccurs="unbounded">
+ <xsd:element maxOccurs="unbounded" minOccurs="0" name="permission">
<xsd:complexType>
- <xsd:attribute name="type" type="xsd:string" use="required"></xsd:attribute>
- <xsd:attribute name="roles" type="xsd:string" use="required"></xsd:attribute>
+ <xsd:attribute name="type" type="xsd:string" use="required"/>
+ <xsd:attribute name="roles" type="xsd:string" use="required"/>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
- <xsd:attribute name="match" type="xsd:string" use="required"></xsd:attribute>
+ <xsd:attribute name="match" type="xsd:string" use="required"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="address-settings">
<xsd:complexType>
<xsd:sequence>
- <xsd:element name="address-setting"
- maxOccurs="unbounded" minOccurs="0">
+ <xsd:element maxOccurs="unbounded" minOccurs="0" name="address-setting">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
@@ -516,52 +414,39 @@
<xsd:element name="address-setting">
<xsd:complexType>
<xsd:all>
- <xsd:element name="clustered" type="xsd:boolean"
- maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="clustered" type="xsd:boolean">
</xsd:element>
- <xsd:element name="dead-letter-address" type="xsd:string"
- maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="dead-letter-address" type="xsd:string">
</xsd:element>
- <xsd:element name="expiry-address" type="xsd:string"
- maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="expiry-address" type="xsd:string">
</xsd:element>
- <xsd:element name="redelivery-delay" type="xsd:unsignedLong"
- maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="redelivery-delay" type="xsd:unsignedLong">
</xsd:element>
- <xsd:element name="max-delivery-attempts" type="xsd:unsignedInt"
- maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="max-delivery-attempts" type="xsd:unsignedInt">
</xsd:element>
- <xsd:element name="max-size-bytes" type="xsd:long"
- maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="max-size-bytes" type="xsd:long">
</xsd:element>
- <xsd:element name="page-size-bytes" type="xsd:unsignedLong"
- maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="page-size-bytes" type="xsd:unsignedLong">
</xsd:element>
- <xsd:element name="drop-messages-when-full" type="xsd:boolean"
- maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="drop-messages-when-full" type="xsd:boolean">
</xsd:element>
- <xsd:element name="distribution-policy-class" type="xsd:string"
- maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="distribution-policy-class" type="xsd:string">
</xsd:element>
- <xsd:element name="message-counter-history-day-limit" type="xsd:positiveInteger"
- maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="message-counter-history-day-limit" type="xsd:positiveInteger">
</xsd:element>
- <xsd:element name="last-value-queue" type="xsd:boolean"
- maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="last-value-queue" type="xsd:boolean">
</xsd:element>
- <xsd:element name="redistribution-delay" type="xsd:unsignedLong"
- maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="redistribution-delay" type="xsd:unsignedLong">
</xsd:element>
</xsd:all>
- <xsd:attribute name="match" type="xsd:string" use="required"></xsd:attribute>
+ <xsd:attribute name="match" type="xsd:string" use="required"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="queues">
<xsd:complexType>
<xsd:sequence>
- <xsd:element name="queue"
- maxOccurs="unbounded" minOccurs="0">
+ <xsd:element maxOccurs="unbounded" minOccurs="0" name="queue">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
@@ -570,38 +455,34 @@
<xsd:element name="queue">
<xsd:complexType>
<xsd:all>
- <xsd:element name="address" type="xsd:string"
- maxOccurs="1" minOccurs="1">
+ <xsd:element maxOccurs="1" minOccurs="1" name="address" type="xsd:string">
</xsd:element>
- <xsd:element name="filter"
- maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="filter">
<xsd:complexType>
- <xsd:attribute name="string" type="xsd:string" use="required"></xsd:attribute>
+ <xsd:attribute name="string" type="xsd:string" use="required"/>
</xsd:complexType>
</xsd:element>
- <xsd:element name="durable" type="xsd:boolean"
- maxOccurs="1" minOccurs="0">
+ <xsd:element maxOccurs="1" minOccurs="0" name="durable" type="xsd:boolean">
</xsd:element>
</xsd:all>
- <xsd:attribute name="name" type="xsd:ID" use="required"></xsd:attribute>
+ <xsd:attribute name="name" type="xsd:ID" use="required"/>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="backup-connectorType">
- <xsd:attribute name="connector-name" type="xsd:IDREF"
- use="required">
+ <xsd:attribute name="connector-name" type="xsd:IDREF" use="required">
</xsd:attribute>
</xsd:complexType>
<xsd:simpleType name="portRange">
<xsd:restriction base="xsd:int">
- <xsd:minExclusive value="1024"></xsd:minExclusive>
+ <xsd:minExclusive value="1024"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="minusOneOrMoreInteger">
<xsd:restriction base="xsd:int">
- <xsd:minInclusive value="-1"></xsd:minInclusive>
+ <xsd:minInclusive value="-1"/>
</xsd:restriction>
</xsd:simpleType>
Modified: trunk/src/main/org/jboss/messaging/core/client/ClientRequestor.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/client/ClientRequestor.java 2009-06-10 08:46:27 UTC (rev 7291)
+++ trunk/src/main/org/jboss/messaging/core/client/ClientRequestor.java 2009-06-10 11:17:21 UTC (rev 7292)
@@ -48,7 +48,7 @@
queueSession = session;
requestProducer = queueSession.createProducer(requestAddress);
- replyQueue = new SimpleString(UUID.randomUUID().toString());
+ replyQueue = new SimpleString(requestAddress + "." + UUID.randomUUID().toString());
queueSession.createTemporaryQueue(replyQueue, replyQueue);
replyConsumer = queueSession.createConsumer(replyQueue);
}
Modified: trunk/src/main/org/jboss/messaging/core/config/Configuration.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/config/Configuration.java 2009-06-10 08:46:27 UTC (rev 7291)
+++ trunk/src/main/org/jboss/messaging/core/config/Configuration.java 2009-06-10 11:17:21 UTC (rev 7292)
@@ -146,6 +146,8 @@
SimpleString getManagementNotificationAddress();
+ String getManagementClusterUser();
+
String getManagementClusterPassword();
long getManagementRequestTimeout();
Modified: trunk/src/main/org/jboss/messaging/core/config/impl/ConfigurationImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/config/impl/ConfigurationImpl.java 2009-06-10 08:46:27 UTC (rev 7291)
+++ trunk/src/main/org/jboss/messaging/core/config/impl/ConfigurationImpl.java 2009-06-10 11:17:21 UTC (rev 7292)
@@ -121,6 +121,8 @@
public static final SimpleString DEFAULT_MANAGEMENT_NOTIFICATION_ADDRESS = new SimpleString("jbm.notifications");
+ public static final String DEFAULT_MANAGEMENT_CLUSTER_USER = "JBM.MANAGEMENT.ADMIN.USER";
+
public static final String DEFAULT_MANAGEMENT_CLUSTER_PASSWORD = "CHANGE ME!!";
public static final long DEFAULT_MANAGEMENT_REQUEST_TIMEOUT = 5000;
@@ -265,6 +267,8 @@
protected SimpleString managementNotificationAddress = DEFAULT_MANAGEMENT_NOTIFICATION_ADDRESS;
+ protected String managementClusterUser = DEFAULT_MANAGEMENT_CLUSTER_USER;
+
protected String managementClusterPassword = DEFAULT_MANAGEMENT_CLUSTER_PASSWORD;
protected long managementRequestTimeout = DEFAULT_MANAGEMENT_REQUEST_TIMEOUT;
@@ -824,6 +828,11 @@
managementNotificationAddress = address;
}
+ public String getManagementClusterUser()
+ {
+ return managementClusterUser;
+ }
+
public String getManagementClusterPassword()
{
return managementClusterPassword;
Modified: trunk/src/main/org/jboss/messaging/core/config/impl/FileConfiguration.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/config/impl/FileConfiguration.java 2009-06-10 08:46:27 UTC (rev 7291)
+++ trunk/src/main/org/jboss/messaging/core/config/impl/FileConfiguration.java 2009-06-10 11:17:21 UTC (rev 7292)
@@ -69,6 +69,8 @@
private static final String CONFIGURATION_SCHEMA_URL = "schema/jbm-configuration.xsd";
+ // Static --------------------------------------------------------------------------
+
// Attributes ----------------------------------------------------------------------
private String configurationUrl = DEFAULT_CONFIGURATION_URL;
@@ -137,8 +139,10 @@
"management-notification-address",
managementNotificationAddress.toString()));
- managementClusterPassword = getString(e, "management-cluster-password", managementClusterPassword.toString());
+ managementClusterPassword = getString(e, "management-cluster-password", managementClusterPassword);
+ managementClusterUser = getString(e, "management-cluster-user", managementClusterUser);
+
managementRequestTimeout = getLong(e, "management-request-timeout", managementRequestTimeout);
NodeList interceptorNodes = e.getElementsByTagName("remoting-interceptors");
Modified: trunk/src/main/org/jboss/messaging/core/management/ManagementService.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/management/ManagementService.java 2009-06-10 08:46:27 UTC (rev 7291)
+++ trunk/src/main/org/jboss/messaging/core/management/ManagementService.java 2009-06-10 11:17:21 UTC (rev 7292)
@@ -67,6 +67,8 @@
MessageCounterManager getMessageCounterManager();
+ String getClusterUser();
+
String getClusterPassword();
SimpleString getManagementAddress();
Modified: trunk/src/main/org/jboss/messaging/core/management/impl/ManagementServiceImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/management/impl/ManagementServiceImpl.java 2009-06-10 08:46:27 UTC (rev 7291)
+++ trunk/src/main/org/jboss/messaging/core/management/impl/ManagementServiceImpl.java 2009-06-10 11:17:21 UTC (rev 7292)
@@ -46,6 +46,7 @@
import org.jboss.messaging.core.config.cluster.ClusterConnectionConfiguration;
import org.jboss.messaging.core.config.cluster.DiscoveryGroupConfiguration;
import org.jboss.messaging.core.config.cluster.DivertConfiguration;
+import org.jboss.messaging.core.config.impl.ConfigurationImpl;
import org.jboss.messaging.core.logging.Logger;
import org.jboss.messaging.core.management.AcceptorControlMBean;
import org.jboss.messaging.core.management.BridgeControlMBean;
@@ -95,6 +96,8 @@
{
// Constants -----------------------------------------------------
+ public static final String CLUSTER_MANAGEMENT_ROLE = "cluster.management";
+
private static final Logger log = Logger.getLogger(ManagementServiceImpl.class);
private final MBeanServer mbeanServer;
@@ -123,6 +126,8 @@
private final SimpleString managementAddress;
+ private final String managementClusterUser;
+
private final String managementClusterPassword;
private final long managementRequestTimeout;
@@ -137,6 +142,19 @@
private ReplicationOperationInvoker replicationInvoker;
+ // Static --------------------------------------------------------
+
+ private static void checkDefaultManagementClusterCredentials(String user, String password)
+ {
+ if (ConfigurationImpl.DEFAULT_MANAGEMENT_CLUSTER_USER.equals(user)
+ && ConfigurationImpl.DEFAULT_MANAGEMENT_CLUSTER_PASSWORD.equals(password))
+ {
+ log.warn("It has been detected that the cluster admin user and password which are used to " +
+ "replicate management operation from one node to the other have not been changed from the installation default. " +
+ "Please see the JBoss Messaging user guide for instructions on how to do this.");
+ }
+ }
+
// Constructor ----------------------------------------------------
public ManagementServiceImpl(final MBeanServer mbeanServer, final Configuration configuration)
@@ -146,9 +164,12 @@
this.messageCounterEnabled = configuration.isMessageCounterEnabled();
this.managementAddress = configuration.getManagementAddress();
this.managementNotificationAddress = configuration.getManagementNotificationAddress();
+ this.managementClusterUser = configuration.getManagementClusterUser();
this.managementClusterPassword = configuration.getManagementClusterPassword();
this.managementRequestTimeout = configuration.getManagementRequestTimeout();
+ checkDefaultManagementClusterCredentials(managementClusterUser, managementClusterPassword);
+
registry = new HashMap<String, Object>();
broadcaster = new NotificationBroadcasterSupport();
notificationsEnabled = true;
@@ -156,7 +177,8 @@
messageCounterManager.setMaxDayCount(configuration.getMessageCounterMaxDayHistory());
messageCounterManager.reschedule(configuration.getMessageCounterSamplePeriod());
- replicationInvoker = new ReplicationOperationInvokerImpl(managementClusterPassword,
+ replicationInvoker = new ReplicationOperationInvokerImpl(managementClusterUser,
+ managementClusterPassword,
managementAddress,
managementRequestTimeout);
}
@@ -186,7 +208,14 @@
this.securityRepository = securityRepository;
this.storageManager = storageManager;
this.messagingServer = messagingServer;
-
+
+ messagingServer.getSecurityManager().addUser(managementClusterUser, managementClusterPassword);
+ messagingServer.getSecurityManager().addRole(managementClusterUser, CLUSTER_MANAGEMENT_ROLE);
+ Set<Role> roles = new HashSet<Role>();
+ roles.add(new Role(CLUSTER_MANAGEMENT_ROLE, true, true, true, true, true, true, true));
+ messagingServer.getSecurityRepository().addMatch(configuration.getManagementAddress().toString(), roles);
+ messagingServer.getSecurityRepository().addMatch(configuration.getManagementAddress() + ".*", roles);
+
messagingServerControl = new MessagingServerControl(postOffice,
configuration,
resourceManager,
@@ -508,6 +537,11 @@
return managementNotificationAddress;
}
+ public String getClusterUser()
+ {
+ return managementClusterUser;
+ }
+
public String getClusterPassword()
{
return managementClusterPassword;
Modified: trunk/src/main/org/jboss/messaging/core/management/impl/ReplicationOperationInvokerImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/management/impl/ReplicationOperationInvokerImpl.java 2009-06-10 08:46:27 UTC (rev 7291)
+++ trunk/src/main/org/jboss/messaging/core/management/impl/ReplicationOperationInvokerImpl.java 2009-06-10 11:17:21 UTC (rev 7292)
@@ -22,8 +22,6 @@
package org.jboss.messaging.core.management.impl;
-import static org.jboss.messaging.core.security.impl.SecurityStoreImpl.CLUSTER_ADMIN_USER;
-
import org.jboss.messaging.core.client.ClientMessage;
import org.jboss.messaging.core.client.ClientRequestor;
import org.jboss.messaging.core.client.ClientSession;
@@ -53,6 +51,8 @@
private final long timeout;
+ private final String clusterUser;
+
private final String clusterPassword;
private final SimpleString managementAddress;
@@ -69,11 +69,13 @@
// Constructors --------------------------------------------------
- public ReplicationOperationInvokerImpl(final String clusterPassword,
+ public ReplicationOperationInvokerImpl(final String clusterUser,
+ final String clusterPassword,
final SimpleString managementAddress,
final long managementRequestTimeout)
{
this.timeout = managementRequestTimeout;
+ this.clusterUser = clusterUser;
this.clusterPassword = clusterPassword;
this.managementAddress = managementAddress;
}
@@ -85,7 +87,7 @@
if (clientSession == null)
{
ClientSessionFactory sf = new ClientSessionFactoryImpl(new TransportConfiguration(InVMConnectorFactory.class.getName()));
- clientSession = sf.createSession(CLUSTER_ADMIN_USER, clusterPassword, false, true, true, false, 1);
+ clientSession = sf.createSession(clusterUser, clusterPassword, false, true, true, false, 1);
requestor = new ClientRequestor(clientSession, managementAddress);
clientSession.start();
}
Modified: trunk/src/main/org/jboss/messaging/core/security/impl/SecurityStoreImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/security/impl/SecurityStoreImpl.java 2009-06-10 08:46:27 UTC (rev 7291)
+++ trunk/src/main/org/jboss/messaging/core/security/impl/SecurityStoreImpl.java 2009-06-10 11:17:21 UTC (rev 7292)
@@ -22,14 +22,18 @@
package org.jboss.messaging.core.security.impl;
+import static org.jboss.messaging.core.management.NotificationType.SECURITY_AUTHENTICATION_VIOLATION;
+
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+
import org.jboss.messaging.core.client.management.impl.ManagementHelper;
-import static org.jboss.messaging.core.config.impl.ConfigurationImpl.DEFAULT_MANAGEMENT_CLUSTER_PASSWORD;
import org.jboss.messaging.core.exception.MessagingException;
import org.jboss.messaging.core.logging.Logger;
import org.jboss.messaging.core.management.Notification;
import org.jboss.messaging.core.management.NotificationService;
import org.jboss.messaging.core.management.NotificationType;
-import static org.jboss.messaging.core.management.NotificationType.SECURITY_AUTHENTICATION_VIOLATION;
import org.jboss.messaging.core.security.CheckType;
import org.jboss.messaging.core.security.JBMSecurityManager;
import org.jboss.messaging.core.security.Role;
@@ -41,10 +45,6 @@
import org.jboss.messaging.utils.SimpleString;
import org.jboss.messaging.utils.TypedProperties;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-
/**
* The JBM SecurityStore implementation
*
@@ -67,8 +67,6 @@
private static final Logger log = Logger.getLogger(SecurityStoreImpl.class);
- public static final String CLUSTER_ADMIN_USER = "JBM.MANAGEMENT.ADMIN.USER";
-
// Static --------------------------------------------------------
// Attributes ----------------------------------------------------
@@ -87,8 +85,6 @@
private final boolean securityEnabled;
- private final String managementClusterPassword;
-
private final NotificationService notificationService;
// Constructors --------------------------------------------------
@@ -100,17 +96,13 @@
final JBMSecurityManager securityManager,
final long invalidationInterval,
final boolean securityEnabled,
- final String managementClusterPassword,
final NotificationService notificationService)
{
this.securityRepository = securityRepository;
this.securityManager = securityManager;
this.invalidationInterval = invalidationInterval;
this.securityEnabled = securityEnabled;
- this.managementClusterPassword = managementClusterPassword;
this.notificationService = notificationService;
-
- checkDefaultManagementClusterPassword(managementClusterPassword);
}
// SecurityManager implementation --------------------------------
@@ -119,35 +111,20 @@
{
if (securityEnabled)
{
- if (CLUSTER_ADMIN_USER.equals(user))
+ if (!securityManager.validateUser(user, password))
{
- if (trace) { log.trace("Authenticating cluster admin user"); }
-
- checkDefaultManagementClusterPassword(password);
-
- // The special user CLUSTER_ADMIN_USER is used for creating sessions that replicate management operation between nodes
- if (!managementClusterPassword.equals(password))
+ if (notificationService != null)
{
- throw new MessagingException(MessagingException.SECURITY_EXCEPTION, "Unable to validate user: " + user);
- }
- }
- else
- {
- if (!securityManager.validateUser(user, password))
- {
- if (notificationService != null)
- {
- TypedProperties props = new TypedProperties();
+ TypedProperties props = new TypedProperties();
- props.putStringProperty(ManagementHelper.HDR_USER, SimpleString.toSimpleString(user));
+ props.putStringProperty(ManagementHelper.HDR_USER, SimpleString.toSimpleString(user));
- Notification notification = new Notification(null, SECURITY_AUTHENTICATION_VIOLATION, props);
+ Notification notification = new Notification(null, SECURITY_AUTHENTICATION_VIOLATION, props);
- notificationService.sendNotification(notification);
- }
-
- throw new MessagingException(MessagingException.SECURITY_EXCEPTION, "Unable to validate user: " + user);
+ notificationService.sendNotification(notification);
}
+
+ throw new MessagingException(MessagingException.SECURITY_EXCEPTION, "Unable to validate user: " + user);
}
}
}
@@ -168,16 +145,9 @@
String saddress = address.toString();
Set<Role> roles = securityRepository.getMatch(saddress);
-
- if (CLUSTER_ADMIN_USER.equals(user))
+ if (!securityManager.validateUserAndRole(user, session.getPassword(), roles, checkType))
{
- // The special user CLUSTER_ADMIN_USER is used for creating sessions that replicate management operation between nodes
- //It has automatic read/write access to all destinations
- return;
- }
- else if (!securityManager.validateUserAndRole(user, session.getPassword(), roles, checkType))
- {
if (notificationService != null)
{
TypedProperties props = new TypedProperties();
@@ -246,17 +216,6 @@
return granted;
}
- private void checkDefaultManagementClusterPassword(String password)
- {
- // Sanity check
- if (DEFAULT_MANAGEMENT_CLUSTER_PASSWORD.equals(password))
- {
- log.warn("It has been detected that the cluster admin password which is used to " +
- "replicate management operation from one node to the other has not had its password changed from the installation default. " +
- "Please see the JBoss Messaging user guide for instructions on how to do this.");
- }
- }
-
// Inner class ---------------------------------------------------
}
Modified: trunk/src/main/org/jboss/messaging/core/server/cluster/impl/BridgeImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/cluster/impl/BridgeImpl.java 2009-06-10 08:46:27 UTC (rev 7291)
+++ trunk/src/main/org/jboss/messaging/core/server/cluster/impl/BridgeImpl.java 2009-06-10 11:17:21 UTC (rev 7292)
@@ -54,7 +54,6 @@
import org.jboss.messaging.core.remoting.Packet;
import org.jboss.messaging.core.remoting.RemotingConnection;
import org.jboss.messaging.core.remoting.impl.wireformat.replication.ReplicateAcknowledgeMessage;
-import org.jboss.messaging.core.security.impl.SecurityStoreImpl;
import org.jboss.messaging.core.server.HandleStatus;
import org.jboss.messaging.core.server.MessageReference;
import org.jboss.messaging.core.server.MessagingServer;
@@ -133,6 +132,8 @@
private final SimpleString managementNotificationAddress;
+ private final String clusterUser;
+
private final String clusterPassword;
private Channel replicatingChannel;
@@ -161,6 +162,7 @@
final boolean useDuplicateDetection,
final SimpleString managementAddress,
final SimpleString managementNotificationAddress,
+ final String clusterUser,
final String clusterPassword,
final Channel replicatingChannel,
final boolean activated,
@@ -182,6 +184,7 @@
useDuplicateDetection,
managementAddress,
managementNotificationAddress,
+ clusterUser,
clusterPassword,
null,
replicatingChannel,
@@ -205,6 +208,7 @@
final boolean useDuplicateDetection,
final SimpleString managementAddress,
final SimpleString managementNotificationAddress,
+ final String clusterUser,
final String clusterPassword,
final MessageFlowRecord flowRecord,
final Channel replicatingChannel,
@@ -253,6 +257,8 @@
this.managementNotificationAddress = managementNotificationAddress;
+ this.clusterUser = clusterUser;
+
this.clusterPassword = clusterPassword;
this.flowRecord = flowRecord;
@@ -568,7 +574,7 @@
csf.setReconnectAttempts(reconnectAttempts);
//Session is pre-acknowledge
- session = (ClientSessionInternal)csf.createSession(SecurityStoreImpl.CLUSTER_ADMIN_USER,
+ session = (ClientSessionInternal)csf.createSession(clusterUser,
clusterPassword,
false,
true,
Modified: trunk/src/main/org/jboss/messaging/core/server/cluster/impl/ClusterConnectionImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/cluster/impl/ClusterConnectionImpl.java 2009-06-10 08:46:27 UTC (rev 7291)
+++ trunk/src/main/org/jboss/messaging/core/server/cluster/impl/ClusterConnectionImpl.java 2009-06-10 11:17:21 UTC (rev 7292)
@@ -454,6 +454,7 @@
useDuplicateDetection,
managementService.getManagementAddress(),
managementService.getManagementNotificationAddress(),
+ managementService.getClusterUser(),
managementService.getClusterPassword(),
record,
replicatingChannel,
Modified: trunk/src/main/org/jboss/messaging/core/server/cluster/impl/ClusterManagerImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/cluster/impl/ClusterManagerImpl.java 2009-06-10 08:46:27 UTC (rev 7291)
+++ trunk/src/main/org/jboss/messaging/core/server/cluster/impl/ClusterManagerImpl.java 2009-06-10 11:17:21 UTC (rev 7292)
@@ -25,7 +25,6 @@
import static java.util.concurrent.TimeUnit.MILLISECONDS;
import java.net.InetAddress;
-import java.net.NetworkInterface;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
@@ -444,6 +443,7 @@
config.isUseDuplicateDetection(),
managementService.getManagementAddress(),
managementService.getManagementNotificationAddress(),
+ managementService.getClusterUser(),
managementService.getClusterPassword(),
replicatingChannel,
!backup,
Modified: trunk/src/main/org/jboss/messaging/core/server/impl/MessagingServerImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/impl/MessagingServerImpl.java 2009-06-10 08:46:27 UTC (rev 7291)
+++ trunk/src/main/org/jboss/messaging/core/server/impl/MessagingServerImpl.java 2009-06-10 11:17:21 UTC (rev 7292)
@@ -882,7 +882,6 @@
securityManager,
configuration.getSecurityInvalidationInterval(),
configuration.isSecurityEnabled(),
- configuration.getManagementClusterPassword(),
managementService);
queueFactory = new QueueFactoryImpl(scheduledPool, addressSettingsRepository, storageManager);
Modified: trunk/tests/config/ConfigurationTest-full-config.xml
===================================================================
--- trunk/tests/config/ConfigurationTest-full-config.xml 2009-06-10 08:46:27 UTC (rev 7291)
+++ trunk/tests/config/ConfigurationTest-full-config.xml 2009-06-10 11:17:21 UTC (rev 7292)
@@ -13,6 +13,7 @@
<management-address>Giraffe</management-address>
<management-notification-address>Whatever</management-notification-address>
<management-request-timeout>91</management-request-timeout>
+ <management-cluster-user>Frog</management-cluster-user>
<management-cluster-password>Wombat</management-cluster-password>
<jmx-management-enabled>false</jmx-management-enabled>
<message-counter-enabled>true</message-counter-enabled>
Modified: trunk/tests/joram-tests/src/org/jboss/test/jms/JBossMessagingAdmin.java
===================================================================
--- trunk/tests/joram-tests/src/org/jboss/test/jms/JBossMessagingAdmin.java 2009-06-10 08:46:27 UTC (rev 7291)
+++ trunk/tests/joram-tests/src/org/jboss/test/jms/JBossMessagingAdmin.java 2009-06-10 11:17:21 UTC (rev 7292)
@@ -42,7 +42,6 @@
import org.jboss.messaging.core.config.TransportConfiguration;
import org.jboss.messaging.core.config.impl.ConfigurationImpl;
import org.jboss.messaging.core.management.ResourceNames;
-import org.jboss.messaging.core.security.impl.SecurityStoreImpl;
import org.jboss.messaging.integration.transports.netty.NettyConnectorFactory;
import org.jboss.messaging.tests.util.SpawnedVMSupport;
import org.objectweb.jtests.jms.admin.Admin;
@@ -83,7 +82,7 @@
public void start() throws Exception
{
ClientSessionFactoryImpl sf = new ClientSessionFactoryImpl(new TransportConfiguration(NettyConnectorFactory.class.getName()));
- clientSession = sf.createSession(SecurityStoreImpl.CLUSTER_ADMIN_USER,
+ clientSession = sf.createSession(ConfigurationImpl.DEFAULT_MANAGEMENT_CLUSTER_USER,
ConfigurationImpl.DEFAULT_MANAGEMENT_CLUSTER_PASSWORD,
false,
true,
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/management/AddressControlUsingCoreTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/management/AddressControlUsingCoreTest.java 2009-06-10 08:46:27 UTC (rev 7291)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/management/AddressControlUsingCoreTest.java 2009-06-10 11:17:21 UTC (rev 7292)
@@ -120,6 +120,10 @@
CoreMessagingProxy proxy = createProxy(address);
Object[] roles = (Object[])proxy.retrieveAttributeValue("Roles");
+ for (int i = 0; i < roles.length; i++)
+ {
+ System.out.println(((Object[])roles[i])[0]);
+ }
assertEquals(0, roles.length);
Set<Role> newRoles = new HashSet<Role>();
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/management/SecurityManagementWithConfiguredAdminUserTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/management/SecurityManagementWithConfiguredAdminUserTest.java 2009-06-10 08:46:27 UTC (rev 7291)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/management/SecurityManagementWithConfiguredAdminUserTest.java 2009-06-10 11:17:21 UTC (rev 7292)
@@ -22,21 +22,20 @@
package org.jboss.messaging.tests.integration.management;
+import static org.jboss.messaging.core.config.impl.ConfigurationImpl.DEFAULT_MANAGEMENT_ADDRESS;
+
+import java.util.Set;
+
import org.jboss.messaging.core.config.Configuration;
import org.jboss.messaging.core.config.TransportConfiguration;
import org.jboss.messaging.core.config.impl.ConfigurationImpl;
-import static org.jboss.messaging.core.config.impl.ConfigurationImpl.DEFAULT_MANAGEMENT_ADDRESS;
import org.jboss.messaging.core.remoting.impl.invm.InVMAcceptorFactory;
import org.jboss.messaging.core.security.Role;
import org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl;
-import org.jboss.messaging.core.security.impl.SecurityStoreImpl;
import org.jboss.messaging.core.server.Messaging;
import org.jboss.messaging.core.server.MessagingServer;
import org.jboss.messaging.core.settings.HierarchicalRepository;
-import java.util.HashSet;
-import java.util.Set;
-
/**
* A SecurityManagementTest
*
@@ -70,7 +69,7 @@
*/
public void testSendManagementMessageWithClusterAdminUser() throws Exception
{
- doSendManagementMessage(SecurityStoreImpl.CLUSTER_ADMIN_USER,
+ doSendManagementMessage(ConfigurationImpl.DEFAULT_MANAGEMENT_CLUSTER_USER,
ConfigurationImpl.DEFAULT_MANAGEMENT_CLUSTER_PASSWORD, true);
}
@@ -103,16 +102,17 @@
HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
JBMSecurityManagerImpl securityManager = (JBMSecurityManagerImpl)server.getSecurityManager();
securityManager.addUser(validAdminUser, validAdminPassword);
- securityManager.addUser(invalidAdminUser, invalidAdminPassword);
+ securityManager.addUser(invalidAdminUser, invalidAdminPassword);
+
securityManager.addRole(validAdminUser, "admin");
securityManager.addRole(validAdminUser, "guest");
securityManager.addRole(invalidAdminUser, "guest");
- Set<Role> adminRole = new HashSet<Role>();
- adminRole.add(new Role("admin", true, true, false, true, true, true, true));
+ Set<Role> adminRole = securityRepository.getMatch(DEFAULT_MANAGEMENT_ADDRESS.toString());
+ adminRole.add(new Role("admin", true, true, true, true, true, true, true));
securityRepository.addMatch(DEFAULT_MANAGEMENT_ADDRESS.toString(), adminRole);
- Set<Role> guestRole = new HashSet<Role>();
- guestRole.add(new Role("guest", true, true, true, true, true, true, true));
+ Set<Role> guestRole = securityRepository.getMatch("*");
+ guestRole.add(new Role("guest", true, true, true, true, true, true, false));
securityRepository.addMatch("*", guestRole);
return server;
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/management/SecurityManagementWithDefaultConfigurationTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/management/SecurityManagementWithDefaultConfigurationTest.java 2009-06-10 08:46:27 UTC (rev 7291)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/management/SecurityManagementWithDefaultConfigurationTest.java 2009-06-10 11:17:21 UTC (rev 7292)
@@ -26,7 +26,6 @@
import org.jboss.messaging.core.config.TransportConfiguration;
import org.jboss.messaging.core.config.impl.ConfigurationImpl;
import org.jboss.messaging.core.remoting.impl.invm.InVMAcceptorFactory;
-import org.jboss.messaging.core.security.impl.SecurityStoreImpl;
import org.jboss.messaging.core.server.Messaging;
import org.jboss.messaging.core.server.MessagingServer;
@@ -50,7 +49,7 @@
public void testSendManagementMessageWithDefaultClusterAdminUser() throws Exception
{
- doSendManagementMessage(SecurityStoreImpl.CLUSTER_ADMIN_USER,
+ doSendManagementMessage(ConfigurationImpl.DEFAULT_MANAGEMENT_CLUSTER_USER,
ConfigurationImpl.DEFAULT_MANAGEMENT_CLUSTER_PASSWORD, true);
}
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/management/SecurityManagementWithModifiedConfigurationTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/management/SecurityManagementWithModifiedConfigurationTest.java 2009-06-10 08:46:27 UTC (rev 7291)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/management/SecurityManagementWithModifiedConfigurationTest.java 2009-06-10 11:17:21 UTC (rev 7292)
@@ -25,7 +25,6 @@
import org.jboss.messaging.core.config.TransportConfiguration;
import org.jboss.messaging.core.config.impl.ConfigurationImpl;
import org.jboss.messaging.core.remoting.impl.invm.InVMAcceptorFactory;
-import org.jboss.messaging.core.security.impl.SecurityStoreImpl;
import org.jboss.messaging.core.server.Messaging;
import org.jboss.messaging.core.server.MessagingServer;
@@ -51,13 +50,13 @@
public void testSendManagementMessageWithModifiedClusterAdminUser() throws Exception
{
- doSendManagementMessage(SecurityStoreImpl.CLUSTER_ADMIN_USER,
+ doSendManagementMessage(ConfigurationImpl.DEFAULT_MANAGEMENT_CLUSTER_USER,
configuredClusterPassword, true);
}
public void testSendManagementMessageWithDefaultClusterAdminUser() throws Exception
{
- doSendManagementMessage(SecurityStoreImpl.CLUSTER_ADMIN_USER,
+ doSendManagementMessage(ConfigurationImpl.DEFAULT_MANAGEMENT_CLUSTER_USER,
ConfigurationImpl.DEFAULT_MANAGEMENT_CLUSTER_PASSWORD, false);
}
Modified: trunk/tests/src/org/jboss/messaging/tests/unit/core/config/impl/ConfigurationImplTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/unit/core/config/impl/ConfigurationImplTest.java 2009-06-10 08:46:27 UTC (rev 7291)
+++ trunk/tests/src/org/jboss/messaging/tests/unit/core/config/impl/ConfigurationImplTest.java 2009-06-10 11:17:21 UTC (rev 7292)
@@ -73,6 +73,9 @@
assertEquals(ConfigurationImpl.DEFAULT_MESSAGE_EXPIRY_THREAD_PRIORITY, conf.getMessageExpiryThreadPriority());
assertEquals(ConfigurationImpl.DEFAULT_TRANSACTION_TIMEOUT_SCAN_PERIOD, conf.getTransactionTimeoutScanPeriod());
assertEquals(ConfigurationImpl.DEFAULT_MANAGEMENT_ADDRESS, conf.getManagementAddress());
+ assertEquals(ConfigurationImpl.DEFAULT_MANAGEMENT_NOTIFICATION_ADDRESS, conf.getManagementNotificationAddress());
+ assertEquals(ConfigurationImpl.DEFAULT_MANAGEMENT_CLUSTER_USER, conf.getManagementClusterUser());
+ assertEquals(ConfigurationImpl.DEFAULT_MANAGEMENT_CLUSTER_PASSWORD, conf.getManagementClusterPassword());
assertEquals(ConfigurationImpl.DEFAULT_PERSISTENCE_ENABLED, conf.isPersistenceEnabled());
assertEquals(ConfigurationImpl.DEFAULT_FILE_DEPLOYMENT_ENABLED, conf.isFileDeploymentEnabled());
}
Modified: trunk/tests/src/org/jboss/messaging/tests/unit/core/config/impl/DefaultsFileConfigurationTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/unit/core/config/impl/DefaultsFileConfigurationTest.java 2009-06-10 08:46:27 UTC (rev 7291)
+++ trunk/tests/src/org/jboss/messaging/tests/unit/core/config/impl/DefaultsFileConfigurationTest.java 2009-06-10 11:17:21 UTC (rev 7292)
@@ -84,6 +84,8 @@
assertEquals(ConfigurationImpl.DEFAULT_MANAGEMENT_NOTIFICATION_ADDRESS, conf.getManagementNotificationAddress());
+ assertEquals(ConfigurationImpl.DEFAULT_MANAGEMENT_CLUSTER_USER, conf.getManagementClusterUser());
+
assertEquals(ConfigurationImpl.DEFAULT_MANAGEMENT_CLUSTER_PASSWORD, conf.getManagementClusterPassword());
assertEquals(ConfigurationImpl.DEFAULT_MANAGEMENT_REQUEST_TIMEOUT, conf.getManagementRequestTimeout());
Modified: trunk/tests/src/org/jboss/messaging/tests/unit/core/config/impl/FileConfigurationTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/unit/core/config/impl/FileConfigurationTest.java 2009-06-10 08:46:27 UTC (rev 7291)
+++ trunk/tests/src/org/jboss/messaging/tests/unit/core/config/impl/FileConfigurationTest.java 2009-06-10 11:17:21 UTC (rev 7292)
@@ -55,6 +55,7 @@
assertEquals(new SimpleString("Giraffe"), conf.getManagementAddress());
assertEquals(91, conf.getManagementRequestTimeout());
assertEquals(new SimpleString("Whatever"), conf.getManagementNotificationAddress());
+ assertEquals("Frog", conf.getManagementClusterUser());
assertEquals("Wombat", conf.getManagementClusterPassword());
assertEquals(false, conf.isJMXManagementEnabled());
assertEquals(true, conf.isMessageCounterEnabled());
More information about the jboss-cvs-commits
mailing list