[jboss-cvs] JBoss Messaging SVN: r2229 - in branches/Branch_1_0_1_SP: docs/examples/mdb-failure and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Feb 9 00:54:20 EST 2007


Author: ovidiu.feodorov at jboss.com
Date: 2007-02-09 00:54:19 -0500 (Fri, 09 Feb 2007)
New Revision: 2229

Modified:
   branches/Branch_1_0_1_SP/build-messaging.xml
   branches/Branch_1_0_1_SP/docs/examples/mdb-failure/README.html
   branches/Branch_1_0_1_SP/tests/smoke/build.xml
Log:
MDB Failure Example.
http://jira.jboss.org/jira/browse/JBMESSAGING-755
http://jira.jboss.org/jira/browse/JBMESSAGING-756


Modified: branches/Branch_1_0_1_SP/build-messaging.xml
===================================================================
--- branches/Branch_1_0_1_SP/build-messaging.xml	2007-02-09 02:43:52 UTC (rev 2228)
+++ branches/Branch_1_0_1_SP/build-messaging.xml	2007-02-09 05:54:19 UTC (rev 2229)
@@ -723,6 +723,7 @@
       <ant dir="./docs/examples/queue" antfile="build.xml" inheritAll="false" target="clean"/>
       <ant dir="./docs/examples/topic" antfile="build.xml" inheritAll="false" target="clean"/>
       <ant dir="./docs/examples/mdb" antfile="build.xml" inheritAll="false" target="clean"/>
+      <ant dir="./docs/examples/mdb-failure" antfile="build.xml" inheritAll="false" target="clean"/>
       <ant dir="./docs/examples/stateless" antfile="build.xml" inheritAll="false" target="clean"/>
       <ant dir="./docs/examples/ejb3mdb" antfile="build.xml" inheritAll="false" target="clean"/>
       <ant dir="./docs/examples/secure-socket" antfile="build.xml" inheritAll="false" target="clean"/>

Modified: branches/Branch_1_0_1_SP/docs/examples/mdb-failure/README.html
===================================================================
--- branches/Branch_1_0_1_SP/docs/examples/mdb-failure/README.html	2007-02-09 02:43:52 UTC (rev 2228)
+++ branches/Branch_1_0_1_SP/docs/examples/mdb-failure/README.html	2007-02-09 05:54:19 UTC (rev 2229)
@@ -3,20 +3,31 @@
 <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 - Message Driven Bean Failure</title>
 </head>
 <body>
 <br>
-<h1>JBoss Messaging Message Driven Bean Example</h1>
+<h1>Message Driven Bean Behavior on Failure Example</h1>
 $Revision: 1459 $
 <h2>Overview</h2>
 <br>
 This example deploys a simple Message Driven Bean that processes
-messages sent to a test queue.&nbsp; Once it receives a message and
-"processes" it, the MDB sends an acknowledgment message to a&nbsp;
-temporary destination created by the sender for this purpose. The
+messages sent to a test queue. The Message Driven Bean is coded in such
+a way that upon the first arrival of a message, it throws a
+RuntimeException, simulating a runtime processing failure. <br>
+<br>
+The expected behavior of the MDB Container is to try to redeliver the
+message, which is what it hopefully does. Since the example framework
+took the precaution to insure that there is only one single type of MDB
+container listening on the example queue, the messages will be
+redelivered to an MDB of the same type. Upon the second arrival, the
+MDB
+instance will "let the message pass", will correctly "process" it and
+forward the result to temporary queue created by the sender for exactly
+this purpose. The
 example is considered&nbsp; successful if the sender receives the
-acknowledgment message.<br>
+acknowledgment message. The successful example proves that message
+redelivery on failure works.<br>
 <br>
 This example relies on having access to a running JBoss Messaging
 instance.
@@ -46,7 +57,7 @@
 example's</span><span
  style="font-family: monospace; font-style: italic;"> build.xml</span><span
  style="font-style: italic;">
