[jboss-cvs] JBoss Messaging SVN: r1413 - in trunk: . docs/examples docs/examples/distributed-topic docs/examples/distributed-topic/etc docs/examples/distributed-topic/src docs/examples/distributed-topic/src/org docs/examples/distributed-topic/src/org/jboss docs/examples/distributed-topic/src/org/jboss/example docs/examples/distributed-topic/src/org/jboss/example/jms docs/examples/distributed-topic/src/org/jboss/example/jms/distributedtopic

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sat Sep 30 03:43:47 EDT 2006


Author: ovidiu.feodorov at jboss.com
Date: 2006-09-30 03:43:42 -0400 (Sat, 30 Sep 2006)
New Revision: 1413

Added:
   trunk/docs/examples/distributed-topic/
   trunk/docs/examples/distributed-topic/README.html
   trunk/docs/examples/distributed-topic/build.xml
   trunk/docs/examples/distributed-topic/do-not-distribute.properties
   trunk/docs/examples/distributed-topic/etc/
   trunk/docs/examples/distributed-topic/etc/jndi.properties
   trunk/docs/examples/distributed-topic/etc/log4j.xml
   trunk/docs/examples/distributed-topic/src/
   trunk/docs/examples/distributed-topic/src/org/
   trunk/docs/examples/distributed-topic/src/org/jboss/
   trunk/docs/examples/distributed-topic/src/org/jboss/example/
   trunk/docs/examples/distributed-topic/src/org/jboss/example/jms/
   trunk/docs/examples/distributed-topic/src/org/jboss/example/jms/distributedtopic/
   trunk/docs/examples/distributed-topic/src/org/jboss/example/jms/distributedtopic/DistributedTopicExample.java
   trunk/docs/examples/distributed-topic/src/org/jboss/example/jms/distributedtopic/ExampleListener.java
Modified:
   trunk/build-messaging.xml
   trunk/messaging.iml
Log:
added the distributed topic example

Modified: trunk/build-messaging.xml
===================================================================
--- trunk/build-messaging.xml	2006-09-30 07:42:38 UTC (rev 1412)
+++ trunk/build-messaging.xml	2006-09-30 07:43:42 UTC (rev 1413)
@@ -761,6 +761,7 @@
       <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"/>
+      <ant dir="./docs/examples/distributed-topic" antfile="build.xml" inheritAll="false" target="clean"/>
       <ant dir="./tests" antfile="build.xml" inheritAll="false" target="clean"/>
       <!-- <ant dir="./perf" antfile="build.xml" inheritAll="false" target="clean"/> -->
    </target>

