[jboss-cvs] JBoss Messaging SVN: r6778 - in trunk: examples/jms/static-selector-jms and 7 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu May 14 03:40:58 EDT 2009


Author: ataylor
Date: 2009-05-14 03:40:58 -0400 (Thu, 14 May 2009)
New Revision: 6778

Added:
   trunk/examples/jms/static-selector-jms/
   trunk/examples/jms/static-selector-jms/build.xml
   trunk/examples/jms/static-selector-jms/readme.html
   trunk/examples/jms/static-selector-jms/server0/
   trunk/examples/jms/static-selector-jms/server0/client-jndi.properties
   trunk/examples/jms/static-selector-jms/server0/jbm-configuration.xml
   trunk/examples/jms/static-selector-jms/server0/jbm-jboss-beans.xml
   trunk/examples/jms/static-selector-jms/server0/jbm-jms.xml
   trunk/examples/jms/static-selector-jms/server0/jbm-users.xml
   trunk/examples/jms/static-selector-jms/src/
   trunk/examples/jms/static-selector-jms/src/org/
   trunk/examples/jms/static-selector-jms/src/org/jboss/
   trunk/examples/jms/static-selector-jms/src/org/jboss/jms/
   trunk/examples/jms/static-selector-jms/src/org/jboss/jms/example/
   trunk/examples/jms/static-selector-jms/src/org/jboss/jms/example/StaticSelectorExample.java
Modified:
   trunk/src/main/org/jboss/messaging/jms/server/impl/JMSServerDeployer.java
Log:
jms config tweaks and example

Copied: trunk/examples/jms/static-selector-jms/build.xml (from rev 6752, trunk/examples/jms/static-selector/build.xml)
===================================================================
--- trunk/examples/jms/static-selector-jms/build.xml	                        (rev 0)
+++ trunk/examples/jms/static-selector-jms/build.xml	2009-05-14 07:40:58 UTC (rev 6778)
@@ -0,0 +1,48 @@
+<?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="run" name="JBoss Messaging Static Selector Example jms">
+
+   <import file="../common/build.xml"/>
+
+   <target name="run">
+      <antcall target="runExample">
+         <param name="example.classname" value="org.jboss.jms.example.StaticSelectorExample"/>
+      </antcall>
+   </target>
+
+   <target name="runRemote">
+      <antcall target="runExample">
+         <param name="example.classname" value="org.jboss.jms.example.StaticSelectorExample"/>
+         <param name="jbm.example.runServer" value="false"/>
+      </antcall>
+   </target>
+
+</project>

