[jboss-svn-commits] JBL Code SVN: r12502 - in labs/jbossesb/trunk/product: samples/quickstarts and 2 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Jun 12 13:24:30 EDT 2007
Author: kurt.stam at jboss.com
Date: 2007-06-12 13:24:30 -0400 (Tue, 12 Jun 2007)
New Revision: 12502
Added:
labs/jbossesb/trunk/product/samples/quickstarts/messagestore/
labs/jbossesb/trunk/product/samples/quickstarts/messagestore/build.xml
labs/jbossesb/trunk/product/samples/quickstarts/messagestore/deployment.xml
labs/jbossesb/trunk/product/samples/quickstarts/messagestore/jbm-queue-service.xml
labs/jbossesb/trunk/product/samples/quickstarts/messagestore/jbmq-queue-service.xml
labs/jbossesb/trunk/product/samples/quickstarts/messagestore/jboss-esb.xml
labs/jbossesb/trunk/product/samples/quickstarts/messagestore/jbossesb-properties.xml
labs/jbossesb/trunk/product/samples/quickstarts/messagestore/jndi.properties
labs/jbossesb/trunk/product/samples/quickstarts/messagestore/log4j.xml
labs/jbossesb/trunk/product/samples/quickstarts/messagestore/readme.txt
Modified:
labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/services/persistence/MessageStore.java
labs/jbossesb/trunk/product/services/jbossesb/src/main/java/org/jboss/soa/esb/actions/MessagePersister.java
Log:
JBESB-600, Adding messageStore QuickStart
Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/services/persistence/MessageStore.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/services/persistence/MessageStore.java 2007-06-12 16:39:05 UTC (rev 12501)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/services/persistence/MessageStore.java 2007-06-12 17:24:30 UTC (rev 12502)
@@ -32,6 +32,7 @@
public final static String DEFAULT = "org.jboss.internal.soa.esb.persistence.format.db.DBMessageStoreImpl";
public final static String DEFAULT_CLASSIFICATION = "STORE";
public final static String DLQ_CLASSIFICATION = "DLQ";
+ public final static String MESSAGE_STORE_URI = "message-store-uri";
/**
* Get the implementation-specific message URI generator.
* @return the generator
Added: labs/jbossesb/trunk/product/samples/quickstarts/messagestore/build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/messagestore/build.xml (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/messagestore/build.xml 2007-06-12 17:24:30 UTC (rev 12502)
@@ -0,0 +1,31 @@
+<project name="Quickstart_messagestore" default="run" basedir=".">
+
+ <description>
+ ${ant.project.name}
+ ${line.separator}
+ </description>
+
+ <!-- Import the base Ant build script... -->
+ <import file="../conf/base-build.xml"/>
+
+ <target name="runtest" depends="compile"
+ description="sends a JMS message to queue/quickstart_messagestore_Request_gw">
+ <echo>Runs Test JMS Sender</echo>
+ <java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.messagestore.test.SendJMSMessage" failonerror="true">
+ <arg value="Hello MessageStore"/>
+ <classpath refid="exec-classpath"/>
+ </java>
+ </target>
+
+ <target name="sendesb" depends="compile"
+ description="Will send an esb Message">
+ <echo>Runs Test ESB Message Sender</echo>
+ <java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.messagestore.test.SendEsbMessage" failonerror="true">
+ <arg value="FirstServiceESB"/> <!-- service category -->
+ <arg value="MessageStoreListener"/> <!-- service name -->
+ <arg value="Hello MessageStore - Straight to ESB listener - no Gateway"/> <!-- Message text -->
+ <classpath refid="exec-classpath"/>
+ </java>
+ </target>
+
+</project>
Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/messagestore/build.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: labs/jbossesb/trunk/product/samples/quickstarts/messagestore/deployment.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/messagestore/deployment.xml (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/messagestore/deployment.xml 2007-06-12 17:24:30 UTC (rev 12502)
@@ -0,0 +1,5 @@
+<jbossesb-deployment>
+ <depends>jboss.esb:deployment=jbossesb.esb</depends>
+ <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_messagestore_Request_esb</depends>
+ <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_messagestore_Request_gw</depends>
+</jbossesb-deployment>
Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/messagestore/deployment.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: labs/jbossesb/trunk/product/samples/quickstarts/messagestore/jbm-queue-service.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/messagestore/jbm-queue-service.xml (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/messagestore/jbm-queue-service.xml 2007-06-12 17:24:30 UTC (rev 12502)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_messagestore_Request_esb"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_messagestore_Request_gw"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+</server>
Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/messagestore/jbm-queue-service.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: labs/jbossesb/trunk/product/samples/quickstarts/messagestore/jbmq-queue-service.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/messagestore/jbmq-queue-service.xml (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/messagestore/jbmq-queue-service.xml 2007-06-12 17:24:30 UTC (rev 12502)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+ <mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_messagestore_Request_esb">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+ </mbean>
+ <mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_messagestore_Request_gw">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+ </mbean>
+</server>
Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/messagestore/jbmq-queue-service.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: labs/jbossesb/trunk/product/samples/quickstarts/messagestore/jboss-esb.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/messagestore/jboss-esb.xml (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/messagestore/jboss-esb.xml 2007-06-12 17:24:30 UTC (rev 12502)
@@ -0,0 +1,62 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" parameterReloadSecs="5">
+
+ <providers>
+ <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
+ jndi-URL="jnp://127.0.0.1:1099" jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
+ jndi-pkg-prefix="org.jboss.naming:org.jnp.interfaces">
+
+ <jms-bus busid="quickstartGwChannel">
+ <jms-message-filter
+ dest-type="QUEUE"
+ dest-name="queue/quickstart_messagestore_Request_gw"
+ />
+ </jms-bus>
+ <jms-bus busid="quickstartEsbChannel">
+ <jms-message-filter
+ dest-type="QUEUE"
+ dest-name="queue/quickstart_messagestore_Request_esb"
+ />
+ </jms-bus>
+
+ </jms-provider>
+ </providers>
+
+ <services>
+ <service
+ category="FirstServiceESB"
+ name="MessageStoreListener"
+ description="Hello World, and write message to message store">
+ <listeners>
+ <jms-listener name="JMS-Gateway"
+ busidref="quickstartGwChannel"
+ maxThreads="1"
+ is-gateway="true"
+ />
+ <jms-listener name="helloWorld"
+ busidref="quickstartEsbChannel"
+ maxThreads="1"
+ />
+ </listeners>
+ <actions>
+ <!-- Print the message to the console -->
+ <action name="notificationAction" class="org.jboss.soa.esb.actions.Notifier">
+ <property name="okMethod" value="notifyOK" />
+ <property name="notification-details">
+ <NotificationList>
+ <target class="NotifyConsole" />
+ </NotificationList>
+ </property>
+ </action>
+ <!-- Add a copy of the message to the message store under categorization 'test' -->
+ <action name="PersistAction" class="org.jboss.soa.esb.actions.MessagePersister" >
+ <property name="classfication" value="test"/>
+ <property name="message-store-class" value="org.jboss.internal.soa.esb.persistence.format.db.DBMessageStoreImpl"/>
+ </action>
+ <!-- Check that the message is really there -->
+ <action name="CheckMessageStore" class="org.jboss.soa.esb.samples.quickstart.messagestore.CheckMessageStoreAction" />
+ </actions>
+ </service>
+ </services>
+
+</jbossesb>
Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/messagestore/jboss-esb.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: labs/jbossesb/trunk/product/samples/quickstarts/messagestore/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/messagestore/jbossesb-properties.xml (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/messagestore/jbossesb-properties.xml 2007-06-12 17:24:30 UTC (rev 12502)
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ JBoss, Home of Professional Open Source
+ Copyright 2006, JBoss Inc., and others contributors as indicated
+ by the @authors tag. All rights reserved.
+ See the copyright.txt in the distribution for a
+ full listing of individual contributors.
+ This copyrighted material is made available to anyone wishing to use,
+ modify, copy, or redistribute it subject to the terms and conditions
+ of the GNU Lesser General Public License, v. 2.1.
+ This program is distributed in the hope that it will be useful, but WITHOUT A
+ 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,
+ v.2.1 along with this distribution; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ MA 02110-1301, USA.
+
+ (C) 2005-2006,
+ @author JBoss Inc.
+-->
+<!-- $Id: jbossesb-unittest-properties.xml $ -->
+<!--
+ These options are described in the JBossESB manual.
+ Defaults are provided here for convenience only.
+
+ Please read through this file prior to using the system, and consider
+ updating the specified entries.
+-->
+<esb
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="jbossesb-1_0.xsd">
+ <properties name="core">
+ <property name="org.jboss.soa.esb.jndi.server.type" value="jboss"/>
+ <property name="org.jboss.soa.esb.jndi.server.url" value="localhost"/>
+ <property name="org.jboss.soa.esb.persistence.connection.factory" value="org.jboss.internal.soa.esb.persistence.format.MessageStoreFactoryImpl"/>
+ </properties>
+ <properties name="registry">
+ <property name="org.jboss.soa.esb.registry.queryManagerURI"
+ value="jnp://localhost:1099/InquiryService?org.apache.juddi.registry.rmi.Inquiry#inquire"/>
+ <property name="org.jboss.soa.esb.registry.lifeCycleManagerURI"
+ value="jnp://localhost:1099/PublishService?org.apache.juddi.registry.rmi.Publish#publish" />
+ <property name="org.jboss.soa.esb.registry.implementationClass"
+ value="org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl"/>
+ <property name="org.jboss.soa.esb.registry.factoryClass"
+ value="org.apache.ws.scout.registry.ConnectionFactoryImpl"/>
+ <property name="org.jboss.soa.esb.registry.user"
+ value="jbossesb"/>
+ <property name="org.jboss.soa.esb.registry.password"
+ value="password"/>
+ <!-- the following parameter is scout specific to set the type of communication between scout and the UDDI (embedded, rmi, soap) -->
+ <property name="org.jboss.soa.esb.scout.proxy.transportClass"
+ value="org.apache.ws.scout.transport.RMITransport"/>
+ </properties>
+ <properties name="transports" depends="core">
+ <property name="org.jboss.soa.esb.mail.smtp.host" value="localhost"/>
+ <property name="org.jboss.soa.esb.mail.smtp.user" value="jbossesb"/>
+ <property name="org.jboss.soa.esb.mail.smtp.password" value=""/>
+ <property name="org.jboss.soa.esb.mail.smtp.port" value="25"/>
+ </properties>
+ <properties name="connection">
+ <property name="min-pool-size" value="5"/>
+ <property name="max-pool=size" value="10"/>
+ <property name="blocking-timeout-millis" value="5000"/>
+ <property name="abandoned-connection-timeout" value="10000"/>
+ <property name="abandoned-connection-time-interval" value="30000"/>
+ </properties>
+ <properties name="dbstore">
+ <property name="org.jboss.soa.esb.persistence.db.connection.url" value="jdbc:hsqldb:hsql://localhost:9001/jbossesb"/>
+ <property name="org.jboss.soa.esb.persistence.db.jdbc.driver" value="org.hsqldb.jdbcDriver"/>
+ <property name="org.jboss.soa.esb.persistence.db.user" value="sa"/>
+ <property name="org.jboss.soa.esb.persistence.db.pwd" value=""/>
+ <property name="org.jboss.soa.esb.persistence.db.pool.initial.size" value="2"/>
+ <property name="org.jboss.soa.esb.persistence.db.pool.min.size" value="2"/>
+ <property name="org.jboss.soa.esb.persistence.db.pool.max.size" value="5"/>
+ <!--table managed by pool to test for valid connections - created by pool automatically -->
+ <property name="org.jboss.soa.esb.persistence.db.pool.test.table" value="pooltest"/>
+ <!-- # of milliseconds to timeout waiting for a connection from pool -->
+ <property name="org.jboss.soa.esb.persistence.db.pool.timeout.millis" value="5000"/>
+ </properties>
+ <properties name="messagerouting">
+ <property name="org.jboss.soa.esb.routing.cbrClass" value="org.jboss.internal.soa.esb.services.routing.cbr.JBossRulesRouter"/>
+ </properties>
+</esb>
Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/messagestore/jbossesb-properties.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: labs/jbossesb/trunk/product/samples/quickstarts/messagestore/jndi.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/messagestore/jndi.properties (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/messagestore/jndi.properties 2007-06-12 17:24:30 UTC (rev 12502)
@@ -0,0 +1,5 @@
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+java.naming.factory.url.pkgs=org.jnp.interfaces
+
Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/messagestore/jndi.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: labs/jbossesb/trunk/product/samples/quickstarts/messagestore/log4j.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/messagestore/log4j.xml (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/messagestore/log4j.xml 2007-06-12 17:24:30 UTC (rev 12502)
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- ===================================================================== -->
+<!-- -->
+<!-- Log4j Configuration -->
+<!-- -->
+<!-- ===================================================================== -->
+
+<!-- $Id: log4j.xml,v 1.26.2.5 2005/09/15 09:31:02 dimitris Exp $ -->
+
+<!--
+ | For more configuration infromation and examples see the Jakarta Log4j
+ | owebsite: http://jakarta.apache.org/log4j
+ -->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+ <!-- ============================== -->
+ <!-- Append messages to the console -->
+ <!-- ============================== -->
+
+ <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+ <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+ <param name="Target" value="System.out"/>
+ <param name="Threshold" value="INFO"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <!-- The default pattern: Date Priority [Category] Message\n -->
+ <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%t][%c{1}] %m%n"/>
+ </layout>
+ </appender>
+
+ <!-- ================================= -->
+ <!-- Preserve messages in a local file -->
+ <!-- ================================= -->
+
+ <!-- A size based file rolling appender -->
+ <appender name="FILE" class="org.jboss.logging.appender.RollingFileAppender">
+ <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+ <param name="File" value="./listener.log"/>
+ <param name="Append" value="false"/>
+ <param name="MaxFileSize" value="500KB"/>
+ <param name="MaxBackupIndex" value="1"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d %-5p [%t][%c] %m%n"/>
+ </layout>
+ </appender>
+
+ <!-- ================ -->
+ <!-- Limit categories -->
+ <!-- ================ -->
+
+ <category name="org.jboss">
+ <priority value="WARN"/>
+ </category>
+ <category name="org.jboss.soa.esb">
+ <priority value="ERROR"/>
+ </category>
+ <category name="org.jboss.internal.soa.esb">
+ <priority value="ERROR"/>
+ </category>
+ <category name="org.apache">
+ <priority value="ERROR"/>
+ </category>
+ <category name="quickstart">
+ <priority value="DEBUG"/>
+ </category>
+ <!-- ======================= -->
+ <!-- Setup the Root category -->
+ <!-- ======================= -->
+
+ <root>
+ <appender-ref ref="CONSOLE"/>
+ <appender-ref ref="FILE"/>
+ </root>
+
+</log4j:configuration>
Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/messagestore/log4j.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: labs/jbossesb/trunk/product/samples/quickstarts/messagestore/readme.txt
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/messagestore/readme.txt (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/messagestore/readme.txt 2007-06-12 17:24:30 UTC (rev 12502)
@@ -0,0 +1,86 @@
+Overview:
+=========
+ The purpose of the helloworld quickstart sample is to show how to store
+ a message in the MessageStore. The only interesting piece of configuration
+ is:
+
+ <!-- Add a copy of the message to the message store under categorization 'test' -->
+ <action name="PersistAction" class="org.jboss.soa.esb.actions.MessagePersister" >
+ <property name="classfication" value="test"/>
+ <property name="message-store-class" value="org.jboss.internal.soa.esb.persistence.format.db.DBMessageStoreImpl"/>
+ </action>
+
+ Which causes a message to be saved in the DB messageStore under the categorization 'test'. Tooling
+ will be added to inspect the messageStore.
+
+Running this quickstart:
+========================
+ Please refer to 'ant help-quickstarts' for prerequisites about the quickstarts and a
+ more detailed descripton of the different ways to run the quickstarts.
+
+To Run standalone mode:
+=======================
+ 1. In a command terminal window in the quickstart folder type 'ant deploy-jms-dests'.
+ 2. In a command terminal window in this folder ("Window1"), type 'ant run'.
+ 3. Open another command terminal window in this folder ("Window2"), type 'ant runtest'.
+ 4. Switch back to "Window1" to see the output from the ESB
+
+To Run '.esb' archive mode:
+===========================
+ 1. In a command terminal window in this folder ("Window1"), type 'ant undeploy-jms-dests'.
+ 1. In a command terminal window in this folder ("Window1"), type 'ant deploy'.
+ 2. Open another command terminal window in this folder ("Window2"), type 'ant runtest'.
+ 3. Switch back to Application Server console to see the output from the ESB
+
+ 'run' target description:
+ In a command prompt window, start the listeners by simply running "ant"
+ in this directory. You might review the build.xml file to see how it is setup.
+ More details on the build.xml can be found later in this document. Shutdown
+ the listener by simply using Ctrl-C in that window.
+
+ 'runtest' target description:
+ In a separate command prompt window, run "ant runtest" to shoot a JMS message
+ into the listener which will then invoke the MyJMSListenerAction and display
+ it to the console. You can modify the build.xml to change the phrase
+ "Hello World" to something else and re-run "ant runtest".
+
+Project file descriptions:
+==========================
+
+ jbossesb.xml:
+ The JMS gateway and ESB configuration file. It is listening for JMS ObjectMessages or TextMessages
+ at "queue/quickstart_messagestore_Request". Messages received at "quickstart_messagestore_Request" are
+ converted jbossesb-properties.xml. Also needed by jUDDI and needs to be at the head of the classpath.
+ The jbossesb-properties.xml is used when the service first boots up for
+ self-registration based upon the service-category and service-name found in the esb-config.xml file.
+
+ jndi.properties:
+ Needed primarily for org.jboss.soa.esb.samples.quickstart.messagestore.test.SendJMSMessage that is fired by ant runtest.
+
+ log4j.xml:
+ Needed to configure log4J used by both the quickstart and the ESB itself. A listener needs a place to log.
+
+ src\quickstart\CheckMessageStoreAction.java:
+ The action class that is identified in the esb-config.xml file and is called whenever a message is received.
+
+ src\quickstart\helloworld\test\SendJMSMessage.java:
+ Shoots in the string passed in via the command line or in this case the arg attribute in the ant runtest task.
+
+ src\quickstart\helloworld\test\SendEsbMessage.java:
+ Shoots in the string passed in via the command line or in this case the arg atribute in the ant sendesb task.
+ This demonstrates how to build an "ESB aware" client that can invoke an ESB service.
+
+ build.xml:
+ Targets and structure description:
+ * the classpath property pulls the jbossesb-properties.xml file to the
+ front of the list
+ * the echoCP task is useful for making sure what you think is in your classpath is actually in your classpath
+ Usage is: ant echoCP > myclasspath.txt
+ This generates a file called myclasspath.txt which can be reviewed in a text editor
+ * the run task calls the Launcher passing in 3 arguments the most important are the esb-config.xml and
+ esb-config-gateway.xml files
+ * the runtest task calls the org.jboss.soa.esb.samples.quickstart.helloworld.test.SendJMSMessage class and passes in an argument representing
+ the string-based message to be pused into the queue the gateway is listening on. Note: SendJMSMessage
+ contains a hard-coded queue name.
+
+
Modified: labs/jbossesb/trunk/product/services/jbossesb/src/main/java/org/jboss/soa/esb/actions/MessagePersister.java
===================================================================
--- labs/jbossesb/trunk/product/services/jbossesb/src/main/java/org/jboss/soa/esb/actions/MessagePersister.java 2007-06-12 16:39:05 UTC (rev 12501)
+++ labs/jbossesb/trunk/product/services/jbossesb/src/main/java/org/jboss/soa/esb/actions/MessagePersister.java 2007-06-12 17:24:30 UTC (rev 12502)
@@ -27,6 +27,8 @@
*/
package org.jboss.soa.esb.actions;
+import java.net.URI;
+
import org.apache.log4j.Logger;
import org.jboss.internal.soa.esb.persistence.format.MessageStoreFactory;
import org.jboss.soa.esb.ConfigurationException;
@@ -44,6 +46,7 @@
public final static String MESSAGE_STORE_CLASS = "message-store-class";
public final static String CLASSIFICATION_ATTR = "classfication";
+
protected ConfigTree config;
protected MessageStore messageStore;
private String classification;
@@ -59,7 +62,8 @@
public Message process(Message message) throws ActionProcessingException
{
try {
- messageStore.addMessage(message, classification);
+ URI uri = messageStore.addMessage(message, classification);
+ message.getProperties().setProperty(MessageStore.MESSAGE_STORE_URI, uri);
} catch (MessageStoreException mse) {
log.error("Could not store undeliverable message.", mse);
}
More information about the jboss-svn-commits
mailing list