[jboss-cvs] JBoss Messaging SVN: r2748 - in trunk: docs/examples/distributed-queue and 4 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Jun 1 07:01:07 EDT 2007
Author: timfox
Date: 2007-06-01 07:01:06 -0400 (Fri, 01 Jun 2007)
New Revision: 2748
Modified:
trunk/docs/examples/bridge/README.html
trunk/docs/examples/distributed-queue/README.html
trunk/docs/examples/distributed-topic/README.html
trunk/docs/examples/ejb3mdb/README.html
trunk/docs/userguide/en/modules/runningexamples.xml
trunk/src/main/org/jboss/jms/server/bridge/Bridge.java
Log:
Updated some examples etc
Modified: trunk/docs/examples/bridge/README.html
===================================================================
--- trunk/docs/examples/bridge/README.html 2007-06-01 09:16:18 UTC (rev 2747)
+++ trunk/docs/examples/bridge/README.html 2007-06-01 11:01:06 UTC (rev 2748)
@@ -11,12 +11,12 @@
$Revision: 2310 $
<h2>Overview</h2>
<br>
-This example deploys a message bridge in JBAS, which is configured to
+This example deploys a message bridge in JBoss AS, which is configured to
move messages from one destination to another.
<br>
The example then sends some message to the source destination, then consumes the
same messages from the target destionation, demonstrating that the bridge has
-successfully moved the messages from the source to the target
+successfully moved the messages from the source to the target.
<br>
The example is somewhat artificial in that normally a bridge would be used to move messages
from source and target destinations on different servers, but it serves to illustrate how to
@@ -24,25 +24,21 @@
<br>
This example relies on having access to a running JBoss Messaging
instance.
-The JBoss Messaging instance must be installed and started according to
-the
-"Installation" paragraph from the release documentation. However, the
-example will automatically deploy its own queues, unless queues with
-the same name is already deployed. <br>
+The JBoss Messaging instance must be installed according to the userguide.<br>
<span style="font-style: italic;"></span>
<h2>Running the example</h2>
1. Set up the JBOSS_HOME environment variable to point to the JBoss
instance you deployed JBoss Messaging into. For example, if you
-deployed JBoss Messaging in <span style="font-family: monospace;">C:\jboss-4.0.3SP1\server\messaging\deploy,</span>
+deployed JBoss Messaging in <span style="font-family: monospace;">C:\jboss-4.2.0.GA\server\messaging\deploy,</span>
then your JBOSS_HOME value should be <span
style="font-family: monospace;">C:\</span><span
- style="font-family: monospace;">jboss-4.0.3SP1</span><br>
+ style="font-family: monospace;">jboss-4.2.0.GA</span><br>
<span style="font-family: monospace;"></span><span
style="font-family: monospace;"></span><br>
2. Go to the example's home directory<br>
<br>
<div style="margin-left: 40px;"><span style="font-family: monospace;">cd
-...\examples\queue</span><br>
+...\examples\bridge</span><br>
</div>
<br>
3. Run the example:<br>
@@ -63,52 +59,30 @@
<td style="vertical-align: top;">
<div style="margin-left: 40px;"><br>
</div>
-$ ant<br>
+
+[tim at Vigor14 bridge]$ ant<br>
Buildfile: build.xml<br>
- <br>
+<br>
identify:<br>
- [echo]
-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br>
- [echo]
-X
-Running the QUEUE
-example
-X<br>
- [echo]
-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br>
- [echo] The queue: testQueue<br>
- <br>
+ [echo] ###########################################################################<br>
+ [echo] # Running the BRIDGE example #<br>
+ [echo] ###########################################################################
+ [echo] The queue: ${example.queue.name}<br>
+ [echo] The client jar: ../../../output/lib/jboss-messaging-client.jar<br>
+<br>
sanity-check:<br>
- <br>
+<br>
init:<br>
- [mkdir] Created dir:
-C:\work\src\cvs\jboss-head\jms\docs\examples\queue\output<br>
- [mkdir] Created dir:
-C:\work\src\cvs\jboss-head\jms\docs\examples\common\output<br>
- <br>
+ [mkdir] Created dir: /home/tim/dev/jboss-messaging/trunk/docs/examples/bridge/output/classes<br>
+ [mkdir] Created dir: /home/tim/dev/jboss-messaging/trunk/docs/examples/common/output/classes<br>
+<br>
compile:<br>
- [javac] Compiling 2 source files to
-C:\work\src\cvs\jboss-head\jms\docs\examples\common\output<br>
- [javac] Compiling 1 source file to
-C:\work\src\cvs\jboss-head\jms\docs\examples\queue\output<br>
- <br>
-run:<br>
- [java] Queue /queue/testQueue exists<br>
- [java] The message was successfully sent to
-the testQueue queue<br>
- [java] Received message: Hello!<br>
- [java] The example connected to JBoss
-Messaging version 1.0.1.GA (1.0)<br>
- <br>
- [java] #####################<br>
- [java] ###
-SUCCESS! ###<br>
- [java] #####################<br>
- <br>
-BUILD SUCCESSFUL<br>
-Total time: 5 seconds<br>
- <br>
- <br>
+ [javac] Compiling 5 source files to /home/tim/dev/jboss-messaging/trunk/docs/examples/common/output/classes<br>
+ [javac] Compiling 1 source file to /home/tim/dev/jboss-messaging/trunk/docs/examples/bridge/output/classes>br>
+<br>
+deploy:<br>
+ [copy] Copying 1 file to /home/tim/dev/jboss-4.2.0.GA/server/messaging/deploy<br>
+<br>sleep:<br> [echo] Sleeping for 5 seconds ...<br><br>run:<br> [java] Queue JBossQueue[A] exists<br> [java] Queue JBossQueue[B] exists<br> [java] The message was successfully sent to the A queue<br> [java] The message was successfully sent to the A queue<br> [java] The message was successfully sent to the A queue<br> [java] The message was successfully sent to the A queue<br> [java] The message was successfully sent to the A queue<br> [java] The message was successfully sent to the A queue<br> [java] The message was successfully sent to the A queue<br> [java] The message was successfully sent to the A queue<br> [java] The message was successfully sent to the A queue<br> [java] The message was successfully sent to the A queue<br> [java] The message was received successfully from the B queue<br> [java] The message was received successfully from the B queue<br> [java] The message was received successfully from t!
he B queue<br> [java] The message was received successfully from the B queue<br> [java] The message was received successfully from the B queue<br> [java] The message was received successfully from the B queue<br> [java] The message was received successfully from the B queue<br> [java] The message was received successfully from the B queue<br> [java] The message was received successfully from the B queue<br> [java] The message was received successfully from the B queue<br> [java] The example connected to JBoss Messaging version 1.3.0.GA (1.3)<br><br> [java] #####################<br> [java] ### SUCCESS! ###<br> [java] #####################<br><br>undeploy:<br> [delete] Deleting: /home/tim/dev/jboss-4.2.0.GA/server/messaging/deploy/test-bridge-service.xml<br><br>BUILD SUCCESSFUL<br>Total time: 9 seconds<br><br>
</td>
</tr>
</tbody>
Modified: trunk/docs/examples/distributed-queue/README.html
===================================================================
--- trunk/docs/examples/distributed-queue/README.html 2007-06-01 09:16:18 UTC (rev 2747)
+++ trunk/docs/examples/distributed-queue/README.html 2007-06-01 11:01:06 UTC (rev 2748)
@@ -32,24 +32,9 @@
<br>
This example relies on having access to a running JBoss Messaging
cluster with at least two nodes. The JBoss Messaging cluster must be
-installed and started according to
-the
-"Installation" paragraph from the clustering documentation, bundled
-with the release (<a href="../../docs/clustering/html/index.html">HTML</a>,
-<a href="../../docs/clustering/html_single/index.html">HTML-single</a>
-and <a href="../../docs/clustering/pdf/ClusteringGuide.pdf">PDF</a>).
-The
-clustering documentation is also available on-line at <a
- href="http://labs.jboss.com/portal/jbossmessaging/docs/index.html">http://labs.jboss.com/portal/jbossmessaging/docs/index.html</a>.
+installed and started according to the user guide.
<br>
<br>
-This example also relies on having access to the <span
- style="font-family: monospace;">jboss-messaging-client.jar</span>
-archive included with the release bundle. If you run this example
-from
-an unzipped installation bundle, the example run script is correctly
-configured to find the client jar. Otherwise, you must modify example's
-<span style="font-family: monospace;">build.xml</span> accordingly.<br>
<span style="font-style: italic;"></span><br>
<h2>Running the example</h2>
<span style="font-family: monospace;"></span><span
@@ -123,7 +108,7 @@
[java] MessageListener1 received message:
Another Hello!<br>
[java] The example connected to JBoss
-Messaging version 1.2.0.GA (1.2)<br>
+Messaging version 1.3.0.GA (1.3)<br>
<br>
[java] #####################<br>
[java] ###
Modified: trunk/docs/examples/distributed-topic/README.html
===================================================================
--- trunk/docs/examples/distributed-topic/README.html 2007-06-01 09:16:18 UTC (rev 2747)
+++ trunk/docs/examples/distributed-topic/README.html 2007-06-01 11:01:06 UTC (rev 2748)
@@ -3,7 +3,7 @@
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
- <title>JBoss Messaging Example - JMS Topic</title>
+ <title>JBoss Messaging Example - JMS Distributed Topic</title>
</head>
<body>
<br>
@@ -21,24 +21,8 @@
<br>
This example relies on having access to a running JBoss Messaging
cluster with at least two nodes. The JBoss Messaging cluster must be
-installed and started according to
-the
-"Installation" paragraph from the clustering documentation, bundled
-with the release (<a href="../../docs/clustering/html/index.html">HTML</a>,
-<a href="../../docs/clustering/html_single/index.html">HTML-single</a>
-and <a href="../../docs/clustering/pdf/ClusteringGuide.pdf">PDF</a>).
-The
-clustering documentation is also available on-line at <a
- href="http://labs.jboss.com/portal/jbossmessaging/docs/index.html">http://labs.jboss.com/portal/jbossmessaging/docs/index.html</a>.
+installed and started according to the userguide.
<br>
-<br>
-This example also relies on having access to the <span
- style="font-family: monospace;">jboss-messaging-client.jar</span>
-archive included with the release bundle. If you run this example
-from
-an unzipped installation bundle, the example run script is correctly
-configured to find the client jar. Otherwise, you must modify example's
-<span style="font-family: monospace;">build.xml</span> accordingly.<br>
<span style="font-style: italic;"></span><br>
<h2>Running the example</h2>
<span style="font-family: monospace;"></span><span
@@ -112,7 +96,7 @@
[java] MessageListener 2 received message:
Hello!<br>
[java] The example connected to JBoss
-Messaging version 1.2.0.Beta1 (1.2)<br>
+Messaging version 1.3.0.GA (1.3)<br>
<br>
[java] #####################<br>
[java] ###
Modified: trunk/docs/examples/ejb3mdb/README.html
===================================================================
--- trunk/docs/examples/ejb3mdb/README.html 2007-06-01 09:16:18 UTC (rev 2747)
+++ trunk/docs/examples/ejb3mdb/README.html 2007-06-01 11:01:06 UTC (rev 2748)
@@ -3,7 +3,7 @@
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
- <title>JBoss Messaging Example - Message Driven Bean</title>
+ <title>JBoss Messaging Example - EJB3 Message Driven Bean</title>
</head>
<body>
<br>
@@ -18,89 +18,14 @@
example is considered successful if the sender receives the
acknowledgment message.<br>
<br>
-This example relies on having access to a running JBoss Messaging
-instance. <span style="font-style: italic;"></span>The JBoss Messaging
-instance must
-be installed and started according to the
-"Installation" paragraph from the release documentation. However,
-the example will automatically deploy its own queue, unless a queue
-with the same name is already deployed. <br>
-<br>
-This example also relies on having access to <span
- style="font-family: monospace;">jboss-messaging-client.jar</span>
-archive that comes with the release bundle. If you run this example
-from
-an unzipped installation bundle, the example run script is correctly
-configured to find the client jar. Otherwise, you must modify example's
-<span style="font-family: monospace;">build.xml</span>
-accordingly. <br>
-<br>
-<span style="font-style: italic;">The example was designed to deploy
-its server-side artifacts </span><span
- style="font-family: monospace; font-style: italic;"></span><span
- style="font-style: italic;">under a JBoss' </span><span
- style="font-family: monospace; font-style: italic;">messaging</span><span
- style="font-style: italic;">
-configuration. If you intend to use the script with a JBoss
-configuration that is named differently, please modify the
-example's</span><span
- style="font-family: monospace; font-style: italic;"> build.xml</span><span
- style="font-style: italic;">
-accordingly.</span><br>
-<br>
-<span style="font-weight: bold;">Important!</span><span
- style="font-style: italic;"> </span>The JBoss instance that runs the
-Messaging server must also have EJB3 support previously installed. If
-the EJB3 support is not installed, the example will fail with an error
-message similar to:<br>
-<br>
-<div style="text-align: center;"><br>
-</div>
-<table
- style="width: 90%; text-align: left; margin-left: auto; margin-right: auto; background-color: rgb(204, 204, 204);"
- border="1" cellpadding="2" cellspacing="2">
- <tbody>
- <tr>
- <td style="vertical-align: top;">
- <div
- style="margin-left: 40px; background-color: rgb(204, 204, 204);">
- <div style="text-align: center; margin-left: 40px;"><span
- style="font-family: monospace;"></span><br>
- <span style="font-family: monospace;"></span></div>
- <span style="font-family: monospace;"><br>
-C:\work\src\cvs\jboss-head\jms\docs\examples\ejb3mdb\build.xml:60: EJB3
-does not seem to be installed in
-C:\work\src\jboss-4.0.3-src\build\output\jboss-4.0.3/server/messaging! </span><span
- style="font-family: monospace;">Install it and try again.</span></div>
- <span style="font-family: monospace;"> </span><br>
- <div style="text-align: center;"><br>
- </div>
- </td>
- </tr>
- </tbody>
-</table>
-<div style="text-align: center;"><br>
-<span style="font-weight: bold;"></span><br>
-</div>
-For instructions on how to install EJB3 support, please go to <a
- href="http://docs.jboss.org/ejb3/">http://docs.jboss.org/ejb3/</a> or
-use the JBoss Installer.<br>
-<br>
-<span style="font-weight: bold;">Note</span>: The current example was
-tested with <span class="tdwn">the EJB3 release bundled with JBoss
-4.0.5. Earlier </span>EJB3 versions may use slightly different APIs
-that may break
-the example. If this is the case, please modify the example
-accordingly. Most likely, you will only need to modify the import fully
-qualified class names.<br>
<span style="font-style: italic;"></span><br>
<h2>Running the example</h2>
1. Set up the JBOSS_HOME environment variable to point to the JBoss
instance you deployed JBoss Messaging into. For example, if you
-deployed JBoss Messaging in <span style="font-family: monospace;">C:\jboss-4.0.3SP1\server\default\deploy,</span>
+deployed JBoss Messaging in <span style="font-family: monospace;">C:\jboss-4.2.0.GA\server\default\deploy</span>
then your JBOSS_HOME value should be <span
style="font-family: monospace;">C:\</span><span
- style="font-family: monospace;">jboss-4.0.3SP1.</span><br>
+ style="font-family: monospace;">jboss-4.2.0.GA</span><br>
<span style="font-family: monospace;"><br>
</span><br>
2. Go to the example's home directory<br>
@@ -177,7 +102,7 @@
sent to the testQueue queue<br>
[java] Received message: !olleH<br>
[java] The example connected to JBoss
-Messaging version 1.0.1.GA (1.0)<br>
+Messaging version 1.3.0.GA (1.3)<br>
<br>
[java] #####################<br>
[java] ###
@@ -186,7 +111,7 @@
<br>
undeploy:<br>
[delete] Deleting:
-C:\work\src\jboss-4.0.3SP1-src\build\output\jboss-4.0.3SP1\server\messaging\deploy\mdb-example.ejb3<br>
+C:\work\src\jboss-4.2.0.GA\build\output\jboss-4.0.3SP1\server\messaging\deploy\mdb-example.ejb3<br>
<br>
BUILD SUCCESSFUL<br>
Total time: 10 seconds<br>
@@ -196,16 +121,8 @@
</tbody>
</table>
<br>
-<h2>Troublesooting</h2>
+<h2>Troubleshooting</h2>
<br>
-<h3>1. While compiling the example I get </h3>
-<tt>C:\work\src\cvs\jboss-head\jms\docs\examples\ejb3mdb\src\org\jboss\examples\jms\ejb3mdb\EJB3MDBExample.java:29:
-illegal character: \64<br>
- at MessageDriven(activateConfig =<br>
-^<br>
-<br>
-</tt>You're compiling with Java 4. You need to use Java 5 in order to
-be able to compile and take advantage of annotations.<br>
<h3>2. I get <span style="font-family: monospace;">"javax.jms.JMSSecurityException:
User null is NOT authenticated" <br>
</span></h3>
Modified: trunk/docs/userguide/en/modules/runningexamples.xml
===================================================================
--- trunk/docs/userguide/en/modules/runningexamples.xml 2007-06-01 09:16:18 UTC (rev 2747)
+++ trunk/docs/userguide/en/modules/runningexamples.xml 2007-06-01 11:01:06 UTC (rev 2748)
@@ -71,7 +71,13 @@
<para>This example demonstrates a JMS client interacting with clustered EJB2.1
stateless session bean, which in turn interactes with JBoss Messaging.
The example uses HAJNDI to lookup the connection factory</para>
- </listitem>
+ </listitem>
+
+ <listitem>
+ <para>docs/example/bridge</para>
+ <para>This example demonstrates using a message bridge. It deploys a message bridge in JBoss AS which then
+proceeds to move messages from a source to a target queue</para>
+ </listitem>
</itemizedlist>
</para>
Modified: trunk/src/main/org/jboss/jms/server/bridge/Bridge.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/bridge/Bridge.java 2007-06-01 09:16:18 UTC (rev 2747)
+++ trunk/src/main/org/jboss/jms/server/bridge/Bridge.java 2007-06-01 11:01:06 UTC (rev 2748)
@@ -713,11 +713,11 @@
{
throw new IllegalArgumentException("If failureRetryInterval == -1 maxRetries must be 0");
}
- if (maxBatchSize < 1)
+ if (!(maxBatchSize >= 1))
{
throw new IllegalArgumentException("maxBatchSize must be >= 1");
}
- if (maxBatchTime < 1 && maxBatchTime != -1)
+ if (!(maxBatchTime == -1 || maxBatchTime >=1))
{
throw new IllegalArgumentException("maxBatchTime must be >= 1 or -1 to represent unlimited batch time");
}
More information about the jboss-cvs-commits
mailing list