Copied: trunk/examples/jms/static-selector-jms/readme.html (from rev 6752, trunk/examples/jms/static-selector/readme.html)
===================================================================
--- trunk/examples/jms/static-selector-jms/readme.html	                        (rev 0)
+++ trunk/examples/jms/static-selector-jms/readme.html	2009-05-14 07:40:58 UTC (rev 6778)
@@ -0,0 +1,137 @@
+<html>
+  <head>
+    <title>JBoss Messaging Static Message Selector Example</title>
+    <link rel="stylesheet" type="text/css" href="../common/common.css">
+  </head>
+  <body>
+     <h1>Static Message Selector Example</h1>
+     <br>
+     <p>This example shows you how to configure a JBoss Messaging queue with static message selectors (filters).</p>
+     
+     <p>Static message selectors are JBoss Messaging's extension to message selectors as defined in JMS spec 1.1.
+     Rather than specifying the selector in the application code, static message selectors are defined in one of 
+     JBoss Messaging's configuration files, jbm-configuration.xml, as an element called 'filter' inside each queue
+     definition, like</p>
+     
+     <pre><code>
+      &lt;queues&gt;     
+      	&lt;queue name=&quot;jms.queue.selectorQueue&quot;&gt;
+      	    &lt;address&gt;jms.queue.selectorQueue&lt;/address&gt;
+      	    &lt;filter string=&quot;color='red'&quot;/&gt;
+      	&lt;/queue&gt;
+      &lt;/queues&gt;
+     </code></pre>
+     
+     <p>Once thus configured, as this example does, the queue 'selectorQueue' only delivers messages that are selected against the filter, i.e.,
+     only the messages whose 'color' properties are of 'red' values can be received by its consumers. Those that don't match
+     the filter will be dropped by queue and therefore will never be delivered to any of its consumers.</p>
+      
+     <p>In the example code, five messages with different 'color' property values are sent to queue 'selectorQueue'. One consumer
+     is created to receive messages from the queue. Of the five sent messages, two are of 'red' color properties, one is 'blue', 
+     one is 'green' and one has not the 'color' propery at all. The result is that the consumer only gets the two 'red' messages.</p>
+     
+     <br>
+     <h2>Example step-by-step</h2>
+     <p><i>To run the example, simply type <code>ant</code> from this directory</i></p>
+     <br>
+     <ol>
+        <li>First we need to get an initial context so we can look-up the JMS connection factory and destination objects from JNDI. This initial context will get it's properties from the <code>client-jndi.properties</code> file in the directory <code>../common/config</code></li>
+        <pre>
+           <code>InitialContext initialContext = getContext();</code>
+        </pre>
+
+        <li>We look-up the JMS queue object from JNDI, this is the queue that has filter configured with it.</li>
+        <pre>
+           <code>Queue queue = (Queue) initialContext.lookup("/queue/selectorQueue");</code>
+        </pre>
+
+        <li>We look-up the JMS connection factory object from JNDI</li>
+        <pre>
+           <code>ConnectionFactory cf = (ConnectionFactory) initialContext.lookup("/ConnectionFactory");</code>
+        </pre>
+
+        <li>We create a JMS connection</li>
+        <pre>
+           <code>connection = cf.createConnection();</code>
+        </pre>
+
+        <li>We start the connection</li>
+        <pre>
+           <code>connection.start();</code>
+        </pre>
+
+        <li>We create a JMS session. The session is created as non transacted and will auto acknowledge messages.</li>
+        <pre>
+           <code>Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);</code>
+        </pre>
+
+        <li>We create a JMS message producer on the session. This will be used to send the messages.</li>
+        <pre>
+          <code>MessageProducer producer = session.createProducer(queue);</code>
+       </pre>
+
+        <li>We create a JMS message consumer that receives 'red' messages. The message listener will
+            check the 'color' property on each received message.</li>
+         <pre>
+           <code>
+         MessageConsumer redConsumer = session.createConsumer(queue);
+         redConsumer.setMessageListener(new SimpleMessageListener("red"));
+           </code>
+         </pre>
+
+        <li>We reate five messages with different 'color' properties.</li>
+        <pre>
+          <code>
+         TextMessage redMessage1 = session.createTextMessage("Red-1");
+         redMessage1.setStringProperty("color", "red");
+         TextMessage redMessage2 = session.createTextMessage("Red-2");
+         redMessage2.setStringProperty("color", "red");
+         TextMessage greenMessage = session.createTextMessage("Green");
+         greenMessage.setStringProperty("color", "green");
+         TextMessage blueMessage = session.createTextMessage("Blue");
+         blueMessage.setStringProperty("color", "blue");
+         TextMessage normalMessage = session.createTextMessage("No color");
+         </code>
+        </pre>
+
+        <li>We send those messages.</li>
+        <pre>
+          <code>
+         producer.send(redMessage1);
+         System.out.println("Message sent: " + redMessage1.getText());
+         producer.send(greenMessage);
+         System.out.println("Message sent: " + greenMessage.getText());
+         producer.send(blueMessage);
+         System.out.println("Message sent: " + blueMessage.getText());
+         producer.send(redMessage2);
+         System.out.println("Message sent: " + redMessage2.getText());
+         producer.send(normalMessage);
+         System.out.println("Message sent: " + normalMessage.getText());
+          </code>
+        </pre>
+
+        <li>Waiting for the message listener to check the received messages.</li>
+        <pre>
+          <code>
+          Thread.sleep(5000);
+         </code>
+        </pre>
+        
+        <li>And finally, <b>always</b> remember to close your JMS connections and resources after use, in a <code>finally</code> block. Closing a JMS connection will automatically close all of its sessions, consumers, producer and browser objects</li>
+
+        <pre>
+           <code>finally
+           {
+              if (initialContext != null)
+              {
+                initialContext.close();
+              }
+              if (connection != null)
+              {
+                 connection.close();
+              }
+           }</code>
+        </pre>
+     </ol>
+  </body>
+</html>

Copied: trunk/examples/jms/static-selector-jms/server0/client-jndi.properties (from rev 6752, trunk/examples/jms/static-selector/server0/client-jndi.properties)
===================================================================
--- trunk/examples/jms/static-selector-jms/server0/client-jndi.properties	                        (rev 0)
+++ trunk/examples/jms/static-selector-jms/server0/client-jndi.properties	2009-05-14 07:40:58 UTC (rev 6778)
@@ -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

