[jboss-cvs] JBoss Messaging SVN: r7322 - in trunk: examples/common and 17 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Jun 12 13:08:14 EDT 2009


Author: timfox
Date: 2009-06-12 13:08:14 -0400 (Fri, 12 Jun 2009)
New Revision: 7322

Added:
   trunk/examples/jms/clustered-standalone/
   trunk/examples/jms/clustered-standalone/build.xml
   trunk/examples/jms/clustered-standalone/server0/
   trunk/examples/jms/clustered-standalone/server0/client-jndi.properties
   trunk/examples/jms/clustered-standalone/server1/
   trunk/examples/jms/clustered-standalone/server1/client-jndi.properties
   trunk/examples/jms/clustered-standalone/server2/
   trunk/examples/jms/clustered-standalone/server2/client-jndi.properties
   trunk/examples/jms/clustered-standalone/src/
   trunk/examples/jms/clustered-standalone/src/org/
   trunk/examples/jms/clustered-standalone/src/org/jboss/
   trunk/examples/jms/clustered-standalone/src/org/jboss/jms/
   trunk/examples/jms/clustered-standalone/src/org/jboss/jms/example/
   trunk/examples/jms/clustered-standalone/src/org/jboss/jms/example/ClusteredStandaloneExample.java
Modified:
   trunk/.classpath
   trunk/examples/common/build.xml
   trunk/src/config/jboss-as/clustered/jbm-configuration.xml
   trunk/src/config/jboss-as/non-clustered/jbm-configuration.xml
   trunk/src/config/stand-alone/clustered/jbm-configuration.xml
   trunk/src/config/stand-alone/clustered/jbm-jms.xml
   trunk/src/config/stand-alone/non-clustered/jbm-configuration.xml
   trunk/src/config/stand-alone/non-clustered/jbm-jms.xml
   trunk/src/main/org/jboss/messaging/core/cluster/impl/DiscoveryGroupImpl.java
   trunk/src/main/org/jboss/messaging/core/messagecounter/impl/MessageCounterHelper.java
   trunk/src/main/org/jboss/messaging/jms/server/impl/JMSServerDeployer.java
Log:
fixed configs and added a standalone config

Modified: trunk/.classpath
===================================================================
--- trunk/.classpath	2009-06-12 16:53:59 UTC (rev 7321)
+++ trunk/.classpath	2009-06-12 17:08:14 UTC (rev 7322)
@@ -26,6 +26,7 @@
 	<classpathentry kind="src" path="examples/jms/client-side-load-balancing/src"/>
 	<classpathentry kind="src" path="examples/jms/clustered-durable-subscription/src"/>
 	<classpathentry kind="src" path="examples/jms/clustered-queue/src"/>
+	<classpathentry kind="src" path="examples/jms/clustered-standalone/src"/>
 	<classpathentry kind="src" path="examples/jms/clustered-topic/src"/>
 	<classpathentry kind="src" path="examples/common/src"/>
 	<classpathentry kind="src" path="examples/jms/consumer-rate-limit/src"/>

Modified: trunk/examples/common/build.xml
===================================================================
--- trunk/examples/common/build.xml	2009-06-12 16:53:59 UTC (rev 7321)
+++ trunk/examples/common/build.xml	2009-06-12 17:08:14 UTC (rev 7322)
@@ -141,6 +141,7 @@
          <jvmarg value="-Djbm.example.server.classpath=${serverclasspath}"/>
          <jvmarg value="-Djbm.example.server.args=${server.args}"/>
          <jvmarg value="-Djbm.example.logserveroutput=${jbm.example.logserveroutput}"/>
+         <jvmarg value="-Djbm.example.runServer=${jbm.example.runServer}"/>
          <arg line="${jbm.example.beans.file}"/>
          <sysproperty key="java.library.path" value="${java.library.path}${path.separator}${aio.library.path}"/>
          <classpath refid="client.classpath"/>