-accordingly.</span><br>
+accordingly.</span><span style="font-style: italic;"></span><br>
 <br>
 <h2>Running the example</h2>
 1. Set up the JBOSS_HOME environment variable to point to the JBoss
@@ -59,7 +70,7 @@
 2. Go to the example's home directory<br>
 <br>
 <div style="margin-left: 40px;"><span style="font-family: monospace;">cd
-...\examples\mdb</span><br>
+...\examples\mdb-failure</span><br>
 </div>
 <br>
 3. Run the example:<br>
@@ -85,41 +96,44 @@
       <br>
 identify:<br>
 &nbsp;&nbsp;&nbsp;&nbsp; [echo]
-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br>
+###########################################################################<br>
 &nbsp;&nbsp;&nbsp;&nbsp; [echo]
-X&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-Running the MDB
-example&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-X<br>
+#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+Running the MDB Failure
+example&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+#<br>
 &nbsp;&nbsp;&nbsp;&nbsp; [echo]
-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br>
-&nbsp;&nbsp;&nbsp;&nbsp; [echo] The queue: testQueue<br>
+###########################################################################<br>
+&nbsp;&nbsp;&nbsp;&nbsp; [echo] The
+queue:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; testQueue<br>
+&nbsp;&nbsp;&nbsp;&nbsp; [echo] The client jar:
+../../../output/lib/jboss-messaging-client.jar<br>
       <br>
 sanity-check:<br>
       <br>
 init:<br>
 &nbsp;&nbsp;&nbsp; [mkdir] Created dir:
-C:\work\src\cvs\jboss-head\jms\docs\examples\mdb\output\classes\META-INF<br>
+C:\work\src\svn\messaging-Branch_1_0_1_SP\docs\examples\mdb-failure\output\classes\META-INF<br>
 &nbsp;&nbsp;&nbsp; [mkdir] Created dir:
-C:\work\src\cvs\jboss-head\jms\docs\examples\mdb\output\lib\META-INF<br>
+C:\work\src\svn\messaging-Branch_1_0_1_SP\docs\examples\mdb-failure\output\lib\META-INF<br>
 &nbsp;&nbsp;&nbsp; [mkdir] Created dir:
-C:\work\src\cvs\jboss-head\jms\docs\examples\common\output<br>
+C:\work\src\svn\messaging-Branch_1_0_1_SP\docs\examples\common\output<br>
       <br>
 compile:<br>
 &nbsp;&nbsp;&nbsp; [javac] Compiling 2 source files to
-C:\work\src\cvs\jboss-head\jms\docs\examples\common\output<br>
+C:\work\src\svn\messaging-Branch_1_0_1_SP\docs\examples\common\output<br>
 &nbsp;&nbsp;&nbsp; [javac] Compiling 2 source files to
-C:\work\src\cvs\jboss-head\jms\docs\examples\mdb\output\classes<br>
+C:\work\src\svn\messaging-Branch_1_0_1_SP\docs\examples\mdb-failure\output\classes<br>
       <br>
 jar:<br>
 &nbsp;&nbsp;&nbsp;&nbsp; [copy] Copying 2 files to
-C:\work\src\cvs\jboss-head\jms\docs\examples\mdb\output\classes\META-INF<br>
+C:\work\src\svn\messaging-Branch_1_0_1_SP\docs\examples\mdb-failure\output\classes\META-INF<br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [jar] Building jar:
-C:\work\src\cvs\jboss-head\jms\docs\examples\mdb\output\lib\mdb-example.jar<br>
+C:\work\src\svn\messaging-Branch_1_0_1_SP\docs\examples\mdb-failure\output\lib\mdb-failure-example.jar<br>
       <br>
 deploy:<br>
 &nbsp;&nbsp;&nbsp;&nbsp; [copy] Copying 1 file to