Copied: trunk/examples/jms/static-selector-jms/server0/jbm-configuration.xml (from rev 6766, trunk/examples/jms/static-selector/server0/jbm-configuration.xml)
===================================================================
--- trunk/examples/jms/static-selector-jms/server0/jbm-configuration.xml	                        (rev 0)
+++ trunk/examples/jms/static-selector-jms/server0/jbm-configuration.xml	2009-05-14 07:40:58 UTC (rev 6778)
@@ -0,0 +1,37 @@
+<configuration xmlns="urn:jboss:messaging"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:jboss:messaging /schema/jbm-configuration.xsd">
+
+   <!-- Connectors -->
+   <connectors>
+      <connector name="netty-connector">
+         <factory-class>org.jboss.messaging.integration.transports.netty.NettyConnectorFactory</factory-class>
+         <param key="jbm.remoting.netty.port" value="5445" type="Integer"/>
+      </connector>
+   </connectors>
+   
+   <!-- Acceptors -->
+   <acceptors>
+      <acceptor name="netty-acceptor">
+         <factory-class>org.jboss.messaging.integration.transports.netty.NettyAcceptorFactory</factory-class>
+         <param key="jbm.remoting.netty.port" value="5445" type="Integer"/>
+      </acceptor>
+   </acceptors>
+
+   <!-- Other config -->
+
+   <journal-min-files>2</journal-min-files>
+
+   <security-settings>
+      <!--security for example queue-->
+      <security-setting match="jms.queue.selectorQueue">
+         <permission type="createDurableQueue" roles="guest"/>
+         <permission type="deleteDurableQueue" roles="guest"/>
+         <permission type="createTempQueue" roles="guest"/>
+         <permission type="deleteTempQueue" roles="guest"/>
+         <permission type="consume" roles="guest"/>
+         <permission type="send" roles="guest"/>
+      </security-setting>
+   </security-settings>
+   
+</configuration>

Copied: trunk/examples/jms/static-selector-jms/server0/jbm-jboss-beans.xml (from rev 6752, trunk/examples/jms/static-selector/server0/jbm-jboss-beans.xml)
===================================================================
--- trunk/examples/jms/static-selector-jms/server0/jbm-jboss-beans.xml	                        (rev 0)
+++ trunk/examples/jms/static-selector-jms/server0/jbm-jboss-beans.xml	2009-05-14 07:40:58 UTC (rev 6778)
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+   <bean name="Naming" class="org.jnp.server.NamingBeanImpl"/>
+
+   <!-- JNDI server. Disable this if you don't want JNDI -->
+   <bean name="JNDIServer" class="org.jnp.server.Main">
+      <property name="namingInfo">
+         <inject bean="Naming"/>
+      </property>
+      <property name="port">1099</property>
+      <property name="bindAddress">localhost</property>
+      <property name="rmiPort">1098</property>
+      <property name="rmiBindAddress">localhost</property>
+   </bean>
+   
+   <!-- MBean server -->
+   <bean name="MBeanServer" class="javax.management.MBeanServer">
+      <constructor factoryClass="java.lang.management.ManagementFactory"
+                   factoryMethod="getPlatformMBeanServer"/>
+   </bean> 
+
+   <!-- The core configuration -->
+   <bean name="Configuration" class="org.jboss.messaging.core.config.impl.FileConfiguration"/>
+
+   <!-- The security manager -->
+   <bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl">
+      <start ignored="true"/>
+      <stop ignored="true"/>
+   </bean>
+
+   <!-- The core server -->
+   <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl"> 
+      <start ignored="true"/>
+      <stop ignored="true"/>
+      <constructor>
+         <parameter>
+            <inject bean="Configuration"/>
+         </parameter>
+         <parameter>
+            <inject bean="MBeanServer"/>
+         </parameter>
+         <parameter>
+            <inject bean="JBMSecurityManager"/>
+         </parameter>        
+      </constructor>         
+   </bean>
+   
+   <!-- The JMS server -->
+   <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
+      <constructor>         
+         <parameter>
+            <inject bean="MessagingServer"/>
+         </parameter>
+      </constructor>
+   </bean>
+
+</deployment>

Copied: trunk/examples/jms/static-selector-jms/server0/jbm-jms.xml (from rev 6766, trunk/examples/jms/static-selector/server0/jbm-jms.xml)
===================================================================
--- trunk/examples/jms/static-selector-jms/server0/jbm-jms.xml	                        (rev 0)
+++ trunk/examples/jms/static-selector-jms/server0/jbm-jms.xml	2009-05-14 07:40:58 UTC (rev 6778)
@@ -0,0 +1,18 @@
+<configuration xmlns="urn:jboss:messaging"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:jboss:messaging /schema/jbm-jms.xsd">
+   <!--the connection factory used by the example-->
+   <connection-factory name="ConnectionFactory">
+      <connector-ref connector-name="netty-connector"/>
+      <entries>
+         <entry name="ConnectionFactory"/>
+      </entries>
+   </connection-factory>
+
+   <!--the queue used by the example-->
+   <queue name="selectorQueue">
+      <entry name="/queue/selectorQueue"/>
+      <filter string="color='red'"/>
+   </queue>
+
+</configuration>
\ No newline at end of file