Added: trunk/examples/jms/clustered-standalone/build.xml
===================================================================
--- trunk/examples/jms/clustered-standalone/build.xml	                        (rev 0)
+++ trunk/examples/jms/clustered-standalone/build.xml	2009-06-12 17:08:14 UTC (rev 7322)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE project [
+      <!ENTITY libraries SYSTEM "../../../thirdparty/libraries.ent">
+      ]>
+
+<!-- =========================================================================================== -->
+<!--                                                                                             -->
+<!-- JBoss, Home of Professional Open Source                                                     -->
+<!-- Copyright 2005, JBoss Inc., and individual contributors as indicated                        -->
+<!-- by the @authors tag. See the copyright.txt in the distribution for a                        -->
+<!-- full listing of individual contributors.                                                    -->
+<!--                                                                                             -->
+<!-- This is free software; you can redistribute it and/or modify it                             -->
+<!-- under the terms of the GNU Lesser General Public License as                                 -->
+<!-- published by the Free Software Foundation; either version 2.1 of                            -->
+<!-- the License, or (at your option) any later version.                                         -->
+<!--                                                                                             -->
+<!-- This software is distributed in the hope that it will be useful,                            -->
+<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of                              -->
+<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU                            -->
+<!-- Lesser General Public License for more details.                                             -->
+<!--                                                                                             -->
+<!-- You should have received a copy of the GNU Lesser General Public                            -->
+<!-- License along with this software; if not, write to the Free                                 -->
+<!-- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA                          -->
+<!-- 02110-1301 USA, or see the FSF site: http://www.fsf.org.                                    -->
+<!--                                                                                             -->
+<!-- =========================================================================================== -->
+
+
+<project default="runRemote" name="JBoss Messaging Clustered Standalone Example">
+
+   <import file="../../common/build.xml"/>
+
+   <target name="runRemote">
+      <antcall target="runExample">
+         <param name="example.classname" value="org.jboss.jms.example.ClusteredStandaloneExample"/>
+         <param name="jbm.example.runServer" value="false"/>
+      </antcall>
+   </target>
+
+</project>
\ No newline at end of file

Added: trunk/examples/jms/clustered-standalone/server0/client-jndi.properties
===================================================================
--- trunk/examples/jms/clustered-standalone/server0/client-jndi.properties	                        (rev 0)
+++ trunk/examples/jms/clustered-standalone/server0/client-jndi.properties	2009-06-12 17:08:14 UTC (rev 7322)
@@ -0,0 +1,3 @@
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces

Added: trunk/examples/jms/clustered-standalone/server1/client-jndi.properties
===================================================================
--- trunk/examples/jms/clustered-standalone/server1/client-jndi.properties	                        (rev 0)
+++ trunk/examples/jms/clustered-standalone/server1/client-jndi.properties	2009-06-12 17:08:14 UTC (rev 7322)
@@ -0,0 +1,3 @@
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:2099
+java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces

Added: trunk/examples/jms/clustered-standalone/server2/client-jndi.properties
===================================================================
--- trunk/examples/jms/clustered-standalone/server2/client-jndi.properties	                        (rev 0)
+++ trunk/examples/jms/clustered-standalone/server2/client-jndi.properties	2009-06-12 17:08:14 UTC (rev 7322)
@@ -0,0 +1,3 @@
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:3099
+java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces

Added: trunk/examples/jms/clustered-standalone/src/org/jboss/jms/example/ClusteredStandaloneExample.java
===================================================================
--- trunk/examples/jms/clustered-standalone/src/org/jboss/jms/example/ClusteredStandaloneExample.java	                        (rev 0)
+++ trunk/examples/jms/clustered-standalone/src/org/jboss/jms/example/ClusteredStandaloneExample.java	2009-06-12 17:08:14 UTC (rev 7322)
@@ -0,0 +1,206 @@
+/*
+   * JBoss, Home of Professional Open Source
+   * Copyright 2005-2008, Red Hat Middleware LLC, and individual contributors
+   * by the @authors tag. See the copyright.txt in the distribution for a
+   * full listing of individual contributors.
+   *
+   * This is free software; you can redistribute it and/or modify it
+   * under the terms of the GNU Lesser General Public License as
+   * published by the Free Software Foundation; either version 2.1 of
+   * the License, or (at your option) any later version.
+   *
+   * This software is distributed in the hope that it will be useful,
+   * but WITHOUT ANY WARRANTY; without even the implied warranty of
+   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+   * Lesser General Public License for more details.
+   *
+   * You should have received a copy of the GNU Lesser General Public
+   * License along with this software; if not, write to the Free
+   * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+   * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+   */
+package org.jboss.jms.example;
+
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageProducer;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+import javax.jms.Topic;
+import javax.naming.InitialContext;
+
+import org.jboss.common.example.JBMExample;
+
+/**
+ * 
+ * This example demonstrates a distributed topic, and needs three servers to be started before the example is run.
+ * 
+ * The example will not spawn the servers itself.
+ * 
+ * The servers should be started using ./run.sh ../config/stand-alone/clustered
+ * 
+ * If running on the same physical box, make sure that each server:
+ * 
+ * a) uses a different data directory
+ * b) uses different ports for the netty acceptor
+ * c) uses different ports for JNDI
+ * 
+ * Update server[0|1|2]/client-jndi.properties to the correct ports and hosts for the 3 servers
+ *
+ * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ *
+ *
+ */
+public class ClusteredStandaloneExample extends JBMExample
+{
+   public static void main(String[] args)
+   {
+      new ClusteredStandaloneExample().run(args);
+   }
+
+   public boolean runExample() throws Exception
+   {
+      Connection connection0 = null;
+
+      Connection connection1 = null;
+
+      Connection connection2 = null;
+
+      InitialContext initialContext0 = null;
+      InitialContext initialContext1 = null;
+      InitialContext initialContext2 = null;
+
+      try
+      {
+         initialContext0 = getContext(0);
+
+         initialContext1 = getContext(1);
+
+         initialContext2 = getContext(2);
+         
+         // First we demonstrate a distributed topic.
+         // We create a connection on each node, create a consumer on each connection and send some
+         // messages at a node and verify they are all received by all consumers
+
+         ConnectionFactory cf0 = (ConnectionFactory)initialContext0.lookup("/ConnectionFactory");
+         
+         System.out.println("Got cf " + cf0);
+
+         ConnectionFactory cf1 = (ConnectionFactory)initialContext1.lookup("/ConnectionFactory");
+         
+         System.out.println("Got cf " + cf1);
+
+         ConnectionFactory cf2 = (ConnectionFactory)initialContext2.lookup("/ConnectionFactory");
+         
+         System.out.println("Got cf " + cf2);
+         
+         Topic topic = (Topic)initialContext0.lookup("/topic/ExampleTopic");
+
+
+         connection0 = cf0.createConnection();
+
+         connection1 = cf1.createConnection();
+
+         connection2 = cf2.createConnection();
+
+         connection0.start();
+
+         connection1.start();
+
+         connection2.start();
+
+         Session session0 = connection0.createSession(false, Session.AUTO_ACKNOWLEDGE);
+
+         Session session1 = connection1.createSession(false, Session.AUTO_ACKNOWLEDGE);
+
+         Session session2 = connection2.createSession(false, Session.AUTO_ACKNOWLEDGE);
+
+         MessageConsumer messageConsumer0 = session0.createConsumer(topic);
+
+         MessageConsumer messageConsumer1 = session1.createConsumer(topic);
+
+         MessageConsumer messageConsumer2 = session2.createConsumer(topic);
+
+         MessageProducer producer = session0.createProducer(topic);
+
+         final int numMessages = 10;
+
+         for (int i = 0; i < numMessages; i++)
+         {
+            TextMessage message = session0.createTextMessage("Message " + i);
+
+            producer.send(message);
+         }
+
+         for (int i = 0; i < numMessages; i++)
+         {
+            TextMessage message0 = (TextMessage)messageConsumer0.receive(2000);
+
+            if (message0 == null)
+            {
+               return false;
+            }
+
+            System.out.println("Received message " + message0.getText());
+
+            TextMessage message1 = (TextMessage)messageConsumer1.receive(2000);
+
+            if (message1 == null)
+            {
+               return false;
+            }
+
+            System.out.println("Received message " + message1.getText());
+
+            TextMessage message2 = (TextMessage)messageConsumer2.receive(2000);
+
+            if (message2 == null)
+            {
+               return false;
+            }
+
+            System.out.println("Received message " + message2.getText());
+         }
+         
+         producer.close();
+         
+         messageConsumer0.close();
+         
+         messageConsumer1.close();
+         
+         messageConsumer2.close();
+                  
+         return true;
+      }
+      finally
+      {
+         // Step 12. Be sure to close our JMS resources!
+         if (initialContext0 != null)
+         {
+            initialContext0.close();
+         }
+         if (initialContext1 != null)
+         {
+            initialContext1.close();
+         }
+         if (initialContext2 != null)
+         {
+            initialContext2.close();
+         }
+         if (connection0 != null)
+         {
+            connection0.close();
+         }
+         if (connection1 != null)
+         {
+            connection1.close();
+         }
+         if (connection2 != null)
+         {
+            connection2.close();
+         }
+      }
+   }
+
+}