-C:\work\src\jboss-4.0.3SP1-src\build\output\jboss-4.0.3SP1\server\messaging\deploy<br>
+C:\work\src\jboss-4.0.5.GA-src\build\output\jboss-4.0.5.GA\server\messaging\deploy<br>
       <br>
 sleep:<br>
 &nbsp;&nbsp;&nbsp;&nbsp; [echo] Sleeping for 5 seconds ...<br>
@@ -128,11 +142,11 @@
       <br>
 send:<br>
 &nbsp;&nbsp;&nbsp;&nbsp; [java] Queue /queue/testQueue exists<br>
-&nbsp;&nbsp;&nbsp;&nbsp; [java] The Hello! message was successfully
+&nbsp;&nbsp;&nbsp;&nbsp; [java] The "Hello!" message was successfully
 sent to the testQueue queue<br>
 &nbsp;&nbsp;&nbsp;&nbsp; [java] Received message: !olleH<br>
 &nbsp;&nbsp;&nbsp;&nbsp; [java] The example connected to JBoss
-Messaging version 1.0.1.GA (1.0)<br>
+Messaging version 1.0.1.SP4 (1.0)<br>
       <br>
 &nbsp;&nbsp;&nbsp;&nbsp; [java] #####################<br>
 &nbsp;&nbsp;&nbsp;&nbsp; [java] ###&nbsp;&nbsp;&nbsp;
@@ -141,125 +155,19 @@
       <br>
 undeploy:<br>
 &nbsp;&nbsp; [delete] Deleting:
-C:\work\src\jboss-4.0.3SP1-src\build\output\jboss-4.0.3SP1\server\messaging\deploy\mdb-example.jar<br>
+C:\work\src\jboss-4.0.5.GA-src\build\output\jboss-4.0.5.GA\server\messaging\deploy\mdb-failure-example.jar<br>
       <br>
 BUILD SUCCESSFUL<br>
-Total time: 10 seconds<br>
+Total time: 9 seconds<br>
       <br>
       <br>
+      <br>
       </td>
     </tr>
   </tbody>
 </table>
 <br>
-<h2>Troublesooting</h2>
-<h3>1. I get <span style="font-family: monospace;">"javax.jms.JMSSecurityException:
-User null is NOT authenticated" <br>
-</span></h3>
-You probably didn't install JBoss Messaging correctly. A fresh JBoss
-Messaging installation requires changes in the security configuration
-of a <span style="font-family: monospace;">default </span>JBoss
-instance, specifically a properly configured "<small><span
- style="font-family: courier new,courier,monospace;">messaging</span></small>"
-security domain.&nbsp; Follow the instructions from the "Installation"
-paragraph of the release documentation. <br>
-<br>
-<big><span style="font-weight: bold;">2. The example fails with <small>"<span
- style="font-family: courier new,courier,monospace;">Have not received
-any reply. The example failed!</span>"</small> and the server log
-contains ClassNotFoundExceptions</span></big><br>
-<br>
-If all you get after running the example is<br>
-<br>
-<small><span style="font-family: courier new,courier,monospace;">send:</span><br
- style="font-family: courier new,courier,monospace;">
-<span style="font-family: courier new,courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;
-[java] Queue /queue/SmokeTestQueue exists</span><br
- style="font-family: courier new,courier,monospace;">
-<span style="font-family: courier new,courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;
-[java] The Hello! message was successfully sent to the SmokeTestQueue
-queue</span><br style="font-family: courier new,courier,monospace;">
-<span style="font-family: courier new,courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;
-[java] java.lang.Exception: Have not received any reply. The example
-failed!</span><br style="font-family: courier new,courier,monospace;">
-<span style="font-family: courier new,courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;
-[java]&nbsp;&nbsp;&nbsp;&nbsp; at
-org.jboss.example.jms.mdb.Sender.example(Sender.java:102)</span><br
- style="font-family: courier new,courier,monospace;">
-<span style="font-family: courier new,courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;
-[java]&nbsp;&nbsp;&nbsp;&nbsp; at
-org.jboss.example.jms.common.ExampleSupport.run(ExampleSupport.java:58)</span><br
- style="font-family: courier new,courier,monospace;">
-<span style="font-family: courier new,courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;
-[java]&nbsp;&nbsp;&nbsp;&nbsp; at
-org.jboss.example.jms.mdb.Sender.main(Sender.java:131)</span><br
- style="font-family: courier new,courier,monospace;">
 <br style="font-family: courier new,courier,monospace;">