Added: trunk/docs/examples/distributed-topic/README.html
===================================================================
--- trunk/docs/examples/distributed-topic/README.html	2006-09-30 07:42:38 UTC (rev 1412)
+++ trunk/docs/examples/distributed-topic/README.html	2006-09-30 07:43:42 UTC (rev 1413)
@@ -0,0 +1,143 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+  <meta content="text/html; charset=ISO-8859-1"
+ http-equiv="content-type">
+  <title>JBoss Messaging Example - JMS Topic</title>
+</head>
+<body>
+<br>
+<h1>JBoss Messaging Topic Example</h1>
+$Revision: 1017 $
+<h2>Overview</h2>
+<br>
+This example creates a JMS Connection to a JBoss Messaging instance
+and uses it to create a session, a publisher and a subscriber. The
+publisher sends a message to the topic. The example is considered
+successful
+if the topic subscriber receives the message.<br>
+<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.&nbsp; However,
+the example will automatically deploy its own topic, unless a topic
+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>
+<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>
+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>
+<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\topic</span><br>
+</div>
+<br>
+3. Run the example:<br>
+<br>
+<div style="margin-left: 40px;"><span style="font-family: monospace;">ant</span>
+<br>
+<br>
+<br>
+</div>
+The output of a successful run should be similar to:<br>
+<div style="margin-left: 40px;"><br>
+</div>
+<table
+ style="width: 90%; text-align: left; font-family: monospace; background-color: rgb(204, 204, 204); margin-left: 40px;"
+ border="1" cellpadding="2" cellspacing="2">
+  <tbody>
+    <tr>
+      <td style="vertical-align: top;">
+      <div style="margin-left: 40px;"><br>
+      </div>
+$ ant<br>
+Buildfile: build.xml<br>
+      <br>
+identify:<br>
+&nbsp;&nbsp;&nbsp;&nbsp; [echo]
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<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;
+Running the TOPIC
+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;
+X<br>
+&nbsp;&nbsp;&nbsp;&nbsp; [echo]
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br>
+&nbsp;&nbsp;&nbsp;&nbsp; [echo] The topic: testTopic<br>
+      <br>
+sanity-check:<br>
+      <br>
+init:<br>
+&nbsp;&nbsp;&nbsp; [mkdir] Created dir:
+C:\work\src\cvs\jboss-head\jms\docs\examples\topic\output<br>
+&nbsp;&nbsp;&nbsp; [mkdir] Created dir:
+C:\work\src\cvs\jboss-head\jms\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>
+&nbsp;&nbsp;&nbsp; [javac] Compiling 2 source files to
+C:\work\src\cvs\jboss-head\jms\docs\examples\topic\output<br>
+      <br>
+run:<br>
+&nbsp;&nbsp;&nbsp;&nbsp; [java] Topic /topic/testTopic exists<br>
+&nbsp;&nbsp;&nbsp;&nbsp; [java] The message was successfully published
+on the topic<br>
+&nbsp;&nbsp;&nbsp;&nbsp; [java] Received message: Hello!<br>
+&nbsp;&nbsp;&nbsp;&nbsp; [java] The example connected to JBoss
+Messaging version 1.0.1.CR3 (1.0)<br>
+      <br>
+&nbsp;&nbsp;&nbsp;&nbsp; [java] #####################<br>
+&nbsp;&nbsp;&nbsp;&nbsp; [java] ###&nbsp;&nbsp;&nbsp;
+SUCCESS!&nbsp;&nbsp; ###<br>
+&nbsp;&nbsp;&nbsp;&nbsp; [java] #####################<br>
+      <br>
+BUILD SUCCESSFUL<br>
+Total time: 4 seconds<br>
+      <br>
+      <br>
+      </td>
+    </tr>
+  </tbody>
+</table>
+<div style="margin-left: 40px;"><br>
+</div>
+<br>
+<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>
+<br>
+<hr style="width: 100%; height: 2px;"><br>
+<br>
+<br>
+<br>
+<br>
+<br>
+<br>
+</body>
+</html>