Modified: trunk/src/config/jboss-as/clustered/jbm-configuration.xml
===================================================================
--- trunk/src/config/jboss-as/clustered/jbm-configuration.xml	2009-06-12 16:53:59 UTC (rev 7321)
+++ trunk/src/config/jboss-as/clustered/jbm-configuration.xml	2009-06-12 17:08:14 UTC (rev 7322)
@@ -4,68 +4,46 @@
 
    <clustered>true</clustered>
 
-   <!-- Connectors -->
-   <connectors>
-      <connector name="netty-backup">
-         <factory-class>org.jboss.messaging.integration.transports.netty.NettyConnectorFactory</factory-class>
-         <param key="jbm.remoting.netty.host" value="localhost" type="String"/>
-         <param key="jbm.remoting.netty.port" value="6400" type="Integer"/>
-      </connector>
+   <connectors>      
       <connector name="netty">
          <factory-class>org.jboss.messaging.integration.transports.netty.NettyConnectorFactory</factory-class>
          <param key="jbm.remoting.netty.host"  value="${jbm.remoting.netty.host:localhost}" type="String"/>
          <param key="jbm.remoting.netty.port"  value="${jbm.remoting.netty.port:5445}" type="Integer"/>
       </connector>
-      <connector name="in-vm">
-         <factory-class>org.jboss.messaging.core.remoting.impl.invm.InVMConnectorFactory</factory-class>
-      </connector>
    </connectors>
 
-   <!-- Acceptors -->
    <acceptors>
-      <!-- In VM acceptor -->
-      <acceptor name="in-vm-acceptor">
-         <factory-class>org.jboss.messaging.core.remoting.impl.invm.InVMAcceptorFactory</factory-class>
-         <param key="jbm.remoting.invm.serverid" value="0" type="Integer"/>
-      </acceptor>
-
-      <!-- Netty TCP Acceptor -->
-      <acceptor name="netty-acceptor">
+      <acceptor name="netty">
          <factory-class>org.jboss.messaging.integration.transports.netty.NettyAcceptorFactory</factory-class>
          <param key="jbm.remoting.netty.host"  value="${jbm.remoting.netty.host:localhost}" type="String"/>
          <param key="jbm.remoting.netty.port"  value="${jbm.remoting.netty.port:5445}" type="Integer"/>
       </acceptor>
    </acceptors>
 
-   <!-- Clustering configuration -->
    <broadcast-groups>
-      <broadcast-group name="my-broadcast-group">
+      <broadcast-group name="bg-group1">
          <group-address>231.7.7.7</group-address>
          <group-port>9876</group-port>
-         <broadcast-period>100</broadcast-period>
+         <broadcast-period>5000</broadcast-period>
          <connector-ref connector-name="netty"/>
       </broadcast-group>
    </broadcast-groups>
 
    <discovery-groups>
-      <discovery-group name="my-discovery-group">
+      <discovery-group name="dg-group1">
          <group-address>231.7.7.7</group-address>
          <group-port>9876</group-port>
          <refresh-timeout>10000</refresh-timeout>
       </discovery-group>
    </discovery-groups>
-
+   
    <cluster-connections>
       <cluster-connection name="my-cluster">