-<span style="font-family: courier new,courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;
-[java] #####################</span><br
- style="font-family: courier new,courier,monospace;">
-<span style="font-family: courier new,courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;
-[java] ###&nbsp;&nbsp;&nbsp; FAILURE!&nbsp;&nbsp; ###</span><br
- style="font-family: courier new,courier,monospace;">
-<span style="font-family: courier new,courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;
-[java] #####################</span></small><br
- style="font-family: courier new,courier,monospace;">
-<br style="font-family: courier new,courier,monospace;">
-check the server log. The presence of <br>
-<small><br style="font-family: courier new,courier,monospace;">
-<span style="font-family: courier new,courier,monospace;">2006-04-11
-17:14:58,370 DEBUG [org.jboss.ejb.plugins.jms.DLQHandler]
-Initialization failed DLQHandler</span><br
- style="font-family: courier new,courier,monospace;">
-<span style="font-family: courier new,courier,monospace;">javax.naming.CommunicationException
-[<span style="font-weight: bold;">Root exception is
-java.lang.ClassNotFoundException: No ClassLoaders found for:
-org.jboss.jms.client.JBossConnectionFactory</span> (no security manager</span><span
- style="font-family: courier new,courier,monospace;">: RMI class loader
-disabled)]</span><br style="font-family: courier new,courier,monospace;">
-<span style="font-family: courier new,courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:713)</span><br
- style="font-family: courier new,courier,monospace;">
-<span style="font-family: courier new,courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)</span><br
- style="font-family: courier new,courier,monospace;">
-<span style="font-family: courier new,courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-at javax.naming.InitialContext.lookup(InitialContext.java:347)</span><br
- style="font-family: courier new,courier,monospace;">
-<span style="font-family: courier new,courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-at
-org.jboss.ejb.plugins.jms.DLQHandler.createService(DLQHandler.java:151)</span><br
- style="font-family: courier new,courier,monospace;">
-<span style="font-family: courier new,courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-at
-org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:245)</span><br
- style="font-family: courier new,courier,monospace;">
-<span style="font-family: courier new,courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-at
-org.jboss.system.ServiceMBeanSupport.create(ServiceMBeanSupport.java:173)</span><br
- style="font-family: courier new,courier,monospace;">
-<span style="font-family: courier new,courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-...<br>
-<span style="font-family: times new roman,times,serif;"><br>
-<big>means that your Naming service was configured with a CallByValue
-semantics. There are two solutions for this situation:<br>
-</big></span></span></small><br>
-1) Enable JNDI call by reference semantics.<br>
-<br>
-<div style="margin-left: 40px;">To do that, modify the Naming (JNDI)
-service configuration and set its "CallByValue" attribute to "false".<br>
-<br>
-The Naming configuration file is <small><span
- style="font-family: courier new,courier,monospace;">$JBOSS_HOME/server/default/deploy/naming-service.xml</span></small>
-for an installer-generated JBoss configuration and <small><span
- style="font-family: courier new,courier,monospace;">$JBOSS_HOME/server/conf/jboss-service.xml
-</span></small>(the JNDI section, search for "jboss:service=Naming")
-for a raw installation.<br>
-</div>
-<br>
-2) In case you don't want to change JNDI CallByValue semantics, deploy
-the MDB in the same class loading domain as the Messaging server.<br>
-<br style="font-family: courier new,courier,monospace;">
 <hr
  style="width: 100%; height: 2px; font-family: courier new,courier,monospace;"><br>
 <br>