Added: trunk/docs/examples/distributed-topic/build.xml
===================================================================
--- trunk/docs/examples/distributed-topic/build.xml	2006-09-30 07:42:38 UTC (rev 1412)
+++ trunk/docs/examples/distributed-topic/build.xml	2006-09-30 07:43:42 UTC (rev 1413)
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+
+   To run the example, set JBOSS_HOME and run ant (with no parameters)
+
+   $Id: build.xml 974 2006-05-22 21:35:38 -0600 (Mon, 22 May 2006) ovidiu $
+
+ -->
+
+<project name="DistributedTopicExample" default="run">
+
+   <property environment="ENV"/>
+
+   <!--
+        If you don't find this file in the current directory, it's ok, it's intended to provide
+        defaults for in-workarea testing and it's not meant for distribution with the example bundle.
+   -->
+   <property file="do-not-distribute.properties"/>
+
+   <!-- These properties may be overriden by calling ants when this example is used in a smoke test -->
+   <property name="messaging.client.jar.path" value="../.."/>
+   <property name="messaging.client.jar.name" value="jboss-messaging-client.jar"/>
+   <property name="jboss.home" value="${ENV.JBOSS_HOME}"/>
+   <property name="example.topic.name" value="testDistributedTopic"/>
+
+   <path id="common.compilation.classpath">
+      <fileset file="${jboss.home}/client/jboss-j2ee.jar"/>
+      <fileset file="${jboss.home}/client/jboss-j2se.jar"/>
+   </path>
+
+   <path id="example.compilation.classpath">
+      <path refid="common.compilation.classpath"/>
+      <pathelement path="../common/output"/>
+   </path>
+
+   <path id="execution.classpath">
+      <pathelement path="./etc"/>
+      <pathelement path="../common/output"/>
+      <pathelement path="./output"/>
+      <fileset file="${messaging.client.jar.path}/${messaging.client.jar.name}"/>
+   </path>
+
+   <target name="identify">
+      <echo message="###########################################################################"/>
+      <echo message="#                Running the DISTRIBUTED TOPIC example                    #"/>
+      <echo message="###########################################################################"/>
+      <echo message="The topic:      ${example.topic.name}"/>
+      <echo message="The client jar: ${messaging.client.jar.path}/${messaging.client.jar.name}"/>
+   </target>
+
+   <target name="sanity-check" depends="identify">
+      <available property="client.jar.present" file="${messaging.client.jar.path}/${messaging.client.jar.name}"/>
+      <fail message="Could not find client jar ${messaging.client.jar.path}/${messaging.client.jar.name}"
+            unless="client.jar.present"/>
+   </target>
+
+   <target name="init" depends="sanity-check">
+      <mkdir dir="./output"/>
+      <mkdir dir="../common/output"/>
+   </target>
+
+   <target name="compile" depends="init">
+      <javac destdir="../common/output" debug="on" debuglevel="lines,vars,source">
+         <src path="../common/src"/>
+         <classpath refid="common.compilation.classpath"/>
+      </javac>
+      <javac destdir="./output" debug="on" debuglevel="lines,vars,source">
+         <src path="./src"/>
+         <classpath refid="example.compilation.classpath"/>
+      </javac>
+   </target>
+
+   <target name="run" depends="compile">
+      <!--
+           DistributedTopicExample expects to find the name of the topic to connect to as value of
+           the 'example.topic.name' property, which *may* be defined by calling ant when this
+           example is used in a smoke test.
+      -->
+      <java classname="org.jboss.example.jms.distributedtopic.DistributedTopicExample"
+         classpathref="execution.classpath" fork="yes" failonerror="true">
+         <sysproperty key="example.topic.name" value="${example.topic.name}"/>
+         <!--
+         <jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=y,suspend=y,address=example"/>
+          -->
+      </java>
+   </target>
+
+   <target name="clean">
+      <delete dir="./output" quiet="true"/>
+      <delete dir="../common/output" quiet="true"/>
+   </target>
+
+</project>
+

Added: trunk/docs/examples/distributed-topic/do-not-distribute.properties
===================================================================
--- trunk/docs/examples/distributed-topic/do-not-distribute.properties	2006-09-30 07:42:38 UTC (rev 1412)
+++ trunk/docs/examples/distributed-topic/do-not-distribute.properties	2006-09-30 07:43:42 UTC (rev 1413)
@@ -0,0 +1,7 @@
+#
+# This file provides values for in-workarea example testing.
+# DO NOT DISTRIBUTE!
+#
+messaging.client.jar.path=../../../output/lib
+messaging.client.jar.name=jboss-messaging-client.jar
+jboss.home=C:\\work\\src\\jboss-4.0.4.GA-src\\build\\output\\jboss-4.0.4.GA

Added: trunk/docs/examples/distributed-topic/etc/jndi.properties
===================================================================
--- trunk/docs/examples/distributed-topic/etc/jndi.properties	2006-09-30 07:42:38 UTC (rev 1412)
+++ trunk/docs/examples/distributed-topic/etc/jndi.properties	2006-09-30 07:43:42 UTC (rev 1413)
@@ -0,0 +1,4 @@
+### JBossNS properties
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces

Added: trunk/docs/examples/distributed-topic/etc/log4j.xml
===================================================================
--- trunk/docs/examples/distributed-topic/etc/log4j.xml	2006-09-30 07:42:38 UTC (rev 1412)
+++ trunk/docs/examples/distributed-topic/etc/log4j.xml	2006-09-30 07:43:42 UTC (rev 1413)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- $Id: log4j.xml 536 2005-12-22 00:28:39 -0600 (Thu, 22 Dec 2005) ovidiu $ -->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+   <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+      <param name="Target" value="System.out"/>
+      <param name="Threshold" value="INFO"/>
+      <layout class="org.apache.log4j.PatternLayout">
+         <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p @%t [%c{1}] %m%n"/>
+      </layout>
+   </appender>
+
+   <root>
+      <appender-ref ref="CONSOLE"/>
+   </root>
+
+</log4j:configuration>