-         <address>jms</address>
-         <retry-interval>500</retry-interval>
-         <use-duplicate-detection>true</use-duplicate-detection>
-         <forward-when-no-consumers>true</forward-when-no-consumers>
-         <max-hops>1</max-hops>
-         <discovery-group-ref discovery-group-name="my-discovery-group"/>
+         <address>jms</address>	 
+	      <discovery-group-ref discovery-group-name="dg-group1"/>
       </cluster-connection>
    </cluster-connections>
-
+   
    <security-settings>
       <security-setting match="#">
          <permission type="createTempQueue" roles="guest"/>

Modified: trunk/src/config/jboss-as/non-clustered/jbm-configuration.xml
===================================================================
--- trunk/src/config/jboss-as/non-clustered/jbm-configuration.xml	2009-06-12 16:53:59 UTC (rev 7321)
+++ trunk/src/config/jboss-as/non-clustered/jbm-configuration.xml	2009-06-12 17:08:14 UTC (rev 7322)
@@ -2,35 +2,20 @@
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:schemaLocation="urn:jboss:messaging /schema/jbm-configuration.xsd">
 
-   <!-- Connectors -->
    <connectors>
       <connector name="netty">
          <factory-class>org.jboss.messaging.integration.transports.netty.NettyConnectorFactory</factory-class>
          <param key="jbm.remoting.netty.host"  value="${jbm.remoting.netty.host:localhost}" type="String"/>
          <param key="jbm.remoting.netty.port"  value="${jbm.remoting.netty.port:5445}" type="Integer"/>
       </connector>
-
-      <connector name="in-vm">
-         <factory-class>org.jboss.messaging.core.remoting.impl.invm.InVMConnectorFactory</factory-class>
-      </connector>
-
    </connectors>
 
-   <!-- Acceptors -->
-   <acceptors>
-      <!-- In VM acceptor -->
-      <acceptor name="in-vm-acceptor">
-         <factory-class>org.jboss.messaging.core.remoting.impl.invm.InVMAcceptorFactory</factory-class>
-         <param key="jbm.remoting.invm.serverid" value="0" type="Integer"/>
-      </acceptor>
-
-      <!-- Netty TCP Acceptor -->
+   <acceptors>   
       <acceptor name="netty-acceptor">
          <factory-class>org.jboss.messaging.integration.transports.netty.NettyAcceptorFactory</factory-class>
          <param key="jbm.remoting.netty.host"  value="${jbm.remoting.netty.host:localhost}" type="String"/>
          <param key="jbm.remoting.netty.port"  value="${jbm.remoting.netty.port:5445}" type="Integer"/>
       </acceptor>
-
    </acceptors>
 
    <security-settings>

Modified: trunk/src/config/stand-alone/clustered/jbm-configuration.xml
===================================================================
--- trunk/src/config/stand-alone/clustered/jbm-configuration.xml	2009-06-12 16:53:59 UTC (rev 7321)
+++ trunk/src/config/stand-alone/clustered/jbm-configuration.xml	2009-06-12 17:08:14 UTC (rev 7322)
@@ -4,31 +4,15 @@
 
    <clustered>true</clustered>
 
-   <!-- Connectors -->
-   <connectors>
-      <connector name="netty-backup">
-         <factory-class>org.jboss.messaging.integration.transports.netty.NettyConnectorFactory</factory-class>
-         <param key="jbm.remoting.netty.host" value="localhost" type="String"/>
-         <param key="jbm.remoting.netty.port" value="6400" type="Integer"/>
-      </connector>
+   <connectors>      
       <connector name="netty">
          <factory-class>org.jboss.messaging.integration.transports.netty.NettyConnectorFactory</factory-class>
          <param key="jbm.remoting.netty.host"  value="${jbm.remoting.netty.host:localhost}" type="String"/>
          <param key="jbm.remoting.netty.port"  value="${jbm.remoting.netty.port:5445}" type="Integer"/>
       </connector>
-      <connector name="in-vm">
-         <factory-class>org.jboss.messaging.core.remoting.impl.invm.InVMConnectorFactory</factory-class>
-      </connector>
    </connectors>
 