Modified: branches/Branch_1_0_1_SP/tests/smoke/build.xml
===================================================================
--- branches/Branch_1_0_1_SP/tests/smoke/build.xml	2007-02-09 02:43:52 UTC (rev 2228)
+++ branches/Branch_1_0_1_SP/tests/smoke/build.xml	2007-02-09 05:54:19 UTC (rev 2229)
@@ -25,6 +25,7 @@
    <property name="run.queue.example" value="true"/>
    <property name="run.topic.example" value="true"/>
    <property name="run.mdb.example" value="true"/>
+   <property name="run.mdb-failure.example" value="true"/>
    <property name="run.stateless.example" value="true"/>
    <property name="run.ejb3mdb.example" value="false"/>
    <property name="run.secure-socket.example" value="true"/>
@@ -121,6 +122,7 @@
          <param name="jboss.home" value="${jboss403SP1.home}"/>
          <param name="release.admin.target" value="standalone"/>
          <param name="run.mdb.example" value="false"/>
+         <param name="run.mdb-failure.example" value="false"/>
          <param name="run.stateless.example" value="false"/>
          <param name="run.secure-socket.example" value="false"/>
       </antcall>
@@ -141,6 +143,7 @@
          <param name="jboss.home" value="${jboss404GA.home}"/>
          <param name="release.admin.target" value="standalone"/>
          <param name="run.mdb.example" value="false"/>
+         <param name="run.mdb-failure.example" value="false"/>
          <param name="run.stateless.example" value="false"/>
          <param name="run.secure-socket.example" value="false"/>
       </antcall>
@@ -161,6 +164,7 @@
          <param name="jboss.home" value="${jboss405GA.home}"/>
          <param name="release.admin.target" value="standalone"/>
          <param name="run.mdb.example" value="false"/>
+         <param name="run.mdb-failure.example" value="false"/>
          <param name="run.stateless.example" value="false"/>
          <param name="run.secure-socket.example" value="false"/>
       </antcall>
@@ -315,6 +319,12 @@
       </antcall>
 
       <antcall target="run-example">
+         <param name="example.name" value="mdb-failure"/>
+         <param name="example.queue.name" value="SmokeTestQueue"/>
+         <param name="jboss.home" value="${jboss.home}"/>
+      </antcall>
+
+      <antcall target="run-example">
          <param name="example.name" value="stateless"/>
          <param name="example.queue.name" value="SmokeTestQueue"/>
          <param name="jboss.home" value="${jboss.home}"/>
@@ -365,6 +375,10 @@
                <istrue value="${run.mdb.example}"/>
             </and>
             <and>
+               <equals arg1="${example.name}" arg2="mdb-failure"/>
+               <istrue value="${run.mdb-failure.example}"/>
+            </and>
+            <and>
                <equals arg1="${example.name}" arg2="stateless"/>
                <istrue value="${run.stateless.example}"/>
             </and>
@@ -663,6 +677,8 @@
          <arg value="WARN  [org.jboss.system.ServiceController] Problem creating service jboss.aop:service=AspectManager"/>
          <arg value="ERROR [org.jboss.deployment.scanner.URLDeploymentScanner] Incomplete Deployment listing:"/>
          <arg value="ERROR [org.jboss.aop.deployment.AspectDeployer] failed to stop"/>
+         <arg value="ERROR [org.jboss.ejb.plugins.LogInterceptor] TransactionRolledbackLocalException in method: public abstract void javax.jms.MessageListener.onMessage(javax.jms.Message), causedBy:"/>
+         <arg value="ERROR [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Exception in JMSCI message listener"/>
          <arg value="restart will delete it"/>
          <arg value="web-console.war/"/> <!-- Only on JBoss 5 -->
          <arg value="jmx-console.war/"/> <!-- Only on JBoss 5 -->




More information about the jboss-cvs-commits mailing list