Copied: trunk/examples/jms/static-selector-jms/server0/jbm-users.xml (from rev 6766, trunk/examples/jms/static-selector/server0/jbm-users.xml)
===================================================================
--- trunk/examples/jms/static-selector-jms/server0/jbm-users.xml	                        (rev 0)
+++ trunk/examples/jms/static-selector-jms/server0/jbm-users.xml	2009-05-14 07:40:58 UTC (rev 6778)
@@ -0,0 +1,7 @@
+<configuration xmlns="urn:jboss:messaging" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:jboss:messaging /schema/jbm-users.xsd">
+   <!-- the default user.  this is used where username is null-->
+   <defaultuser name="guest" password="guest">
+      <role name="guest"/>
+   </defaultuser>
+</configuration>
\ No newline at end of file

Copied: trunk/examples/jms/static-selector-jms/src/org/jboss/jms/example/StaticSelectorExample.java (from rev 6752, trunk/examples/jms/static-selector/src/org/jboss/jms/example/StaticSelectorExample.java)
===================================================================
--- trunk/examples/jms/static-selector-jms/src/org/jboss/jms/example/StaticSelectorExample.java	                        (rev 0)
+++ trunk/examples/jms/static-selector-jms/src/org/jboss/jms/example/StaticSelectorExample.java	2009-05-14 07:40:58 UTC (rev 6778)
@@ -0,0 +1,152 @@
+/*
+   * 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.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageListener;
+import javax.jms.MessageProducer;
+import javax.jms.Queue;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+import javax.naming.InitialContext;
+
+/**
+ * A simple JMS example that shows how static message selectors work.
+ *
+ * @author <a href="hgao at redhat.com">Howard Gao</a>
+ */
+public class StaticSelectorExample extends JMSExample
+{
+   private volatile boolean result = true;
+
+   public static void main(String[] args)
+   {
+      new StaticSelectorExample().run(args);
+   }
+
+   public boolean runExample() throws Exception
+   {
+      Connection connection = null;
+      InitialContext initialContext = null;
+      try
+      {
+         //Step 1. Create an initial context to perform the JNDI lookup.
+         initialContext = getContext(0);
+
+         //Step 2. look-up the JMS queue object from JNDI, this is the queue that has filter configured with it.
+         Queue queue = (Queue) initialContext.lookup("/queue/selectorQueue");
+
+         //Step 3. look-up the JMS connection factory object from JNDI
+         ConnectionFactory cf = (ConnectionFactory) initialContext.lookup("/ConnectionFactory");
+
+         //Step 4. Create a JMS Connection
+         connection = cf.createConnection();
+
+         //Step 5. Start the connection
+         connection.start();
+
+         //Step 6. Create a JMS Session
+         Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+
+         //Step 7. Create a JMS Message Producer
+         MessageProducer producer = session.createProducer(queue);
+
+         //Step 8. Create a JMS Message Consumer that receives 'red' messages
+         MessageConsumer redConsumer = session.createConsumer(queue);
+         redConsumer.setMessageListener(new SimpleMessageListener("red"));
+
+         //Step 9. Create five messages with different 'color' properties
+         TextMessage redMessage1 = session.createTextMessage("Red-1");
+         redMessage1.setStringProperty("color", "red");
+         TextMessage redMessage2 = session.createTextMessage("Red-2");
+         redMessage2.setStringProperty("color", "red");
+         TextMessage greenMessage = session.createTextMessage("Green");
+         greenMessage.setStringProperty("color", "green");
+         TextMessage blueMessage = session.createTextMessage("Blue");
+         blueMessage.setStringProperty("color", "blue");
+         TextMessage normalMessage = session.createTextMessage("No color");
+
+         //Step 10. Send the Messages
+         producer.send(redMessage1);
+         System.out.println("Message sent: " + redMessage1.getText());
+         producer.send(greenMessage);
+         System.out.println("Message sent: " + greenMessage.getText());
+         producer.send(blueMessage);
+         System.out.println("Message sent: " + blueMessage.getText());
+         producer.send(redMessage2);
+         System.out.println("Message sent: " + redMessage2.getText());
+         producer.send(normalMessage);
+         System.out.println("Message sent: " + normalMessage.getText());
+
+         //Step 11. Waiting for the message listener to check the received messages.
+         Thread.sleep(5000);
+
+         return result;
+      }
+      finally
+      {
+         //Step 12. Be sure to close our JMS resources!
+         if (initialContext != null)
+         {
+            initialContext.close();
+         }
+         if(connection != null)
+         {
+            connection.close();
+         }
+      }
+   }
+
+   public class SimpleMessageListener implements MessageListener
+   {
+      private String name;
+
+      public SimpleMessageListener(String listener)
+      {
+         name = listener;
+      }
+
+      public void onMessage(Message msg)
+      {
+         TextMessage textMessage = (TextMessage)msg;
+         try
+         {
+            String colorProp = msg.getStringProperty("color");
+            System.out.println("Receiver " + name + " receives message [" + textMessage.getText() + "] with color property: " + colorProp);
+            if (!colorProp.equals(name))
+            {
+               result = false;
+            }
+         }
+         catch (JMSException e)
+         {
+            e.printStackTrace();
+            result = false;
+         }
+      }
+   }
+
+}
\ No newline at end of file