Added: trunk/docs/examples/distributed-topic/src/org/jboss/example/jms/distributedtopic/DistributedTopicExample.java
===================================================================
--- trunk/docs/examples/distributed-topic/src/org/jboss/example/jms/distributedtopic/DistributedTopicExample.java	2006-09-30 07:42:38 UTC (rev 1412)
+++ trunk/docs/examples/distributed-topic/src/org/jboss/example/jms/distributedtopic/DistributedTopicExample.java	2006-09-30 07:43:42 UTC (rev 1413)
@@ -0,0 +1,190 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.example.jms.distributedtopic;
+
+import javax.naming.InitialContext;
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.Topic;
+import javax.jms.Session;
+import javax.jms.MessageProducer;
+import javax.jms.MessageConsumer;
+import javax.jms.TextMessage;
+import javax.jms.JMSException;
+
+import org.jboss.example.jms.common.ExampleSupport;
+
+import java.util.Hashtable;
+
+/**
+ * The example sends a message to a distributed topic depolyed on the JMS cluster. The message is
+ * subsequently received by two different subscribers, connected to two distinct cluster nodes.
+ *
+ * Since this example is also used as a smoke test, it is essential that the VM exits with exit
+ * code 0 in case of successful execution and a non-zero value on failure.
+ *
+ * @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
+ * @version <tt>$Revision: 1001 $</tt>
+ *
+ * $Id: TopicExample.java 1001 2006-06-24 09:05:40Z timfox $
+ */
+public class DistributedTopicExample extends ExampleSupport
+{
+   public void example() throws Exception
+   {
+      String destinationName = getDestinationJNDIName();
+
+      InitialContext ic = null;
+      InitialContext ic2 = null;
+
+      Connection connection = null;
+      Connection connection2 = null;
+
+      try
+      {
+         // connecting to the first node
+
+         ic = new InitialContext();
+
+         ConnectionFactory cf = (ConnectionFactory)ic.lookup("/ConnectionFactory");
+         Topic distributedTopic = (Topic)ic.lookup(destinationName);
+         log("Distributed topic " + destinationName + " exists");
+
+         connection = cf.createConnection();
+         Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+         MessageProducer publisher = session.createProducer(distributedTopic);
+
+         MessageConsumer subscriber = session.createConsumer(distributedTopic);
+
+         ExampleListener messageListener = new ExampleListener("MessageListener 1");
+         subscriber.setMessageListener(messageListener);
+
+         // connecting to the second node
+
+         Hashtable environment = new Hashtable();
+         environment.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
+         environment.put("java.naming.provider.url", "jnp://localhost:1199");
+         environment.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
+
+         ic2 = new InitialContext(environment);
+
+         ConnectionFactory cf2 = (ConnectionFactory)ic2.lookup("/ConnectionFactory");
+
+         connection2 = cf2.createConnection();
+         Session session2 = connection2.createSession(false, Session.AUTO_ACKNOWLEDGE);
+
+         MessageConsumer subscriber2 = session2.createConsumer(distributedTopic);
+
+         ExampleListener messageListener2 = new ExampleListener("MessageListener 2");
+         subscriber2.setMessageListener(messageListener2);
+
+         // starting the connections
+
+         connection.start();
+         connection2.start();
+
+         // sending the message
+
+         TextMessage message = session.createTextMessage("Hello!");
+         publisher.send(message);
+
+         log("The message was successfully published on the distributed topic");
+
+         messageListener.waitForMessage();
+         messageListener2.waitForMessage();
+
+         message = (TextMessage)messageListener.getMessage();
+         log(messageListener.getName() + " received message: " + message.getText());
+         assertEquals("Hello!", message.getText());
+
+         message = (TextMessage)messageListener2.getMessage();
+         log(messageListener2.getName() + " received message: " + message.getText());
+         assertEquals("Hello!", message.getText());
+
+         displayProviderInfo(connection.getMetaData());
+
+      }
+      finally
+      {
+         if(ic != null)
+         {
+            try
+            {
+               ic.close();
+            }
+            catch(Exception e)
+            {
+               throw e;
+            }
+         }
+
+         if(ic2 != null)
+         {
+            try
+            {
+               ic2.close();
+            }
+            catch(Exception e)
+            {
+               throw e;
+            }
+         }
+
+         try
+         {
+            if (connection != null)
+            {
+               connection.close();
+            }
+         }
+         catch(JMSException e)
+         {
+            log("Could not close connection " + connection + ", exception was " + e);
+            throw e;
+         }
+
+         try
+         {
+            if (connection2 != null)
+            {
+               connection2.close();
+            }
+         }
+         catch(JMSException e)
+         {
+            log("Could not close connection " + connection2 + ", exception was " + e);
+            throw e;
+         }
+      }
+   }
+
+   protected boolean isQueueExample()
+   {
+      return false;
+   }
+
+   public static void main(String[] args)
+   {
+      new DistributedTopicExample().run();
+   }
+
+}

