[jboss-cvs] JBoss Messaging SVN: r6939 - in trunk: docs/user-manual/en and 13 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed May 20 12:17:20 EDT 2009
Author: timfox
Date: 2009-05-20 12:17:19 -0400 (Wed, 20 May 2009)
New Revision: 6939
Added:
trunk/examples/jms/static-selector-jms/src/org/jboss/jms/example/StaticSelectorJMSExample.java
Removed:
trunk/examples/jms/static-selector-jms/src/org/jboss/jms/example/StaticSelectorExample.java
Modified:
trunk/.classpath
trunk/docs/user-manual/en/configuration-index.xml
trunk/docs/user-manual/en/send-guarantees.xml
trunk/examples/jms/security/server0/jbm-jms.xml
trunk/examples/jms/static-selector-jms/server0/jbm-jms.xml
trunk/src/config/common/schema/jbm-jms.xsd
trunk/src/main/org/jboss/messaging/core/client/ClientSessionFactory.java
trunk/src/main/org/jboss/messaging/core/client/impl/ClientSessionFactoryImpl.java
trunk/src/main/org/jboss/messaging/jms/client/JBossConnectionFactory.java
trunk/src/main/org/jboss/messaging/jms/server/impl/JMSServerDeployer.java
trunk/src/main/org/jboss/messaging/jms/server/impl/JMSServerManagerImpl.java
trunk/src/main/org/jboss/messaging/ra/JBMResourceAdapter.java
trunk/src/main/org/jboss/messaging/utils/XMLUtil.java
trunk/tests/config/jbm-jms-for-JMSServerDeployerTest.xml
trunk/tests/src/org/jboss/messaging/tests/integration/client/ClientSessionFactoryTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/jms/JBossConnectionFactoryTest.java
Log:
renamed several params, fixed jms static selector etc
Modified: trunk/.classpath
===================================================================
--- trunk/.classpath 2009-05-20 15:21:42 UTC (rev 6938)
+++ trunk/.classpath 2009-05-20 16:17:19 UTC (rev 6939)
@@ -2,7 +2,7 @@
<classpath>
<classpathentry excluding="**/.svn/**/*" kind="src" path="src/main"/>
<classpathentry kind="src" path="build/src"/>
- <classpathentry kind="src" path="src/config/common"/>
+ <classpathentry excluding="schema/" kind="src" path="src/config/common"/>
<classpathentry kind="src" path="tests/jms-tests/config"/>
<classpathentry kind="src" path="tests/config"/>
<classpathentry kind="src" path="src/config/stand-alone/non-clustered"/>
@@ -59,6 +59,7 @@
<classpathentry kind="src" path="examples/jms/send-acknowledgements/src"/>
<classpathentry kind="src" path="examples/jms/ssl-enabled/src"/>
<classpathentry kind="src" path="examples/jms/static-selector/src"/>
+ <classpathentry kind="src" path="examples/jms/static-selector-jms/src"/>
<classpathentry kind="src" path="examples/jms/symmetric-cluster/src"/>
<classpathentry kind="src" path="examples/jms/temp-queue/src"/>
<classpathentry kind="src" path="examples/jms/topic/src"/>
Modified: trunk/docs/user-manual/en/configuration-index.xml
===================================================================
--- trunk/docs/user-manual/en/configuration-index.xml 2009-05-20 15:21:42 UTC (rev 6938)
+++ trunk/docs/user-manual/en/configuration-index.xml 2009-05-20 16:17:19 UTC (rev 6939)
@@ -7,6 +7,7 @@
<title>Server Configuration</title>
<section>
<title>jbm-configuration.xml</title>
+ <para>This is the main core server configuration file.</para>
<table frame="topbot" border="2">
<title>Server Configuration</title>
<tgroup cols="4">
@@ -423,17 +424,20 @@
</section>
<section>
<title>jbm-jms.xml</title>
+ <para>This is the configuration file used by the server side JMS service to load JMS Queues, Topics and Connection Factories</para>
<table frame="topbot" border="2">
<title>JMS Server Configuration</title>
- <tgroup cols="3">
+ <tgroup cols="4">
<colspec colname="c1" colnum="1"/>
<colspec colname="c2" colnum="2"/>
<colspec colname="c3" colnum="3"/>
+ <colspec colname="c4" colnum="4"/>
<thead>
<row>
<entry>Element Name</entry>
<entry>Element Type</entry>
<entry>Description</entry>
+ <entry>Default</entry>
</row>
</thead>
<tbody>
@@ -442,227 +446,236 @@
>connection-factory</link></entry>
<entry>ConnectionFactory</entry>
<entry>A list of connection factories to create and add to JNDI</entry>
+ <entry></entry>
</row>
<row>
- <entry><link linkend="using-jms.server.configuration"
- >queue</link></entry>
- <entry>Queue</entry>
- <entry>A queue to create and add to JNDI</entry>
+ <entry>connection-factory.client-id</entry>
+ <entry>String</entry>
+ <entry>The pre-configured client ID for the connection factory.</entry>
+ <entry>null</entry>
</row>
<row>
- <entry><link linkend="using-jms.server.configuration"
- >topic</link></entry>
- <entry>Topic</entry>
- <entry>A topic to create and add to JNDI</entry>
+ <entry>connection-factory.ping-period</entry>
+ <entry>Long</entry>
+ <entry>The period between ping packets being sent from client to server.</entry>
+ <entry>5000 ms</entry>
</row>
- </tbody>
- </tgroup>
- </table>
- </section>
- </section>
- <section>
- <title>Client Configuration</title>
- <section>
- <title>Client Session Factory API Configuration</title>
- <table frame="topbot" border="2">
- <title>Client Session Factory API</title>
- <tgroup cols="4">
- <colspec colname="c1" colnum="1"/>
- <colspec colname="c2" colnum="2"/>
- <colspec colname="c3" colnum="3"/>
- <colspec colname="c4" colnum="4"/>
- <thead>
<row>
- <entry>Parameter</entry>
- <entry>Parameter Type</entry>
- <entry>Description</entry>
- <entry>Default</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry><link linkend="clusters-discovery.groups.clientside"
- >discoveryRefreshTimeout</link></entry>
+ <entry><link linkend="dead.connections">connection-factory.connection-ttl</link></entry>
<entry>long</entry>
- <entry>The timeout, in milli seconds, to when discovering. </entry>
- <entry>10000</entry>
- </row>
- <row>
- <entry><link linkend="dead.connections">pingPeriod</link></entry>
- <entry>long</entry>
- <entry>The period, in milli seconds, </entry>
- <entry>1000000</entry>
- </row>
- <row>
- <entry><link linkend="dead.connections">connectionTTL</link></entry>
- <entry>long</entry>
<entry>The time to live for connections</entry>
- <entry>5 * 60000</entry>
+ <entry>5 * 60000 ms</entry>
</row>
<row>
- <entry>callTimeout</entry>
+ <entry>connection-factory.call-timeout</entry>
<entry>long</entry>
<entry>the time out, in milliseconds, for remote calls</entry>
- <entry>30000</entry>
+ <entry>30000 ms</entry>
</row>
- </tbody>
- </tgroup>
- </table>
- <informaltable frame="topbot">
- <tgroup cols="4">
- <colspec colname="c1" colnum="1"/>
- <colspec colname="c2" colnum="2"/>
- <colspec colname="c3" colnum="3"/>
- <colspec colname="c4" colnum="4"/>
- <tbody>
<row>
<entry><link linkend="connection-ttl.session.multiplexing"
- >maxConnections</link></entry>
+ >connection-factory.max-connections</link></entry>
<entry>int</entry>
<entry>The max number of connections per factory</entry>
<entry>8</entry>
</row>
<row>
<entry><link linkend="large-messages.core.config"
- >minLargeMessageSize</link></entry>
+ >connection-factory.min-large-message-size</link></entry>
<entry>int</entry>
<entry>The size, in bytes, before a message is treated as large </entry>
<entry>100 * 1024</entry>
</row>
<row>
<entry><link linkend="flow-control.core.api"
- >consumerWindowSize</link></entry>
+ >connection-factory.consumer-window-size</link></entry>
<entry>int</entry>
<entry>The window size, in bytes, for consumer flow control</entry>
<entry>1024 * 1024</entry>
</row>
<row>
<entry><link linkend="flow-control.rate.core.api"
- >consumerMaxRate</link></entry>
+ >connection-factory.consumer-max-rate</link></entry>
<entry>int</entry>
<entry>The fastest rate a consumer may consume messages per
second</entry>
<entry>-1</entry>
</row>
<row>
- <entry>producerWindowSize</entry>
+ <entry>connection-factory.producer-window-size</entry>
<entry>int</entry>
<entry>The window size for sending messages</entry>
<entry>1024 * 1024</entry>
</row>
<row>
<entry><link linkend="flow-control.producer.rate.core.api"
- >producerMaxRate</link></entry>
+ >connection-factory.producer-max-rate</link></entry>
<entry>int</entry>
<entry>The max messages per second that can be sent</entry>
<entry>-1</entry>
</row>
<row>
<entry><link linkend="send-guarantees.nontrans.acks"
- >blockOnAcknowledge</link></entry>
+ >connection-factory.block-on-acknowledge</link></entry>
<entry>boolean</entry>
<entry>Whether or not we acknowledge messages synchronously</entry>
<entry>false</entry>
</row>
<row>
<entry><link linkend="non-transactional-sends"
- >blockOnPersistentSend</link></entry>
+ >connection-factory.block-on-non-persistent-send</link></entry>
<entry>boolean</entry>
- <entry>Whether or not we send persistent messages synchronously</entry>
+ <entry>Whether or not we send non persistent messages synchronously</entry>
<entry>false</entry>
</row>
<row>
<entry><link linkend="non-transactional-sends"
- >blockOnNonPersistentSend</link></entry>
+ >connection-factory.block-on-persistent-send</link></entry>
<entry>boolean</entry>
- <entry>Whether or not we send non persistent messages
+ <entry>Whether or not we send persistent messages
synchronously</entry>
<entry>false</entry>
</row>
<row>
- <entry>autoGroup</entry>
+ <entry>connection-factory.auto-group</entry>
<entry>boolean</entry>
- <entry>Whether or not we auto group on queues</entry>
+ <entry>Whether or not we automatically use message grouping.</entry>
<entry>false</entry>
</row>
<row>
- <entry>preAcknowledge</entry>
+ <entry>connection-factory.pre-acknowledge</entry>
<entry>boolean</entry>
<entry>Whether messages are pre acknowledged by the server before
sending</entry>
<entry>false</entry>
</row>
<row>
- <entry>ackBatchSize</entry>
+ <entry>connection-factory.dups-ok-batch-size</entry>
<entry>int</entry>
- <entry>The batch size for sending acknowledgements</entry>
+ <entry>The batch size in bytes between acknowledgements when using DUPS_OK_ACKNOWLEDGE mode</entry>
<entry>1024 * 1024</entry>
</row>
<row>
+ <entry>connection-factory.transaction-batch-size</entry>
+ <entry>int</entry>
+ <entry>The batch size in bytes between acknowledgements when using a transactional session</entry>
+ <entry>1024 * 1024</entry>
+ </row>
+ <row>
<entry><link linkend="clusters.client.loadbalancing"
- >loadBalancingPolicyClassName</link></entry>
+ >connection-factory.connection-load-balancing-policy-class-name</link></entry>
<entry>String</entry>
<entry>The name of the load balancing class</entry>
<entry>org.jboss.messaging.core.client.impl.RoundRobinConnectionLoadBalancingPolicy</entry>
</row>
<row>
<entry><link linkend="clusters-discovery.groups.clientside"
- >initialWaitTimeout</link></entry>
+ >connection-factory.discovery-initial-wait-timeout</link></entry>
<entry>long</entry>
- <entry>The initail time to wait, in milli seconds, for discovery groups
+ <entry>The initail time to wait, in milliseconds, for discovery groups
to wait for broadcasts</entry>
<entry>2000</entry>
</row>
<row>
<entry><link linkend="thread-pooling.client.side"
- >useGlobalPools</link></entry>
+ >connection-factory.use-global-pools</link></entry>
<entry>boolean</entry>
<entry>Use a global thread pool for threads</entry>
<entry>true</entry>
</row>
<row>
<entry><link linkend="thread-pooling.client.side"
- >scheduledThreadPoolMaxSize</link></entry>
+ >connection-factory.scheduled-thread-pool-max-size</link></entry>
<entry>int</entry>
<entry>The size of the scheduled thread pool</entry>
<entry>2</entry>
</row>
<row>
<entry><link linkend="thread-pooling.client.side"
- >threadPoolMaxSize</link></entry>
+ >connection-factory.thread-pool-max-size</link></entry>
<entry>int</entry>
<entry>The size of the thread pool</entry>
<entry>-1</entry>
</row>
<row>
- <entry>retryInterval</entry>
+ <entry>connection-factory.retry-interval</entry>
<entry>long</entry>
<entry>The time, in milliseconds, retry a connection after
failing</entry>
<entry>2000</entry>
</row>
<row>
- <entry>retryIntervalMultiplier</entry>
+ <entry>connection-factory.retry-interval-multiplier</entry>
<entry>double</entry>
<entry>Used in the calculating the retry interval</entry>
<entry>1d</entry>
</row>
<row>
- <entry>reconnectAttempts</entry>
+ <entry>connection-factory.reconnect-attempts</entry>
<entry>int</entry>
<entry>The number of attempts to make at reconnecting</entry>
<entry>0</entry>
</row>
<row>
<entry><link linkend="ha.client.automatic"
- >failoverOnServerShutdown</link></entry>
+ >connection-factory.failover-on-server-shutdown</link></entry>
<entry>boolean</entry>
<entry>whether or not to failover on server shutdown</entry>
<entry>false</entry>
</row>
+ <row>
+ <entry><link linkend="using-jms.server.configuration"
+ >queue</link></entry>
+ <entry>Queue</entry>
+ <entry>A queue to create and add to JNDI</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>queue.name (attribute)</entry>
+ <entry>String</entry>
+ <entry>Unique name of the queue</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>queue.entry</entry>
+ <entry>String</entry>
+ <entry>Context where the queue will be bound in JNDI. There can be many.</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>queue.durable</entry>
+ <entry>Boolean</entry>
+ <entry>Is the queue durable?</entry>
+ <entry>true</entry>
+ </row>
+ <row>
+ <entry>queue.filter</entry>
+ <entry>String</entry>
+ <entry>Optional filter expression for the queue</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry><link linkend="using-jms.server.configuration"
+ >topic</link></entry>
+ <entry>Topic</entry>
+ <entry>A topic to create and add to JNDI</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>topic.name (attribute)</entry>
+ <entry>String</entry>
+ <entry>Unique name of the topic</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>topic.entry</entry>
+ <entry>String</entry>
+ <entry>Context where the topic will be bound in JNDI. There can be many.</entry>
+ <entry></entry>
+ </row>
</tbody>
</tgroup>
- </informaltable>
+ </table>
</section>
- </section>
+ </section>
</chapter>
Modified: trunk/docs/user-manual/en/send-guarantees.xml
===================================================================
--- trunk/docs/user-manual/en/send-guarantees.xml 2009-05-20 15:21:42 UTC (rev 6938)
+++ trunk/docs/user-manual/en/send-guarantees.xml 2009-05-20 16:17:19 UTC (rev 6939)
@@ -56,8 +56,8 @@
<para>If you are using JMS and you're using the JMS service on the server to load your JMS
connection factory instances into JNDI then these parameters can be configured in
<literal>jbm-jms.xml</literal> using the elements <literal
- >send-p-messages-synchronously</literal> and <literal
- >send-np-messages-synchronously</literal>. If you're using JMS but not using JNDI
+ >block-on-persistent-send</literal> and <literal
+ >block-on-non-persistent-send</literal>. If you're using JMS but not using JNDI
then you can set these values directly on the <literal>JBossConnectionFactory</literal>
instance using the appropriate setter methods.</para>
<para>If you're using core you can set these values directly on the <literal
Modified: trunk/examples/jms/security/server0/jbm-jms.xml
===================================================================
--- trunk/examples/jms/security/server0/jbm-jms.xml 2009-05-20 15:21:42 UTC (rev 6938)
+++ trunk/examples/jms/security/server0/jbm-jms.xml 2009-05-20 16:17:19 UTC (rev 6939)
@@ -4,8 +4,8 @@
<!--the connection factory used by the example-->
<connection-factory name="ConnectionFactory">
<connector-ref connector-name="netty-connector"/>
- <send-p-messages-synchronously>true</send-p-messages-synchronously>
- <send-np-messages-synchronously>true</send-np-messages-synchronously>
+ <block-on-persistent-send>true</block-on-persistent-send>
+ <block-on-non-persistent-send>true</block-on-non-persistent-send>
<entries>
<entry name="ConnectionFactory"/>
</entries>
Modified: trunk/examples/jms/static-selector-jms/server0/jbm-jms.xml
===================================================================
--- trunk/examples/jms/static-selector-jms/server0/jbm-jms.xml 2009-05-20 15:21:42 UTC (rev 6938)
+++ trunk/examples/jms/static-selector-jms/server0/jbm-jms.xml 2009-05-20 16:17:19 UTC (rev 6939)
@@ -12,7 +12,7 @@
<!--the queue used by the example-->
<queue name="selectorQueue">
<entry name="/queue/selectorQueue"/>
- <filter string="color='red'"/>
+ <selector string="color='red'"/>
</queue>
</configuration>
\ No newline at end of file
Deleted: trunk/examples/jms/static-selector-jms/src/org/jboss/jms/example/StaticSelectorExample.java
===================================================================
--- trunk/examples/jms/static-selector-jms/src/org/jboss/jms/example/StaticSelectorExample.java 2009-05-20 15:21:42 UTC (rev 6938)
+++ trunk/examples/jms/static-selector-jms/src/org/jboss/jms/example/StaticSelectorExample.java 2009-05-20 16:17:19 UTC (rev 6939)
@@ -1,152 +0,0 @@
-/*
- * 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
Copied: trunk/examples/jms/static-selector-jms/src/org/jboss/jms/example/StaticSelectorJMSExample.java (from rev 6923, trunk/examples/jms/static-selector-jms/src/org/jboss/jms/example/StaticSelectorExample.java)
===================================================================
--- trunk/examples/jms/static-selector-jms/src/org/jboss/jms/example/StaticSelectorJMSExample.java (rev 0)
+++ trunk/examples/jms/static-selector-jms/src/org/jboss/jms/example/StaticSelectorJMSExample.java 2009-05-20 16:17:19 UTC (rev 6939)
@@ -0,0 +1,154 @@
+/*
+ * 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;
+
+import org.jboss.common.example.JBMExample;
+
+/**
+ * A simple JMS example that shows how static message selectors work when using JMS config.
+ *
+ * @author <a href="hgao at redhat.com">Howard Gao</a>
+ */
+public class StaticSelectorJMSExample extends JBMExample
+{
+ private volatile boolean result = true;
+
+ public static void main(String[] args)
+ {
+ new StaticSelectorJMSExample().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/config/common/schema/jbm-jms.xsd
===================================================================
--- trunk/src/config/common/schema/jbm-jms.xsd 2009-05-20 15:21:42 UTC (rev 6938)
+++ trunk/src/config/common/schema/jbm-jms.xsd 2009-05-20 16:17:19 UTC (rev 6939)
@@ -28,7 +28,7 @@
<xsd:all>
<xsd:element name="connector-ref" type="connector-refType" maxOccurs="1" minOccurs="0"></xsd:element>
<xsd:element name="discovery-group-ref" type="discovery-group-refType" maxOccurs="1" minOccurs="0"></xsd:element>
- <xsd:element name="discovery-initial-wait" type="xsd:unsignedLong" maxOccurs="1" minOccurs="0"></xsd:element>
+ <xsd:element name="discovery-initial-wait-timeout" type="xsd:unsignedLong" maxOccurs="1" minOccurs="0"></xsd:element>
<xsd:element name="entries" maxOccurs="1" minOccurs="0">
<xsd:complexType>
@@ -75,10 +75,10 @@
<xsd:element name="block-on-acknowledge" type="xsd:boolean"
maxOccurs="1" minOccurs="0">
</xsd:element>
- <xsd:element name="send-np-messages-synchronously" type="xsd:boolean"
+ <xsd:element name="block-on-non-persistent-send" type="xsd:boolean"
maxOccurs="1" minOccurs="0">
</xsd:element>
- <xsd:element name="send-p-messages-synchronously" type="xsd:boolean"
+ <xsd:element name="block-on-persistent-send" type="xsd:boolean"
maxOccurs="1" minOccurs="0">
</xsd:element>
<xsd:element name="auto-group-id" type="xsd:boolean"
@@ -139,7 +139,7 @@
<xsd:complexType name="queueType">
<xsd:sequence>
<xsd:element name="entry" type="entryType" maxOccurs="unbounded" minOccurs="1"></xsd:element>
- <xsd:element name="filter" maxOccurs="1" minOccurs="0">
+ <xsd:element name="selector" maxOccurs="1" minOccurs="0">
<xsd:complexType>
<xsd:attribute name="string" type="xsd:string" use="required"></xsd:attribute>
</xsd:complexType>
Modified: trunk/src/main/org/jboss/messaging/core/client/ClientSessionFactory.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/client/ClientSessionFactory.java 2009-05-20 15:21:42 UTC (rev 6938)
+++ trunk/src/main/org/jboss/messaging/core/client/ClientSessionFactory.java 2009-05-20 16:17:19 UTC (rev 6939)
@@ -119,9 +119,9 @@
void setAckBatchSize(int ackBatchSize);
- long getInitialWaitTimeout();
+ long getDiscoveryInitialWaitTimeout();
- void setInitialWaitTimeout(long initialWaitTimeout);
+ void setDiscoveryInitialWaitTimeout(long initialWaitTimeout);
boolean isUseGlobalPools();
@@ -151,9 +151,9 @@
void setFailoverOnServerShutdown(boolean failoverOnServerShutdown);
- String getLoadBalancingPolicyClassName();
+ String getConnectionLoadBalancingPolicyClassName();
- void setLoadBalancingPolicyClassName(String loadBalancingPolicyClassName);
+ void setConnectionLoadBalancingPolicyClassName(String loadBalancingPolicyClassName);
String getDiscoveryAddress();
Modified: trunk/src/main/org/jboss/messaging/core/client/impl/ClientSessionFactoryImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/client/impl/ClientSessionFactoryImpl.java 2009-05-20 15:21:42 UTC (rev 6938)
+++ trunk/src/main/org/jboss/messaging/core/client/impl/ClientSessionFactoryImpl.java 2009-05-20 16:17:19 UTC (rev 6939)
@@ -91,7 +91,7 @@
public static final boolean DEFAULT_PRE_ACKNOWLEDGE = false;
- public static final long DEFAULT_DISCOVERY_INITIAL_WAIT = 2000;
+ public static final long DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT = 2000;
public static final long DEFAULT_DISCOVERY_REFRESH_TIMEOUT = 10000;
@@ -137,6 +137,8 @@
private int discoveryPort;
private long discoveryRefreshTimeout;
+
+ private long discoveryInitialWaitTimeout;
private long pingPeriod;
@@ -166,12 +168,10 @@
private boolean preAcknowledge;
- private String loadBalancingPolicyClassName;
+ private String connectionLoadBalancingPolicyClassName;
private int ackBatchSize;
- private long initialWaitTimeout;
-
private boolean useGlobalPools;
private int scheduledThreadPoolMaxSize;
@@ -330,9 +330,9 @@
ackBatchSize = DEFAULT_ACK_BATCH_SIZE;
- loadBalancingPolicyClassName = DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME;
+ connectionLoadBalancingPolicyClassName = DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME;
- initialWaitTimeout = DEFAULT_DISCOVERY_INITIAL_WAIT;
+ discoveryInitialWaitTimeout = DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT;
useGlobalPools = DEFAULT_USE_GLOBAL_POOLS;
@@ -560,15 +560,15 @@
this.ackBatchSize = ackBatchSize;
}
- public synchronized long getInitialWaitTimeout()
+ public synchronized long getDiscoveryInitialWaitTimeout()
{
- return initialWaitTimeout;
+ return discoveryInitialWaitTimeout;
}
- public synchronized void setInitialWaitTimeout(long initialWaitTimeout)
+ public synchronized void setDiscoveryInitialWaitTimeout(long initialWaitTimeout)
{
checkWrite();
- this.initialWaitTimeout = initialWaitTimeout;
+ this.discoveryInitialWaitTimeout = initialWaitTimeout;
}
public synchronized boolean isUseGlobalPools()
@@ -648,15 +648,15 @@
this.failoverOnServerShutdown = failoverOnServerShutdown;
}
- public synchronized String getLoadBalancingPolicyClassName()
+ public synchronized String getConnectionLoadBalancingPolicyClassName()
{
- return loadBalancingPolicyClassName;
+ return connectionLoadBalancingPolicyClassName;
}
- public synchronized void setLoadBalancingPolicyClassName(String loadBalancingPolicyClassName)
+ public synchronized void setConnectionLoadBalancingPolicyClassName(String loadBalancingPolicyClassName)
{
checkWrite();
- this.loadBalancingPolicyClassName = loadBalancingPolicyClassName;
+ this.connectionLoadBalancingPolicyClassName = loadBalancingPolicyClassName;
}
public synchronized String getDiscoveryAddress()
@@ -916,7 +916,7 @@
if (discoveryGroup != null && !receivedBroadcast)
{
- boolean ok = discoveryGroup.waitForBroadcast(initialWaitTimeout);
+ boolean ok = discoveryGroup.waitForBroadcast(discoveryInitialWaitTimeout);
if (!ok)
{
@@ -952,7 +952,7 @@
private void instantiateLoadBalancingPolicy()
{
- if (loadBalancingPolicyClassName == null)
+ if (connectionLoadBalancingPolicyClassName == null)
{
throw new IllegalStateException("Please specify a load balancing policy class name on the session factory");
}
@@ -960,12 +960,12 @@
ClassLoader loader = Thread.currentThread().getContextClassLoader();
try
{
- Class<?> clazz = loader.loadClass(loadBalancingPolicyClassName);
+ Class<?> clazz = loader.loadClass(connectionLoadBalancingPolicyClassName);
loadBalancingPolicy = (ConnectionLoadBalancingPolicy)clazz.newInstance();
}
catch (Exception e)
{
- throw new IllegalArgumentException("Unable to instantiate load balancing policy \"" + loadBalancingPolicyClassName +
+ throw new IllegalArgumentException("Unable to instantiate load balancing policy \"" + connectionLoadBalancingPolicyClassName +
"\"",
e);
}
Modified: trunk/src/main/org/jboss/messaging/jms/client/JBossConnectionFactory.java
===================================================================
--- trunk/src/main/org/jboss/messaging/jms/client/JBossConnectionFactory.java 2009-05-20 15:21:42 UTC (rev 6938)
+++ trunk/src/main/org/jboss/messaging/jms/client/JBossConnectionFactory.java 2009-05-20 16:17:19 UTC (rev 6939)
@@ -187,14 +187,14 @@
// Public ---------------------------------------------------------------------------------------
- public synchronized String getLoadBalancingPolicyClassName()
+ public synchronized String getConnectionLoadBalancingPolicyClassName()
{
- return sessionFactory.getLoadBalancingPolicyClassName();
+ return sessionFactory.getConnectionLoadBalancingPolicyClassName();
}
- public synchronized void setLoadBalancingPolicyClassName(String connectionLoadBalancingPolicyClassName)
+ public synchronized void setConnectionLoadBalancingPolicyClassName(String connectionLoadBalancingPolicyClassName)
{
- sessionFactory.setLoadBalancingPolicyClassName(connectionLoadBalancingPolicyClassName);
+ sessionFactory.setConnectionLoadBalancingPolicyClassName(connectionLoadBalancingPolicyClassName);
}
public synchronized List<Pair<TransportConfiguration, TransportConfiguration>> getStaticConnectors()
@@ -237,14 +237,14 @@
sessionFactory.setDiscoveryRefreshTimeout(discoveryRefreshTimeout);
}
- public synchronized long getInitialWaitTimeout()
+ public synchronized long getDiscoveryInitialWaitTimeout()
{
- return sessionFactory.getInitialWaitTimeout();
+ return sessionFactory.getDiscoveryInitialWaitTimeout();
}
- public synchronized void setInitialWaitTimeout(long discoveryInitialWaitTimeout)
+ public synchronized void setDiscoveryInitialWaitTimeout(long discoveryInitialWaitTimeout)
{
- sessionFactory.setInitialWaitTimeout(discoveryInitialWaitTimeout);
+ sessionFactory.setDiscoveryInitialWaitTimeout(discoveryInitialWaitTimeout);
}
public synchronized String getClientID()
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-20 15:21:42 UTC (rev 6938)
+++ trunk/src/main/org/jboss/messaging/jms/server/impl/JMSServerDeployer.java 2009-05-20 16:17:19 UTC (rev 6939)
@@ -64,9 +64,9 @@
private static final String BLOCK_ON_ACKNOWLEDGE_ELEMENT = "block-on-acknowledge";
- private static final String SEND_NP_MESSAGES_SYNCHRONOUSLY_ELEMENT = "send-np-messages-synchronously";
+ private static final String BLOCK_ON_NON_PERSISTENT_SEND_ELEMENT = "block-on-non-persistent-send";
- private static final String SEND_P_MESSAGES_SYNCHRONOUSLY_ELEMENT = "send-p-messages-synchronously";
+ private static final String BLOCK_ON_PERSISTENT_SEND_ELEMENT = "block-on-persistent-send";
private static final String AUTO_GROUP_ELEMENT = "auto-group";
@@ -108,7 +108,7 @@
private static final String CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME_ELEMENT = "connection-load-balancing-policy-class-name";
- private static final String DISCOVERY_INITIAL_WAIT_ELEMENT = "discovery-initial-wait";
+ private static final String DISCOVERY_INITIAL_WAIT_TIMEOUT_ELEMENT = "discovery-initial-wait-timeout";
private static final boolean DEFAULT_QUEUE_DURABILITY = true;
@@ -193,7 +193,7 @@
List<Pair<TransportConfiguration, TransportConfiguration>> connectorConfigs = new ArrayList<Pair<TransportConfiguration, TransportConfiguration>>();
DiscoveryGroupConfiguration discoveryGroupConfiguration = null;
String connectionLoadBalancingPolicyClassName = ClientSessionFactoryImpl.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME;
- long discoveryInitialWait = ClientSessionFactoryImpl.DEFAULT_DISCOVERY_INITIAL_WAIT;
+ long discoveryInitialWaitTimeout = ClientSessionFactoryImpl.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT;
for (int j = 0; j < children.getLength(); j++)
{
@@ -247,11 +247,11 @@
{
blockOnAcknowledge = org.jboss.messaging.utils.XMLUtil.parseBoolean(child);
}
- else if (SEND_NP_MESSAGES_SYNCHRONOUSLY_ELEMENT.equals(child.getNodeName()))
+ else if (BLOCK_ON_NON_PERSISTENT_SEND_ELEMENT.equals(child.getNodeName()))
{
blockOnNonPersistentSend = org.jboss.messaging.utils.XMLUtil.parseBoolean(child);
}
- else if (SEND_P_MESSAGES_SYNCHRONOUSLY_ELEMENT.equals(child.getNodeName()))
+ else if (BLOCK_ON_PERSISTENT_SEND_ELEMENT.equals(child.getNodeName()))
{
blockOnPersistentSend = org.jboss.messaging.utils.XMLUtil.parseBoolean(child);
}
@@ -313,9 +313,9 @@
{
connectionLoadBalancingPolicyClassName = child.getTextContent().trim();
}
- else if (DISCOVERY_INITIAL_WAIT_ELEMENT.equals(child.getNodeName()))
+ else if (DISCOVERY_INITIAL_WAIT_TIMEOUT_ELEMENT.equals(child.getNodeName()))
{
- discoveryInitialWait = org.jboss.messaging.utils.XMLUtil.parseInt(child);
+ discoveryInitialWaitTimeout = org.jboss.messaging.utils.XMLUtil.parseInt(child);
}
else if (CONNECTOR_LINK_ELEMENT.equals(child.getNodeName()))
{
@@ -391,7 +391,7 @@
connectionLoadBalancingPolicyClassName,
transactionBatchSize,
dupsOKBatchSize,
- discoveryInitialWait,
+ discoveryInitialWaitTimeout,
useGlobalPools,
scheduledThreadPoolMaxSize,
threadPoolMaxSize,
Modified: trunk/src/main/org/jboss/messaging/jms/server/impl/JMSServerManagerImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/jms/server/impl/JMSServerManagerImpl.java 2009-05-20 15:21:42 UTC (rev 6938)
+++ trunk/src/main/org/jboss/messaging/jms/server/impl/JMSServerManagerImpl.java 2009-05-20 16:17:19 UTC (rev 6939)
@@ -361,7 +361,7 @@
cf.setBlockOnNonPersistentSend(blockOnNonPersistentSend);
cf.setAutoGroup(autoGroup);
cf.setPreAcknowledge(preAcknowledge);
- cf.setLoadBalancingPolicyClassName(loadBalancingPolicyClassName);
+ cf.setConnectionLoadBalancingPolicyClassName(loadBalancingPolicyClassName);
cf.setTransactionBatchSize(transactionBatchSize);
cf.setDupsOKBatchSize(dupsOKBatchSize);
cf.setUseGlobalPools(useGlobalPools);
@@ -429,10 +429,10 @@
cf.setBlockOnNonPersistentSend(blockOnNonPersistentSend);
cf.setAutoGroup(autoGroup);
cf.setPreAcknowledge(preAcknowledge);
- cf.setLoadBalancingPolicyClassName(loadBalancingPolicyClassName);
+ cf.setConnectionLoadBalancingPolicyClassName(loadBalancingPolicyClassName);
cf.setTransactionBatchSize(transactionBatchSize);
cf.setDupsOKBatchSize(dupsOKBatchSize);
- cf.setInitialWaitTimeout(initialWaitTimeout);
+ cf.setDiscoveryInitialWaitTimeout(initialWaitTimeout);
cf.setUseGlobalPools(useGlobalPools);
cf.setScheduledThreadPoolMaxSize(scheduledThreadPoolMaxSize);
cf.setThreadPoolMaxSize(threadPoolMaxSize);
Modified: trunk/src/main/org/jboss/messaging/ra/JBMResourceAdapter.java
===================================================================
--- trunk/src/main/org/jboss/messaging/ra/JBMResourceAdapter.java 2009-05-20 15:21:42 UTC (rev 6938)
+++ trunk/src/main/org/jboss/messaging/ra/JBMResourceAdapter.java 2009-05-20 16:17:19 UTC (rev 6939)
@@ -1316,7 +1316,7 @@
{
if (getLoadBalancingPolicyClassName() != null)
{
- cf.setLoadBalancingPolicyClassName(getLoadBalancingPolicyClassName());
+ cf.setConnectionLoadBalancingPolicyClassName(getLoadBalancingPolicyClassName());
}
if (getPingPeriod() != null)
Modified: trunk/src/main/org/jboss/messaging/utils/XMLUtil.java
===================================================================
--- trunk/src/main/org/jboss/messaging/utils/XMLUtil.java 2009-05-20 15:21:42 UTC (rev 6938)
+++ trunk/src/main/org/jboss/messaging/utils/XMLUtil.java 2009-05-20 16:17:19 UTC (rev 6939)
@@ -496,6 +496,9 @@
public static void validate(Node node, String schemaFile) throws Exception
{
SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
+
+ log.info("** schema file is " + schemaFile);
+
Schema schema = factory.newSchema(Thread.currentThread().getContextClassLoader().getResource(schemaFile));
Validator validator = schema.newValidator();
Modified: trunk/tests/config/jbm-jms-for-JMSServerDeployerTest.xml
===================================================================
--- trunk/tests/config/jbm-jms-for-JMSServerDeployerTest.xml 2009-05-20 15:21:42 UTC (rev 6938)
+++ trunk/tests/config/jbm-jms-for-JMSServerDeployerTest.xml 2009-05-20 16:17:19 UTC (rev 6939)
@@ -21,12 +21,12 @@
<dups-ok-batch-size>3456</dups-ok-batch-size>
<transaction-batch-size>4567</transaction-batch-size>
<block-on-acknowledge>true</block-on-acknowledge>
- <send-np-messages-synchronously>false</send-np-messages-synchronously>
- <send-p-messages-synchronously>true</send-p-messages-synchronously>
+ <block-on-non-persistent-send>false</block-on-non-persistent-send>
+ <block-on-persistent-send>true</block-on-persistent-send>
<auto-group-id>false</auto-group-id>
<pre-acknowledge>true</pre-acknowledge>
<connection-ttl>2345</connection-ttl>
- <discovery-initial-wait>678</discovery-initial-wait>
+ <discovery-initial-wait-timeout>678</discovery-initial-wait-timeout>
<failover-on-server-shutdown>false</failover-on-server-shutdown>
<load-balancing-policy-class-name>FooClass</load-balancing-policy-class-name>
<max-connections>12</max-connections>
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/client/ClientSessionFactoryTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/client/ClientSessionFactoryTest.java 2009-05-20 15:21:42 UTC (rev 6938)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/client/ClientSessionFactoryTest.java 2009-05-20 16:17:19 UTC (rev 6939)
@@ -93,7 +93,7 @@
ClientSessionFactoryImpl.DEFAULT_PRE_ACKNOWLEDGE,
ClientSessionFactoryImpl.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME,
ClientSessionFactoryImpl.DEFAULT_ACK_BATCH_SIZE,
- ClientSessionFactoryImpl.DEFAULT_DISCOVERY_INITIAL_WAIT,
+ ClientSessionFactoryImpl.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT,
ClientSessionFactoryImpl.DEFAULT_USE_GLOBAL_POOLS,
ClientSessionFactoryImpl.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE,
ClientSessionFactoryImpl.DEFAULT_THREAD_POOL_MAX_SIZE,
@@ -153,7 +153,7 @@
ClientSessionFactoryImpl.DEFAULT_PRE_ACKNOWLEDGE,
ClientSessionFactoryImpl.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME,
ClientSessionFactoryImpl.DEFAULT_ACK_BATCH_SIZE,
- ClientSessionFactoryImpl.DEFAULT_DISCOVERY_INITIAL_WAIT,
+ ClientSessionFactoryImpl.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT,
ClientSessionFactoryImpl.DEFAULT_USE_GLOBAL_POOLS,
ClientSessionFactoryImpl.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE,
ClientSessionFactoryImpl.DEFAULT_THREAD_POOL_MAX_SIZE,
@@ -204,7 +204,7 @@
ClientSessionFactoryImpl.DEFAULT_PRE_ACKNOWLEDGE,
ClientSessionFactoryImpl.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME,
ClientSessionFactoryImpl.DEFAULT_ACK_BATCH_SIZE,
- ClientSessionFactoryImpl.DEFAULT_DISCOVERY_INITIAL_WAIT,
+ ClientSessionFactoryImpl.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT,
ClientSessionFactoryImpl.DEFAULT_USE_GLOBAL_POOLS,
ClientSessionFactoryImpl.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE,
ClientSessionFactoryImpl.DEFAULT_THREAD_POOL_MAX_SIZE,
@@ -255,7 +255,7 @@
ClientSessionFactoryImpl.DEFAULT_PRE_ACKNOWLEDGE,
ClientSessionFactoryImpl.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME,
ClientSessionFactoryImpl.DEFAULT_ACK_BATCH_SIZE,
- ClientSessionFactoryImpl.DEFAULT_DISCOVERY_INITIAL_WAIT,
+ ClientSessionFactoryImpl.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT,
ClientSessionFactoryImpl.DEFAULT_USE_GLOBAL_POOLS,
ClientSessionFactoryImpl.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE,
ClientSessionFactoryImpl.DEFAULT_THREAD_POOL_MAX_SIZE,
@@ -306,7 +306,7 @@
ClientSessionFactoryImpl.DEFAULT_PRE_ACKNOWLEDGE,
ClientSessionFactoryImpl.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME,
ClientSessionFactoryImpl.DEFAULT_ACK_BATCH_SIZE,
- ClientSessionFactoryImpl.DEFAULT_DISCOVERY_INITIAL_WAIT,
+ ClientSessionFactoryImpl.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT,
ClientSessionFactoryImpl.DEFAULT_USE_GLOBAL_POOLS,
ClientSessionFactoryImpl.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE,
ClientSessionFactoryImpl.DEFAULT_THREAD_POOL_MAX_SIZE,
@@ -380,9 +380,9 @@
cf.setBlockOnNonPersistentSend(blockOnNonPersistentSend);
cf.setAutoGroup(autoGroup);
cf.setPreAcknowledge(preAcknowledge);
- cf.setLoadBalancingPolicyClassName(loadBalancingPolicyClassName);
+ cf.setConnectionLoadBalancingPolicyClassName(loadBalancingPolicyClassName);
cf.setAckBatchSize(ackBatchSize);
- cf.setInitialWaitTimeout(initialWaitTimeout);
+ cf.setDiscoveryInitialWaitTimeout(initialWaitTimeout);
cf.setUseGlobalPools(useGlobalPools);
cf.setScheduledThreadPoolMaxSize(scheduledThreadPoolMaxSize);
cf.setThreadPoolMaxSize(threadPoolMaxSize);
@@ -409,9 +409,9 @@
assertEquals(blockOnNonPersistentSend, cf.isBlockOnNonPersistentSend());
assertEquals(autoGroup, cf.isAutoGroup());
assertEquals(preAcknowledge, cf.isPreAcknowledge());
- assertEquals(loadBalancingPolicyClassName, cf.getLoadBalancingPolicyClassName());
+ assertEquals(loadBalancingPolicyClassName, cf.getConnectionLoadBalancingPolicyClassName());
assertEquals(ackBatchSize, cf.getAckBatchSize());
- assertEquals(initialWaitTimeout, cf.getInitialWaitTimeout());
+ assertEquals(initialWaitTimeout, cf.getDiscoveryInitialWaitTimeout());
assertEquals(useGlobalPools, cf.isUseGlobalPools());
assertEquals(scheduledThreadPoolMaxSize, cf.getScheduledThreadPoolMaxSize());
assertEquals(threadPoolMaxSize, cf.getThreadPoolMaxSize());
@@ -621,7 +621,7 @@
}
try
{
- cf.setLoadBalancingPolicyClassName(loadBalancingPolicyClassName);
+ cf.setConnectionLoadBalancingPolicyClassName(loadBalancingPolicyClassName);
fail("Should throw exception");
}
catch (IllegalStateException e)
@@ -639,7 +639,7 @@
}
try
{
- cf.setInitialWaitTimeout(initialWaitTimeout);
+ cf.setDiscoveryInitialWaitTimeout(initialWaitTimeout);
fail("Should throw exception");
}
catch (IllegalStateException e)
@@ -728,9 +728,9 @@
cf.isBlockOnNonPersistentSend();
cf.isAutoGroup();
cf.isPreAcknowledge();
- cf.getLoadBalancingPolicyClassName();
+ cf.getConnectionLoadBalancingPolicyClassName();
cf.getAckBatchSize();
- cf.getInitialWaitTimeout();
+ cf.getDiscoveryInitialWaitTimeout();
cf.isUseGlobalPools();
cf.getScheduledThreadPoolMaxSize();
cf.getThreadPoolMaxSize();
@@ -802,9 +802,9 @@
assertEquals(cf.isBlockOnNonPersistentSend(), blockOnNonPersistentSend);
assertEquals(cf.isAutoGroup(), autoGroup);
assertEquals(cf.isPreAcknowledge(), preAcknowledge);
- assertEquals(cf.getLoadBalancingPolicyClassName(), loadBalancingPolicyClassName);
+ assertEquals(cf.getConnectionLoadBalancingPolicyClassName(), loadBalancingPolicyClassName);
assertEquals(cf.getAckBatchSize(), ackBatchSize);
- assertEquals(cf.getInitialWaitTimeout(), initialWaitTimeout);
+ assertEquals(cf.getDiscoveryInitialWaitTimeout(), initialWaitTimeout);
assertEquals(cf.isUseGlobalPools(), useGlobalPools);
assertEquals(cf.getScheduledThreadPoolMaxSize(), scheduledThreadPoolMaxSize);
assertEquals(cf.getThreadPoolMaxSize(), threadPoolMaxSize);
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/jms/JBossConnectionFactoryTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/jms/JBossConnectionFactoryTest.java 2009-05-20 15:21:42 UTC (rev 6938)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/jms/JBossConnectionFactoryTest.java 2009-05-20 16:17:19 UTC (rev 6939)
@@ -105,7 +105,7 @@
ClientSessionFactoryImpl.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME,
ClientSessionFactoryImpl.DEFAULT_ACK_BATCH_SIZE,
ClientSessionFactoryImpl.DEFAULT_ACK_BATCH_SIZE,
- ClientSessionFactoryImpl.DEFAULT_DISCOVERY_INITIAL_WAIT,
+ ClientSessionFactoryImpl.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT,
ClientSessionFactoryImpl.DEFAULT_USE_GLOBAL_POOLS,
ClientSessionFactoryImpl.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE,
ClientSessionFactoryImpl.DEFAULT_THREAD_POOL_MAX_SIZE,
@@ -172,7 +172,7 @@
ClientSessionFactoryImpl.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME,
ClientSessionFactoryImpl.DEFAULT_ACK_BATCH_SIZE,
ClientSessionFactoryImpl.DEFAULT_ACK_BATCH_SIZE,
- ClientSessionFactoryImpl.DEFAULT_DISCOVERY_INITIAL_WAIT,
+ ClientSessionFactoryImpl.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT,
ClientSessionFactoryImpl.DEFAULT_USE_GLOBAL_POOLS,
ClientSessionFactoryImpl.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE,
ClientSessionFactoryImpl.DEFAULT_THREAD_POOL_MAX_SIZE,
@@ -220,7 +220,7 @@
ClientSessionFactoryImpl.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME,
ClientSessionFactoryImpl.DEFAULT_ACK_BATCH_SIZE,
ClientSessionFactoryImpl.DEFAULT_ACK_BATCH_SIZE,
- ClientSessionFactoryImpl.DEFAULT_DISCOVERY_INITIAL_WAIT,
+ ClientSessionFactoryImpl.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT,
ClientSessionFactoryImpl.DEFAULT_USE_GLOBAL_POOLS,
ClientSessionFactoryImpl.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE,
ClientSessionFactoryImpl.DEFAULT_THREAD_POOL_MAX_SIZE,
@@ -269,7 +269,7 @@
ClientSessionFactoryImpl.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME,
ClientSessionFactoryImpl.DEFAULT_ACK_BATCH_SIZE,
ClientSessionFactoryImpl.DEFAULT_ACK_BATCH_SIZE,
- ClientSessionFactoryImpl.DEFAULT_DISCOVERY_INITIAL_WAIT,
+ ClientSessionFactoryImpl.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT,
ClientSessionFactoryImpl.DEFAULT_USE_GLOBAL_POOLS,
ClientSessionFactoryImpl.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE,
ClientSessionFactoryImpl.DEFAULT_THREAD_POOL_MAX_SIZE,
@@ -318,7 +318,7 @@
ClientSessionFactoryImpl.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME,
ClientSessionFactoryImpl.DEFAULT_ACK_BATCH_SIZE,
ClientSessionFactoryImpl.DEFAULT_ACK_BATCH_SIZE,
- ClientSessionFactoryImpl.DEFAULT_DISCOVERY_INITIAL_WAIT,
+ ClientSessionFactoryImpl.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT,
ClientSessionFactoryImpl.DEFAULT_USE_GLOBAL_POOLS,
ClientSessionFactoryImpl.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE,
ClientSessionFactoryImpl.DEFAULT_THREAD_POOL_MAX_SIZE,
@@ -390,9 +390,9 @@
cf.setBlockOnNonPersistentSend(blockOnNonPersistentSend);
cf.setAutoGroup(autoGroup);
cf.setPreAcknowledge(preAcknowledge);
- cf.setLoadBalancingPolicyClassName(loadBalancingPolicyClassName);
+ cf.setConnectionLoadBalancingPolicyClassName(loadBalancingPolicyClassName);
cf.setAckBatchSize(ackBatchSize);
- cf.setInitialWaitTimeout(initialWaitTimeout);
+ cf.setDiscoveryInitialWaitTimeout(initialWaitTimeout);
cf.setUseGlobalPools(useGlobalPools);
cf.setScheduledThreadPoolMaxSize(scheduledThreadPoolMaxSize);
cf.setThreadPoolMaxSize(threadPoolMaxSize);
@@ -419,9 +419,9 @@
assertEquals(blockOnNonPersistentSend, cf.isBlockOnNonPersistentSend());
assertEquals(autoGroup, cf.isAutoGroup());
assertEquals(preAcknowledge, cf.isPreAcknowledge());
- assertEquals(loadBalancingPolicyClassName, cf.getLoadBalancingPolicyClassName());
+ assertEquals(loadBalancingPolicyClassName, cf.getConnectionLoadBalancingPolicyClassName());
assertEquals(ackBatchSize, cf.getAckBatchSize());
- assertEquals(initialWaitTimeout, cf.getInitialWaitTimeout());
+ assertEquals(initialWaitTimeout, cf.getDiscoveryInitialWaitTimeout());
assertEquals(useGlobalPools, cf.isUseGlobalPools());
assertEquals(scheduledThreadPoolMaxSize, cf.getScheduledThreadPoolMaxSize());
assertEquals(threadPoolMaxSize, cf.getThreadPoolMaxSize());
@@ -642,7 +642,7 @@
}
try
{
- cf.setLoadBalancingPolicyClassName(loadBalancingPolicyClassName);
+ cf.setConnectionLoadBalancingPolicyClassName(loadBalancingPolicyClassName);
fail("Should throw exception");
}
catch (IllegalStateException e)
@@ -669,7 +669,7 @@
}
try
{
- cf.setInitialWaitTimeout(initialWaitTimeout);
+ cf.setDiscoveryInitialWaitTimeout(initialWaitTimeout);
fail("Should throw exception");
}
catch (IllegalStateException e)
@@ -759,10 +759,10 @@
cf.isBlockOnNonPersistentSend();
cf.isAutoGroup();
cf.isPreAcknowledge();
- cf.getLoadBalancingPolicyClassName();
+ cf.getConnectionLoadBalancingPolicyClassName();
cf.getDupsOKBatchSize();
cf.getTransactionBatchSize();
- cf.getInitialWaitTimeout();
+ cf.getDiscoveryInitialWaitTimeout();
cf.isUseGlobalPools();
cf.getScheduledThreadPoolMaxSize();
cf.getThreadPoolMaxSize();
@@ -837,10 +837,10 @@
assertEquals(cf.isBlockOnNonPersistentSend(), blockOnNonPersistentSend);
assertEquals(cf.isAutoGroup(), autoGroup);
assertEquals(cf.isPreAcknowledge(), preAcknowledge);
- assertEquals(cf.getLoadBalancingPolicyClassName(), loadBalancingPolicyClassName);
+ assertEquals(cf.getConnectionLoadBalancingPolicyClassName(), loadBalancingPolicyClassName);
assertEquals(cf.getDupsOKBatchSize(), dupsOKBatchSize);
assertEquals(cf.getTransactionBatchSize(), transactionBatchSize);
- assertEquals(cf.getInitialWaitTimeout(), initialWaitTimeout);
+ assertEquals(cf.getDiscoveryInitialWaitTimeout(), initialWaitTimeout);
assertEquals(cf.isUseGlobalPools(), useGlobalPools);
assertEquals(cf.getScheduledThreadPoolMaxSize(), scheduledThreadPoolMaxSize);
assertEquals(cf.getThreadPoolMaxSize(), threadPoolMaxSize);
More information about the jboss-cvs-commits
mailing list