[jboss-cvs] JBoss Messaging SVN: r2785 - in trunk: src/etc/server/default/deploy and 4 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Jun 18 03:40:59 EDT 2007
Author: sergeypk
Date: 2007-06-18 03:40:59 -0400 (Mon, 18 Jun 2007)
New Revision: 2785
Modified:
trunk/docs/userguide/en/modules/configuration.xml
trunk/docs/userguide/en/modules/installation.xml
trunk/src/etc/server/default/deploy/messaging-service.xml
trunk/src/etc/xmdesc/ServerPeer-xmbean.xml
trunk/src/main/org/jboss/jms/server/ServerPeer.java
trunk/tests/src/org/jboss/test/messaging/jms/server/ServerPeerConfigurationTest.java
trunk/tests/src/org/jboss/test/messaging/tools/jmx/rmi/LocalTestServer.java
Log:
http://jira.jboss.com/jira/browse/JBMESSAGING-981
Removed ServerPeer three-argument constructor so it can now only be configured through attributes.
Updated documentation accordingly.
Modified: trunk/docs/userguide/en/modules/configuration.xml
===================================================================
--- trunk/docs/userguide/en/modules/configuration.xml 2007-06-15 08:35:13 UTC (rev 2784)
+++ trunk/docs/userguide/en/modules/configuration.xml 2007-06-18 07:40:59 UTC (rev 2785)
@@ -56,14 +56,9 @@
name="jboss.messaging:service=ServerPeer"
xmbean-dd="xmdesc/ServerPeer-xmbean.xml">
- <constructor>
- <!-- ServerPeerID -->
- <arg type="int" value="0"/>
- <!-- DefaultQueueJNDIContext -->
- <arg type="java.lang.String" value="/queue"/>
- <!-- DefaultTopicJNDIContext -->
- <arg type="java.lang.String" value="/topic"/>
- </constructor>
+ <attribute name="ServerPeerID">0</attribute>
+ <attribute name="DefaultQueueJNDIContext">/queue</attribute>
+ <attribute name="DefaultTopicJNDIContext">/topic</attribute>
<attribute name="PostOffice">jboss.messaging:service=PostOffice</attribute>
<attribute name="SecurityDomain">java:/jaas/messaging</attribute>
@@ -90,10 +85,10 @@
<section id="conf.serverpeer.attributes">
- <title>ServerPeer attributes and arguments</title>
+ <title>ServerPeer attributes</title>
<para>
- We now discuss the MBean attributes and constructor arguments of the ServerPeer MBean
+ We now discuss the MBean attributes of the ServerPeer MBean
</para>
<section id="conf.serverpeer.attributes.persistencemanager">
Modified: trunk/docs/userguide/en/modules/installation.xml
===================================================================
--- trunk/docs/userguide/en/modules/installation.xml 2007-06-15 08:35:13 UTC (rev 2784)
+++ trunk/docs/userguide/en/modules/installation.xml 2007-06-18 07:40:59 UTC (rev 2785)
@@ -367,7 +367,7 @@
</listitem>
<listitem>
- <para>Ensure the <literal>ServerPeerID</literal> MBean constructor parameter in messaging-service.xml is unique for
+ <para>Ensure the <literal>ServerPeerID</literal> MBean attribute value in messaging-service.xml is unique for
each node on the cluster. The <literal>ServerPeerID</literal> value must be a valid integer.</para>
<para><warning>Each node must have a unique <literal>ServerPeerID</literal> for clustering to work!</warning></para>
</listitem>
@@ -584,7 +584,7 @@
</listitem>
<listitem>
- <para>Ensure the <literal>ServerPeerID</literal> MBean constructor parameter in messaging-service.xml is unique for
+ <para>Ensure the <literal>ServerPeerID</literal> MBean attribute value in messaging-service.xml is unique for
each node on the cluster. The <literal>ServerPeerID</literal> value must be a valid integer.</para>
<para><warning>Each node must have a unique <literal>ServerPeerID</literal> for clustering to work!</warning></para>
</listitem>
Modified: trunk/src/etc/server/default/deploy/messaging-service.xml
===================================================================
--- trunk/src/etc/server/default/deploy/messaging-service.xml 2007-06-15 08:35:13 UTC (rev 2784)
+++ trunk/src/etc/server/default/deploy/messaging-service.xml 2007-06-18 07:40:59 UTC (rev 2785)
@@ -12,14 +12,9 @@
name="jboss.messaging:service=ServerPeer"
xmbean-dd="xmdesc/ServerPeer-xmbean.xml">
- <constructor>
- <!-- ServerPeerID -->
- <arg type="int" value="0"/>
- <!-- DefaultQueueJNDIContext -->
- <arg type="java.lang.String" value="/queue"/>
- <!-- DefaultTopicJNDIContext -->
- <arg type="java.lang.String" value="/topic"/>
- </constructor>
+ <attribute name="ServerPeerID">0</attribute>
+ <attribute name="DefaultQueueJNDIContext">/queue</attribute>
+ <attribute name="DefaultTopicJNDIContext">/topic</attribute>
<attribute name="PostOffice">jboss.messaging:service=PostOffice</attribute>
<attribute name="SecurityDomain">java:/jaas/messaging</attribute>
Modified: trunk/src/etc/xmdesc/ServerPeer-xmbean.xml
===================================================================
--- trunk/src/etc/xmdesc/ServerPeer-xmbean.xml 2007-06-15 08:35:13 UTC (rev 2784)
+++ trunk/src/etc/xmdesc/ServerPeer-xmbean.xml 2007-06-18 07:40:59 UTC (rev 2785)
@@ -10,24 +10,8 @@
<constructor>
<name>ServerPeer</name>
- <parameter>
- <name>ServerPeerID</name>
- <type>int</type>
- </parameter>
- <parameter>
- <name>DefaultQueueJNDIContext</name>
- <type>java.lang.String</type>
- </parameter>
- <parameter>
- <name>DefaultTopicJNDIContext</name>
- <type>java.lang.String</type>
- </parameter>
</constructor>
- <constructor>
- <name>ServerPeer</name>
- </constructor>
-
<!-- Managed attributes -->
<!-- plugins ObjectNames -->
Modified: trunk/src/main/org/jboss/jms/server/ServerPeer.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/ServerPeer.java 2007-06-15 08:35:13 UTC (rev 2784)
+++ trunk/src/main/org/jboss/jms/server/ServerPeer.java 2007-06-18 07:40:59 UTC (rev 2785)
@@ -184,22 +184,6 @@
started = false;
}
- public ServerPeer(int serverPeerID,
- String defaultQueueJNDIContext,
- String defaultTopicJNDIContext) throws Exception
- {
- this();
-
- if (serverPeerID < 0)
- {
- throw new IllegalArgumentException("ID cannot be negative");
- }
-
- setServerPeerID(serverPeerID);
- this.defaultQueueJNDIContext = defaultQueueJNDIContext;
- this.defaultTopicJNDIContext = defaultTopicJNDIContext;
- }
-
// ServiceMBeanSupport overrides ----------------------------------------------------------------
public synchronized void startService() throws Exception
Modified: trunk/tests/src/org/jboss/test/messaging/jms/server/ServerPeerConfigurationTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/server/ServerPeerConfigurationTest.java 2007-06-15 08:35:13 UTC (rev 2784)
+++ trunk/tests/src/org/jboss/test/messaging/jms/server/ServerPeerConfigurationTest.java 2007-06-18 07:40:59 UTC (rev 2785)
@@ -25,7 +25,6 @@
import javax.management.RuntimeMBeanException;
import org.jboss.test.messaging.MessagingTestCase;
-import org.jboss.test.messaging.tools.jboss.MBeanConfigurationElement;
import org.jboss.test.messaging.tools.jmx.ServiceAttributeOverrides;
import org.jboss.test.messaging.tools.jmx.ServiceContainer;
import org.jboss.test.messaging.tools.jmx.rmi.LocalTestServer;
@@ -55,30 +54,19 @@
// Public --------------------------------------------------------
- /**
- * Test that the ServerPeer can be configured without using
- * the <constructor> element, only through attributes.
- */
- public void testConstructorlessConfiguration() throws Exception
- {
- MyLocalTestServer server = new MyLocalTestServer();
- server.start("all", false);
- server.stop();
- }
-
public void testServerPeerID() throws Exception
{
- testConstructorArgumentAttribute("ServerPeerID", new Integer(5), new Integer(10));
+ testStartupOnlyAttribute("ServerPeerID", new Integer(5), new Integer(10));
}
public void testDefaultQueueJNDIContext() throws Exception
{
- testConstructorArgumentAttribute("DefaultQueueJNDIContext", "/myqueues", "/otherqueues");
+ testStartupOnlyAttribute("DefaultQueueJNDIContext", "/myqueues", "/otherqueues");
}
public void testDefaultTopicJNDIContext() throws Exception
{
- testConstructorArgumentAttribute("DefaultTopicJNDIContext", "/mytopics", "/othertopics");
+ testStartupOnlyAttribute("DefaultTopicJNDIContext", "/mytopics", "/othertopics");
}
// Package protected ---------------------------------------------
@@ -87,7 +75,7 @@
// Private -------------------------------------------------------
- private void testConstructorArgumentAttribute(String attributeName,
+ private void testStartupOnlyAttribute(String attributeName,
Object initialAttributeValue, Object anotherAttributeValue) throws Exception
{
MyLocalTestServer server = new MyLocalTestServer();
@@ -122,28 +110,11 @@
// Inner classes -------------------------------------------------
- /**
- * Configures ServerPeer through attributes instead of constructor
- * arguments.
- */
private class MyLocalTestServer extends LocalTestServer
{
- protected void overrideServerPeerConfiguration(MBeanConfigurationElement config,
- int serverPeerID, String defaultQueueJNDIContext, String defaultTopicJNDIContext)
- throws Exception
+ // Make accessible from the test
+ protected ServiceContainer getServiceContainer()
{
- config.removeConstructors();
-
- config.setAttribute("ServerPeerID", Integer.toString(serverPeerID));
- config.setAttribute("DefaultQueueJNDIContext",
- defaultQueueJNDIContext == null ? "/queue" : defaultQueueJNDIContext);
- config.setAttribute("DefaultTopicJNDIContext",
- defaultTopicJNDIContext == null? "/topic" : defaultTopicJNDIContext);
- }
-
- // Make public
- public ServiceContainer getServiceContainer()
- {
return super.getServiceContainer();
}
}
Modified: trunk/tests/src/org/jboss/test/messaging/tools/jmx/rmi/LocalTestServer.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/tools/jmx/rmi/LocalTestServer.java 2007-06-15 08:35:13 UTC (rev 2784)
+++ trunk/tests/src/org/jboss/test/messaging/tools/jmx/rmi/LocalTestServer.java 2007-06-18 07:40:59 UTC (rev 2785)
@@ -847,18 +847,11 @@
int serverPeerID, String defaultQueueJNDIContext, String defaultTopicJNDIContext)
throws Exception
{
- // overwrite the file configuration, if needed
- config.setConstructorArgumentValue(0, 0, String.valueOf(serverPeerID));
-
- if (defaultQueueJNDIContext != null)
- {
- config.setConstructorArgumentValue(0, 1, defaultQueueJNDIContext);
- }
-
- if (defaultTopicJNDIContext != null)
- {
- config.setConstructorArgumentValue(0, 2, defaultTopicJNDIContext);
- }
+ config.setAttribute("ServerPeerID", Integer.toString(serverPeerID));
+ config.setAttribute("DefaultQueueJNDIContext",
+ defaultQueueJNDIContext == null ? "/queue" : defaultQueueJNDIContext);
+ config.setAttribute("DefaultTopicJNDIContext",
+ defaultTopicJNDIContext == null? "/topic" : defaultTopicJNDIContext);
}
// Private --------------------------------------------------------------------------------------
More information about the jboss-cvs-commits
mailing list