Added: trunk/docs/examples/distributed-topic/src/org/jboss/example/jms/distributedtopic/ExampleListener.java
===================================================================
--- trunk/docs/examples/distributed-topic/src/org/jboss/example/jms/distributedtopic/ExampleListener.java	2006-09-30 07:42:38 UTC (rev 1412)
+++ trunk/docs/examples/distributed-topic/src/org/jboss/example/jms/distributedtopic/ExampleListener.java	2006-09-30 07:43:42 UTC (rev 1413)
@@ -0,0 +1,82 @@
+/**
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.example.jms.distributedtopic;
+
+import javax.jms.MessageListener;
+import javax.jms.Message;
+
+/**
+ * @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
+ * @author <a href="mailto:clebert.suconic at jboss.org">Clebert Suconic</a>
+ * @version <tt>$Revision: 536 $</tt>
+
+ * $Id: ExampleListener.java 536 2005-12-22 00:28:39 -0600 (Thu, 22 Dec 2005) ovidiu $
+ */
+public class ExampleListener implements MessageListener
+{
+   // Constants -----------------------------------------------------
+
+   // Static --------------------------------------------------------
+
+   // Attributes ----------------------------------------------------
+
+   private String name;
+   private Message message;
+
+   // Constructors --------------------------------------------------
+
+   public ExampleListener(String name)
+   {
+      this.name = name;
+   }
+
+   // MessageListener implementation --------------------------------
+
+   public synchronized void onMessage(Message message)
+   {
+      this.message = message;
+      notifyAll();
+   }
+
+   // Public --------------------------------------------------------
+
+   public synchronized Message getMessage()
+   {
+      return message;
+   }
+
+   public synchronized void waitForMessage()
+   {
+      if (message != null)
+      {
+         return;
+      }
+
+      try
+      {
+         wait(5000);
+      }
+      catch(InterruptedException e)
+      {
+         // OK
+      }
+   }
+
+   public String getName()
+   {
+      return name;
+   }
+
+   // Package protected ---------------------------------------------
+
+   // Protected -----------------------------------------------------
+
+   // Private -------------------------------------------------------
+
+   // Inner classes -------------------------------------------------
+
+}

Modified: trunk/messaging.iml
===================================================================
--- trunk/messaging.iml	2006-09-30 07:42:38 UTC (rev 1412)
+++ trunk/messaging.iml	2006-09-30 07:43:42 UTC (rev 1413)
@@ -6,6 +6,7 @@
     <exclude-output />
     <content url="file://$MODULE_DIR$">
       <sourceFolder url="file://$MODULE_DIR$/docs/examples/common/src" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/docs/examples/distributed-topic/src" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/docs/examples/ejb3mdb/src" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/docs/examples/http/src" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/docs/examples/mdb/src" isTestSource="false" />




More information about the jboss-cvs-commits mailing list