-   <!-- Acceptors -->
    <acceptors>
-      <!-- In VM acceptor -->
-      <acceptor name="in-vm">
-         <factory-class>org.jboss.messaging.core.remoting.impl.invm.InVMAcceptorFactory</factory-class>
-         <param key="jbm.remoting.invm.serverid" value="0" type="Integer"/>
-      </acceptor>
-      <!-- Netty standard TCP acceptor -->
       <acceptor name="netty">
          <factory-class>org.jboss.messaging.integration.transports.netty.NettyAcceptorFactory</factory-class>
          <param key="jbm.remoting.netty.host"  value="${jbm.remoting.netty.host:localhost}" type="String"/>
@@ -36,14 +20,12 @@
       </acceptor>
    </acceptors>
 
-   <!-- Clustering configuration -->
    <broadcast-groups>
       <broadcast-group name="bg-group1">
-         <local-bind-port>1234</local-bind-port>
          <group-address>231.7.7.7</group-address>
          <group-port>9876</group-port>
          <broadcast-period>5000</broadcast-period>
-         <connector-ref connector-name="netty" backup-connector-name="netty-backup"/>
+         <connector-ref connector-name="netty"/>
       </broadcast-group>
    </broadcast-groups>
 
@@ -54,7 +36,14 @@
          <refresh-timeout>10000</refresh-timeout>
       </discovery-group>
    </discovery-groups>
-
+   
+   <cluster-connections>
+      <cluster-connection name="my-cluster">
+         <address>jms</address>	 
+	      <discovery-group-ref discovery-group-name="dg-group1"/>
+      </cluster-connection>
+   </cluster-connections>
+   
    <security-settings>
       <security-setting match="#">
          <permission type="createTempQueue" roles="guest"/>

Modified: trunk/src/config/stand-alone/clustered/jbm-jms.xml
===================================================================
--- trunk/src/config/stand-alone/clustered/jbm-jms.xml	2009-06-12 16:53:59 UTC (rev 7321)
+++ trunk/src/config/stand-alone/clustered/jbm-jms.xml	2009-06-12 17:08:14 UTC (rev 7322)
@@ -1,30 +1,28 @@
 <configuration xmlns="urn:jboss:messaging"
-            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-            xsi:schemaLocation="urn:jboss:messaging /schema/jbm-jms.xsd">
-
-   <connection-factory name="ConnectionFactory">
-      <connector-ref connector-name="netty"/>
-      <entries>
-         <entry name="ConnectionFactory"/>
-         <entry name="XAConnectionFactory"/>
-      </entries>
-   </connection-factory>
-
-   <connection-factory name="ClusteredConnectionFactory">
-      <connector-ref connector-name="netty" backup-connector-name="netty-backup"/>
-      <entries>
-         <entry name="/ClusteredConnectionFactory"/>
-         <entry name="/ClusteredXAConnectionFactory"/>
-         <entry name="java:/ClusteredConnectionFactory"/>
-         <entry name="java:/ClusteredXAConnectionFactory"/>
-      </entries>
-   </connection-factory>
-
-   <queue name="DLQ">
-      <entry name="/queue/DLQ"/>
-   </queue>
-   <queue name="ExpiryQueue">
-      <entry name="/queue/ExpiryQueue"/>
-   </queue>
-
+	       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	       xsi:schemaLocation="urn:jboss:messaging /schema/jbm-jms.xsd">
+	
+	<connection-factory name="ConnectionFactory">
+		<connector-ref connector-name="netty"/>
+		<entries>
+			<entry name="ConnectionFactory"/>
+			<entry name="XAConnectionFactory"/>
+			<entry name="java:/ConnectionFactory"/>
+			<entry name="java:/XAConnectionFactory"/>
+		</entries>
+	</connection-factory>
+	
+	<queue name="DLQ">
+		<entry name="/queue/DLQ"/>
+	</queue>
+	<queue name="ExpiryQueue">
+		<entry name="/queue/ExpiryQueue"/>
+	</queue>   
+	<queue name="ExampleQueue">
+		<entry name="/queue/ExampleQueue"/>
+	</queue>
+	<topic name="ExampleTopic">
+		<entry name="/topic/ExampleTopic"/>
+	</topic>
+	
 </configuration>