Modified: trunk/src/main/org/jboss/messaging/jms/server/impl/JMSServerDeployer.java
===================================================================
--- trunk/src/main/org/jboss/messaging/jms/server/impl/JMSServerDeployer.java	2009-05-14 06:00:40 UTC (rev 6777)
+++ trunk/src/main/org/jboss/messaging/jms/server/impl/JMSServerDeployer.java	2009-05-14 07:40:58 UTC (rev 6778)
@@ -100,9 +100,9 @@
 
    private static final String QUEUE_NODE_NAME = "queue";
 
-   private static final String QUEUE_FILTER_STRING_ATTR_NAME = "filter";
+   private static final String QUEUE_FILTER_NODE_NAME = "filter";
 
-   private static final String QUEUE_DURABLE_ATTR_NAME = "durable";
+   private static final String QUEUE_DURABLE_NODE_NAME = "durable";
 
    private static final String TOPIC_NODE_NAME = "topic";
 
@@ -438,19 +438,9 @@
          NamedNodeMap atts = node.getAttributes();
          String queueName = atts.getNamedItem(getKeyAttribute()).getNodeValue();
          String filterString = null;
-         Node filterNode = atts.getNamedItem(QUEUE_FILTER_STRING_ATTR_NAME);
-         if(filterNode != null)
-         {
-            filterString = filterNode.getNodeValue();
-         }
          boolean durable = DEFAULT_QUEUE_DURABILITY;
-         Node durableNode = atts.getNamedItem(QUEUE_DURABLE_ATTR_NAME);
-         if(durableNode != null)
-         {
-            String val = durableNode.getNodeValue();
-            durable = val == null ? DEFAULT_QUEUE_DURABILITY:val.equalsIgnoreCase(Boolean.FALSE.toString());
-         }
          NodeList children = node.getChildNodes();
+         ArrayList<String> jndiNames = new ArrayList<String>();
          for (int i = 0; i < children.getLength(); i++)
          {
             Node child = children.item(i);
@@ -458,9 +448,25 @@
             if (ENTRY_NODE_NAME.equals(children.item(i).getNodeName()))
             {
                String jndiName = child.getAttributes().getNamedItem("name").getNodeValue();
-               jmsServerControl.createQueue(queueName, jndiName, filterString, durable);
+               jndiNames.add(jndiName);
             }
+            else if(QUEUE_DURABLE_NODE_NAME.equals(children.item(i).getNodeName()))
+            {
+               Node durableNode = children.item(i);
+               durable = durableNode.getNodeValue() == null ? DEFAULT_QUEUE_DURABILITY:durableNode.getNodeValue().equalsIgnoreCase(Boolean.FALSE.toString());
+            }
+            else if(QUEUE_FILTER_NODE_NAME.equals(children.item(i).getNodeName()))
+            {
+               Node filterNode = children.item(i);
+               Node attNode = filterNode.getAttributes().getNamedItem("string");
+               filterString = attNode.getNodeValue();
+            }
          }
+         for (String jndiName : jndiNames)
+         {
+            jmsServerControl.createQueue(queueName, jndiName, filterString, durable);
+            System.out.println(queueName + jndiName + filterString + durable);
+         }
       }
       else if (node.getNodeName().equals(TOPIC_NODE_NAME))
       {




More information about the jboss-cvs-commits mailing list