\ No newline at end of file

Modified: trunk/src/config/stand-alone/non-clustered/jbm-configuration.xml
===================================================================
--- trunk/src/config/stand-alone/non-clustered/jbm-configuration.xml	2009-06-12 16:53:59 UTC (rev 7321)
+++ trunk/src/config/stand-alone/non-clustered/jbm-configuration.xml	2009-06-12 17:08:14 UTC (rev 7322)
@@ -2,29 +2,15 @@
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:schemaLocation="urn:jboss:messaging /schema/jbm-configuration.xsd">
 
-   <!-- Connectors -->
    <connectors>
       <connector name="netty">
          <factory-class>org.jboss.messaging.integration.transports.netty.NettyConnectorFactory</factory-class>
          <param key="jbm.remoting.netty.host"  value="${jbm.remoting.netty.host:localhost}" type="String"/>
          <param key="jbm.remoting.netty.port"  value="${jbm.remoting.netty.port:5445}" type="Integer"/>
       </connector>
-
-      <connector name="in-vm">
-         <factory-class>org.jboss.messaging.core.remoting.impl.invm.InVMConnectorFactory</factory-class>
-      </connector>
-
    </connectors>
 
-   <!-- Acceptors -->
    <acceptors>
-      <!-- In VM acceptor -->
-      <acceptor name="in-vm">
-         <factory-class>org.jboss.messaging.core.remoting.impl.invm.InVMAcceptorFactory</factory-class>
-         <param key="jbm.remoting.invm.serverid" value="0" type="Integer"/>
-      </acceptor>
-
-      <!-- Netty TCP Acceptor -->
       <acceptor name="netty">
          <factory-class>org.jboss.messaging.integration.transports.netty.NettyAcceptorFactory</factory-class>
          <param key="jbm.remoting.netty.host"  value="${jbm.remoting.netty.host:localhost}" type="String"/>
@@ -32,7 +18,7 @@
       </acceptor>
    </acceptors>
 
-    <security-settings>
+   <security-settings>
       <security-setting match="#">
          <permission type="createTempQueue" roles="guest"/>
          <permission type="deleteTempQueue" roles="guest"/>

Modified: trunk/src/config/stand-alone/non-clustered/jbm-jms.xml
===================================================================
--- trunk/src/config/stand-alone/non-clustered/jbm-jms.xml	2009-06-12 16:53:59 UTC (rev 7321)
+++ trunk/src/config/stand-alone/non-clustered/jbm-jms.xml	2009-06-12 17:08:14 UTC (rev 7322)
@@ -1,21 +1,28 @@
 <configuration xmlns="urn:jboss:messaging"
-            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-            xsi:schemaLocation="urn:jboss:messaging /schema/jbm-jms.xsd">
-
-   <connection-factory name="ConnectionFactory">
-      <connector-ref connector-name="netty"/>
-      <entries>
-         <entry name="ConnectionFactory"/>
-         <entry name="XAConnectionFactory"/>
-      </entries>
-   </connection-factory>
-
-   <queue name="DLQ">
-      <entry name="/queue/DLQ"/>
-   </queue>
-
-   <queue name="ExpiryQueue">
-      <entry name="/queue/ExpiryQueue"/>
-   </queue>
-
+	       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	       xsi:schemaLocation="urn:jboss:messaging /schema/jbm-jms.xsd">
+	
+	<connection-factory name="ConnectionFactory">
+		<connector-ref connector-name="netty"/>
+		<entries>
+			<entry name="ConnectionFactory"/>
+			<entry name="XAConnectionFactory"/>
+			<entry name="java:/ConnectionFactory"/>
+			<entry name="java:/XAConnectionFactory"/>
+		</entries>
+	</connection-factory>
+	
+	<queue name="DLQ">
+		<entry name="/queue/DLQ"/>
+	</queue>
+	<queue name="ExpiryQueue">
+		<entry name="/queue/ExpiryQueue"/>
+	</queue>   
+	<queue name="ExampleQueue">
+		<entry name="/queue/ExampleQueue"/>
+	</queue>
+	<topic name="ExampleTopic">
+		<entry name="/topic/ExampleTopic"/>
+	</topic>
+	
 </configuration>
\ No newline at end of file

Modified: trunk/src/main/org/jboss/messaging/core/cluster/impl/DiscoveryGroupImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/cluster/impl/DiscoveryGroupImpl.java	2009-06-12 16:53:59 UTC (rev 7321)
+++ trunk/src/main/org/jboss/messaging/core/cluster/impl/DiscoveryGroupImpl.java	2009-06-12 17:08:14 UTC (rev 7322)
@@ -78,7 +78,9 @@
    private final InetAddress groupAddress;
 
    private final int groupPort;
-
+   
+   private Map<String, UniqueIDEntry> uniqueIDMap = new HashMap<String, UniqueIDEntry>();
+   
    public DiscoveryGroupImpl(final String nodeID,
                              final String name,
                              final InetAddress groupAddress,
@@ -225,8 +227,6 @@
       }      
    }
    
-   private Map<String, UniqueIDEntry> uniqueIDMap = new HashMap<String, UniqueIDEntry>();
-   
    /*
     * This is a sanity check to catch any cases where two different nodes are broadcasting the same node id either
     * due to misconfiguration or problems in failover

Modified: trunk/src/main/org/jboss/messaging/core/messagecounter/impl/MessageCounterHelper.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/messagecounter/impl/MessageCounterHelper.java	2009-06-12 16:53:59 UTC (rev 7321)
+++ trunk/src/main/org/jboss/messaging/core/messagecounter/impl/MessageCounterHelper.java	2009-06-12 17:08:14 UTC (rev 7322)
@@ -28,8 +28,6 @@
 import java.util.List;
 import java.util.StringTokenizer;
 
-import javax.management.openmbean.TabularData;
-
 import org.jboss.messaging.core.management.DayCounterInfo;
 import org.jboss.messaging.core.messagecounter.MessageCounter;
 import org.jboss.messaging.core.messagecounter.MessageCounter.DayCounter;

Modified: trunk/src/main/org/jboss/messaging/jms/server/impl/JMSServerDeployer.java
===================================================================
--- trunk/src/main/org/jboss/messaging/jms/server/impl/JMSServerDeployer.java	2009-06-12 16:53:59 UTC (rev 7321)
+++ trunk/src/main/org/jboss/messaging/jms/server/impl/JMSServerDeployer.java	2009-06-12 17:08:14 UTC (rev 7322)
@@ -88,7 +88,7 @@
 
    private static final String THREAD_POOL_MAX_SIZE = "thread-pool-max-size";
 
-   private static final String CONNECTOR_LINK_ELEMENT = "connector-ref";
+   private static final String CONNECTOR_REF_ELEMENT = "connector-ref";
 
    private static final String DISCOVERY_GROUP_ELEMENT = "discovery-group-ref";
 
@@ -317,7 +317,7 @@
             {
                discoveryInitialWaitTimeout = org.jboss.messaging.utils.XMLUtil.parseInt(child);
             }
-            else if (CONNECTOR_LINK_ELEMENT.equals(child.getNodeName()))
+            else if (CONNECTOR_REF_ELEMENT.equals(child.getNodeName()))
             {
                String connectorName = child.getAttributes().getNamedItem("connector-name").getNodeValue();
 
@@ -470,7 +470,7 @@
          }
       }
       else if (node.getNodeName().equals(TOPIC_NODE_NAME))
-      {
+      {        
          String topicName = node.getAttributes().getNamedItem(getKeyAttribute()).getNodeValue();
          NodeList children = node.getChildNodes();
          for (int i = 0; i < children.getLength(); i++)
@@ -479,7 +479,7 @@
 
             if (ENTRY_NODE_NAME.equals(children.item(i).getNodeName()))
             {
-               String jndiName = child.getAttributes().getNamedItem("name").getNodeValue();
+               String jndiName = child.getAttributes().getNamedItem("name").getNodeValue();               
                jmsServerControl.createTopic(topicName, jndiName);
             }
          }




More information about the jboss-cvs-commits mailing list