[jboss-svn-commits] JBL Code SVN: r9110 - in labs/jbossesb/trunk/product/samples/quickstarts: business_service and 13 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Jan 29 21:50:22 EST 2007
Author: burrsutter
Date: 2007-01-29 21:50:22 -0500 (Mon, 29 Jan 2007)
New Revision: 9110
Added:
labs/jbossesb/trunk/product/samples/quickstarts/business_service/
labs/jbossesb/trunk/product/samples/quickstarts/business_service/build.xml
labs/jbossesb/trunk/product/samples/quickstarts/business_service/ejb3/
labs/jbossesb/trunk/product/samples/quickstarts/business_service/ejb3/src/
labs/jbossesb/trunk/product/samples/quickstarts/business_service/ejb3/src/org/
labs/jbossesb/trunk/product/samples/quickstarts/business_service/ejb3/src/org/jboss/
labs/jbossesb/trunk/product/samples/quickstarts/business_service/ejb3/src/org/jboss/tutorial/
labs/jbossesb/trunk/product/samples/quickstarts/business_service/ejb3/src/org/jboss/tutorial/stateless/
labs/jbossesb/trunk/product/samples/quickstarts/business_service/ejb3/src/org/jboss/tutorial/stateless/bean/
labs/jbossesb/trunk/product/samples/quickstarts/business_service/ejb3/src/org/jboss/tutorial/stateless/bean/HelloWorld.java
labs/jbossesb/trunk/product/samples/quickstarts/business_service/ejb3/src/org/jboss/tutorial/stateless/bean/HelloWorldBean.java
labs/jbossesb/trunk/product/samples/quickstarts/business_service/ejb3/src/org/jboss/tutorial/stateless/client/
labs/jbossesb/trunk/product/samples/quickstarts/business_service/ejb3/src/org/jboss/tutorial/stateless/client/Client.java
labs/jbossesb/trunk/product/samples/quickstarts/business_service/esb_actions/
labs/jbossesb/trunk/product/samples/quickstarts/business_service/esb_actions/src/
labs/jbossesb/trunk/product/samples/quickstarts/business_service/esb_actions/src/quickstart/
labs/jbossesb/trunk/product/samples/quickstarts/business_service/esb_actions/src/quickstart/business_service/
labs/jbossesb/trunk/product/samples/quickstarts/business_service/esb_actions/src/quickstart/business_service/MyAction.java
labs/jbossesb/trunk/product/samples/quickstarts/business_service/esb_actions/src/quickstart/business_service/test/
labs/jbossesb/trunk/product/samples/quickstarts/business_service/esb_actions/src/quickstart/business_service/test/SendJMSMessage.java
labs/jbossesb/trunk/product/samples/quickstarts/business_service/jbossesb-properties.xml
labs/jbossesb/trunk/product/samples/quickstarts/business_service/jbossesb.xml
labs/jbossesb/trunk/product/samples/quickstarts/business_service/jndi.properties
labs/jbossesb/trunk/product/samples/quickstarts/business_service/juddi.properties
labs/jbossesb/trunk/product/samples/quickstarts/business_service/log4j.xml
labs/jbossesb/trunk/product/samples/quickstarts/business_service/readme.txt
Log:
initial check-in
Added: labs/jbossesb/trunk/product/samples/quickstarts/business_service/build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/business_service/build.xml (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/business_service/build.xml 2007-01-30 02:50:22 UTC (rev 9110)
@@ -0,0 +1,155 @@
+<?xml version="1.0"?>
+
+<!-- ======================================================================= -->
+<!-- JBoss build file -->
+<!-- ======================================================================= -->
+
+<project name="Quickstart_business_service" default="run" basedir=".">
+
+ <property file="../quickstarts.properties"/>
+ <property name="jboss.server.config" value="default"/>
+
+ <property name="ejb.dir" value="${basedir}/ejb3" />
+ <property name="ejb.src.dir" value="${ejb.dir}/src"/>
+ <property name="ejb.build.dir" value="${ejb.dir}/build"/>
+ <property name="ejb.build.classes.dir" value="${ejb.build.dir}/classes"/>
+
+ <property name="esb_actions.dir" value="${basedir}/esb_actions" />
+ <property name="esb_actions.src.dir" value="${esb_actions.dir}/src"/>
+ <property name="esb_actions.build.dir" value="${esb_actions.dir}/build"/>
+ <property name="esb_actions.build.classes.dir" value="${esb_actions.build.dir}/classes"/>
+
+ <property name="esb-config" value="${basedir}/jbossesb.xml"/>
+
+ <!-- Build classpath -->
+ <path id="classpath">
+ <!-- So that we can get jndi.properties for InitialContext -->
+ <pathelement location="${basedir}"/>
+
+ <!-- these are for the ESB -->
+ <fileset dir="${esb.product.lib.dir}" includes="*jar"/>
+ <fileset dir="${esb.product.lib.dir}" includes="*xml"/>
+ <fileset dir="${esb.product.lib.dir}/ext" includes="*jar"/>
+ <fileset dir="${jbosshome.dir}/client" includes="*jar"/>
+ <fileset dir="${basedir}" includes="esb_actions/build/**/*.jar"/>
+ <!-- these are for the EJB -->
+ <fileset dir="${jbosshome.dir}/lib">
+ <include name="**/*.jar"/>
+ </fileset>
+ <fileset dir="${jbosshome.dir}/server/${jboss.server.config}/lib">
+ <include name="**/*.jar"/>
+ </fileset>
+ <fileset dir="${jbosshome.dir}/server/${jboss.server.config}/deploy/ejb3.deployer">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="${jbosshome.dir}/server/${jboss.server.config}/deploy/jboss-aop-jdk50.deployer">
+ <include name="*.jar"/>
+ </fileset>
+ <!-- added for WebServices -->
+ <fileset dir="${jbosshome.dir}/server/${jboss.server.config}/deploy/jbossws.sar">
+ <include name="*.jar"/>
+ </fileset>
+ <pathelement location="${ejb.build.classes.dir}"/>
+ </path>
+
+ <property name="build.classpath" refid="classpath"/>
+
+ <property name="cp" refid="classpath"/>
+
+ <target name="echoCP">
+ <echo message="Classpath is ${cp}"/>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Prepares the build directory -->
+ <!-- =================================================================== -->
+ <target name="prepare">
+ <mkdir dir="${ejb.build.dir}"/>
+ <mkdir dir="${ejb.build.classes.dir}"/>
+ <mkdir dir="${esb_actions.build.dir}"/>
+ <mkdir dir="${esb_actions.build.classes.dir}"/>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Compiles the source code -->
+ <!-- =================================================================== -->
+ <target name="ejbcompile" depends="prepare">
+ <javac srcdir="${ejb.src.dir}"
+ destdir="${ejb.build.classes.dir}"
+ debug="on"
+ deprecation="on"
+ optimize="off"
+ includes="**">
+ <classpath refid="classpath"/>
+ </javac>
+ </target>
+
+ <target name="esbcompile" depends="prepare">
+ <javac srcdir="${esb_actions.src.dir}"
+ destdir="${esb_actions.build.classes.dir}">
+ <classpath refid="classpath"/>
+ </javac>
+ </target>
+
+ <target name="ejbjar" depends="ejbcompile">
+ <jar jarfile="${ejb.build.dir}/${ant.project.name}.jar">
+ <fileset dir="${ejb.build.classes.dir}">
+ <include name="**/*.class"/>
+ </fileset>
+ </jar>
+ </target>
+
+ <target name="esbjar" depends="esbcompile">
+ <delete file="${esb_actions.build.dir}/${ant.project.name}_ESB.jar"/>
+ <jar jarfile="${esb_actions.build.dir}/${ant.project.name}_ESB.jar">
+ <fileset dir="${esb_actions.build.classes.dir}">
+ <include name="**/*.class"/>
+ </fileset>
+ </jar>
+ </target>
+
+ <target name="run" depends="esbjar">
+ <echo>Action uses EJB as a business service</echo>
+ <java fork="yes" classname="org.jboss.soa.esb.listeners.StandAloneBootStrapper" failonerror="true">
+ <arg value="${esb-config}"/>
+ <classpath refid="classpath"/>
+ </java>
+ </target>
+
+ <target name="deployejb" depends="ejbjar">
+ <copy file="${ejb.build.dir}/${ant.project.name}.jar" todir="${jbosshome.dir}/server/${jboss.server.config}/deploy"/>
+ </target>
+
+ <target name="testaspojo" depends="ejbcompile">
+ <java classname="org.jboss.tutorial.stateless.client.Client" fork="yes" dir=".">
+ <arg value="-pojo"/>
+ <classpath refid="classpath"/>
+ </java>
+ </target>
+
+ <target name="testasejb" depends="deployejb">
+ <java classname="org.jboss.tutorial.stateless.client.Client" fork="yes" dir=".">
+ <arg value="-ejb"/>
+ <classpath refid="classpath"/>
+ </java>
+ </target>
+
+ <target name="runtest">
+ <echo>Runs Test JMS Sender</echo>
+ <java fork="yes" classname="quickstart.business_service.test.SendJMSMessage" failonerror="true">
+ <arg value="Your Name"/>
+ <classpath refid="classpath"/>
+ </java>
+ </target>
+ <!-- =================================================================== -->
+ <!-- Cleans up generated stuff -->
+ <!-- =================================================================== -->
+ <target name="clean">
+ <delete dir="${ejb.build.dir}"/>
+ <delete dir="${esb_actions.build.dir}"/>
+ <delete file="${jboss.home}/server/${jboss.server.config}/deploy/${ant.project.name}.jar"/>
+ </target>
+
+
+</project>
+
Added: labs/jbossesb/trunk/product/samples/quickstarts/business_service/ejb3/src/org/jboss/tutorial/stateless/bean/HelloWorld.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/business_service/ejb3/src/org/jboss/tutorial/stateless/bean/HelloWorld.java (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/business_service/ejb3/src/org/jboss/tutorial/stateless/bean/HelloWorld.java 2007-01-30 02:50:22 UTC (rev 9110)
@@ -0,0 +1,6 @@
+package org.jboss.tutorial.stateless.bean;
+
+public interface HelloWorld
+{
+ public String sayHello(String toWhom);
+}
Added: labs/jbossesb/trunk/product/samples/quickstarts/business_service/ejb3/src/org/jboss/tutorial/stateless/bean/HelloWorldBean.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/business_service/ejb3/src/org/jboss/tutorial/stateless/bean/HelloWorldBean.java (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/business_service/ejb3/src/org/jboss/tutorial/stateless/bean/HelloWorldBean.java 2007-01-30 02:50:22 UTC (rev 9110)
@@ -0,0 +1,15 @@
+package org.jboss.tutorial.stateless.bean;
+
+import javax.ejb.Stateless;
+import javax.ejb.Remote;
+
+ at Stateless
+ at Remote(HelloWorld.class)
+public class HelloWorldBean
+ implements HelloWorld
+{
+ public String sayHello(String toWhom) {
+ System.out.println("Saying Hello to " + toWhom);
+ return "Hello World: " + toWhom + " " + new java.util.Date();
+ }
+}
Added: labs/jbossesb/trunk/product/samples/quickstarts/business_service/ejb3/src/org/jboss/tutorial/stateless/client/Client.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/business_service/ejb3/src/org/jboss/tutorial/stateless/client/Client.java (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/business_service/ejb3/src/org/jboss/tutorial/stateless/client/Client.java 2007-01-30 02:50:22 UTC (rev 9110)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, the OpenSource J2EE webOS
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.tutorial.stateless.client;
+
+import org.jboss.tutorial.stateless.bean.HelloWorld;
+import org.jboss.tutorial.stateless.bean.HelloWorldBean;
+
+import javax.naming.InitialContext;
+
+public class Client
+{
+ public static void main(String[] args) throws Exception
+ {
+ // Store a reference to the calculator interface
+ HelloWorld hw = null;
+
+ // Decide whether to use a POJO or connect to an EJB
+ if (args.length != 1)
+ {
+ System.err.println("Usage: java org.jboss.tutorial.client.Client [-pojo|-ejb]");
+ System.exit(1);
+ }
+ else if (args[0].equals("-pojo"))
+ {
+ // Simply create a new POJO to act as the HelloWorld
+ System.out.println("Creating a new HelloWorldBean POJO");
+ hw = new HelloWorldBean();
+ }
+ else if (args[0].equals("-ejb"))
+ {
+ // Obtain an initial context
+ InitialContext ctx = new InitialContext();
+
+ // Look up a remote interface to a calculator EJB
+ System.out.println("Obtaining a reference to a remote HelloWorldBean EJB");
+ hw = (HelloWorld) ctx.lookup("HelloWorldBean/remote");
+ }
+ else
+ {
+ System.err.println("Usage: java org.jboss.tutorial.client.Client [-pojo|-ejb]");
+ System.exit(1);
+ }
+
+ if (hw != null)
+ {
+ System.out.println("[Client] " + hw.sayHello("JBoss"));
+ }
+ }
+}
Added: labs/jbossesb/trunk/product/samples/quickstarts/business_service/esb_actions/src/quickstart/business_service/MyAction.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/business_service/esb_actions/src/quickstart/business_service/MyAction.java (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/business_service/esb_actions/src/quickstart/business_service/MyAction.java 2007-01-30 02:50:22 UTC (rev 9110)
@@ -0,0 +1,60 @@
+package quickstart.business_service;
+
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Body;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.tutorial.stateless.bean.HelloWorld;
+import javax.naming.InitialContext;
+
+public class MyAction
+{
+
+ protected ConfigTree _config;
+
+ public MyAction(ConfigTree config) { _config = config; }
+
+ public Message noOperation(Message message) { return message; }
+
+ public Message displayMessage(Message message) throws Exception{
+ logHeader();
+ System.out.println("Body: " + new String(message.getBody().getContents()));
+ logFooter();
+ return message;
+ }
+
+ public Message playWithMessage(Message message) throws Exception {
+ Body msgBody = message.getBody();
+ String results = new String();
+ String contents = new String(msgBody.getContents());
+ try {
+ InitialContext ctx = new InitialContext();
+
+ HelloWorld client = (HelloWorld) ctx.lookup("HelloWorldBean/remote");
+ results = client.sayHello(contents);
+ System.out.println("Invoked EJB3: " + results);
+ } catch (Exception e) {
+ System.out.println(e);
+ }
+ msgBody.setContents(results.getBytes());
+ return message;
+ }
+
+ public void exceptionHandler(Message message, Throwable exception) {
+ logHeader();
+ System.out.println("!ERROR!");
+ System.out.println(exception.getMessage());
+ System.out.println("For Message: ");
+ System.out.println(message.getBody().getContents());
+ logFooter();
+ }
+
+ // This makes it easier to read on the console
+ private void logHeader() {
+ System.out.println("\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
+ }
+ private void logFooter() {
+ System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&\n");
+ }
+
+
+}
\ No newline at end of file
Added: labs/jbossesb/trunk/product/samples/quickstarts/business_service/esb_actions/src/quickstart/business_service/test/SendJMSMessage.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/business_service/esb_actions/src/quickstart/business_service/test/SendJMSMessage.java (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/business_service/esb_actions/src/quickstart/business_service/test/SendJMSMessage.java 2007-01-30 02:50:22 UTC (rev 9110)
@@ -0,0 +1,56 @@
+package quickstart.business_service.test;
+
+import javax.jms.JMSException;
+import javax.jms.ObjectMessage;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.QueueSender;
+import javax.jms.QueueSession;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+public class SendJMSMessage {
+ QueueConnection conn;
+ QueueSession session;
+ Queue que;
+
+
+ public void setupConnection() throws JMSException, NamingException
+ {
+ InitialContext iniCtx = new InitialContext();
+ Object tmp = iniCtx.lookup("ConnectionFactory");
+ QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
+ conn = qcf.createQueueConnection();
+ que = (Queue) iniCtx.lookup("queue/quickstart_helloworld_action_Request");
+ session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+ conn.start();
+ System.out.println("Connection Started");
+ }
+
+ public void stop() throws JMSException
+ {
+ conn.stop();
+ session.close();
+ conn.close();
+ }
+
+ public void sendAMessage(String msg) throws JMSException {
+
+ QueueSender send = session.createSender(que);
+ ObjectMessage tm = session.createObjectMessage(msg);
+ send.send(tm);
+ send.close();
+ }
+
+
+ public static void main(String args[]) throws Exception
+ {
+ SendJMSMessage sm = new SendJMSMessage();
+ sm.setupConnection();
+ sm.sendAMessage(args[0]);
+ sm.stop();
+
+ }
+
+}
\ No newline at end of file
Added: labs/jbossesb/trunk/product/samples/quickstarts/business_service/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/business_service/jbossesb-properties.xml (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/business_service/jbossesb-properties.xml 2007-01-30 02:50:22 UTC (rev 9110)
@@ -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>
Added: labs/jbossesb/trunk/product/samples/quickstarts/business_service/jbossesb.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/business_service/jbossesb.xml (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/business_service/jbossesb.xml 2007-01-30 02:50:22 UTC (rev 9110)
@@ -0,0 +1,64 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.xsd http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.xsd"
+ xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.xsd"
+ parameterReloadSecs="5">
+
+ <providers>
+ <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
+ jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
+ jndi-URL="localhost" >
+
+ <jms-bus busid="quickstartGwChannel">
+ <jms-message-filter
+ dest-type="QUEUE"
+ dest-name="queue/quickstart_helloworld_action_Request"
+ />
+ </jms-bus>
+ <jms-bus busid="quickstartEsbChannel">
+ <jms-message-filter
+ dest-type="QUEUE"
+ dest-name="queue/B"
+ />
+ </jms-bus>
+
+ </jms-provider>
+ </providers>
+
+ <services>
+
+ <service category="HelloWorld_ActionESB"
+ name="SimpleListener"
+ description="Hello World" >
+ <listeners>
+ <jms-listener name="JMS-Gateway"
+ busidref="quickstartGwChannel"
+ maxThreads="1"
+ is-gateway="true"
+ />
+ <jms-listener name="JMS-ESBListener"
+ busidref="quickstartEsbChannel"
+ maxThreads="1"
+ />
+ </listeners>
+ <actions>
+ <action name="displayAction"
+ class="quickstart.business_service.MyAction"
+ process="displayMessage">
+ <property name="exceptionMethod" value="exceptionHandler"/>
+ </action>
+ <action name="playAction"
+ class="quickstart.business_service.MyAction"
+ process="playWithMessage">
+ <property name="exceptionMethod" value="exceptionHandler"/>
+ </action>
+ <action name="displayAction"
+ class="quickstart.business_service.MyAction"
+ process="displayMessage">
+ <property name="exceptionMethod" value="exceptionHandler"/>
+ </action>
+ </actions>
+ </service>
+ </services>
+
+</jbossesb>
Added: labs/jbossesb/trunk/product/samples/quickstarts/business_service/jndi.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/business_service/jndi.properties (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/business_service/jndi.properties 2007-01-30 02:50:22 UTC (rev 9110)
@@ -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
+
Added: labs/jbossesb/trunk/product/samples/quickstarts/business_service/juddi.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/business_service/juddi.properties (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/business_service/juddi.properties 2007-01-30 02:50:22 UTC (rev 9110)
@@ -0,0 +1,69 @@
+# jUDDI Registry Properties (used by RegistryServer)
+# see http://www.juddi.org for more information
+
+# The UDDI Operator Name
+juddi.operatorName = jUDDI.org
+
+# The i18n locale default codes
+juddi.i18n.languageCode = en
+juddi.i18n.countryCode = US
+
+# The UDDI DiscoveryURL Prefix
+juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
+
+# The UDDI Operator Contact Email Address
+juddi.operatorEmailAddress = admin at juddi.org
+
+# The maximum name size and maximum number
+# of name elements allows in several of the
+# FindXxxx and SaveXxxx UDDI functions.
+juddi.maxNameLength=255
+juddi.maxNameElementsAllowed=5
+
+# The maximum number of UDDI artifacts allowed
+# per publisher. A value of '-1' indicates any
+# number of artifacts is valid (These values can be
+# overridden at the individual publisher level).
+juddi.maxBusinessesPerPublisher=25
+juddi.maxServicesPerBusiness=20
+juddi.maxBindingsPerService=10
+juddi.maxTModelsPerPublisher=100
+
+# jUDDI Authentication module to use
+juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
+
+# jUDDI DataStore module currently to use
+juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
+
+# use a dataSource (if set to false a direct
+# jdbc connection will be used.
+juddi.isUseDataSource=false
+juddi.jdbcDriver=com.mysql.jdbc.Driver
+juddi.jdbcUrl=jdbc:mysql://localhost:3306/juddi
+juddi.jdbcUsername=root
+juddi.jdbcPassword=admin
+# jUDDI DataSource to use
+# juddi.dataSource=java:comp/env/jdbc/MySqlDS
+
+# jUDDI UUIDGen implementation to use
+juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
+
+# jUDDI Cryptor implementation to use
+juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
+
+# jUDDI Validator to use
+juddi.validator=org.apache.juddi.validator.DefaultValidator
+
+# jUDDI Proxy Properties (used by RegistryProxy)
+juddi.proxy.adminURL = http://localhost:8080/juddi/admin
+juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
+juddi.proxy.publishURL = http://localhost:8080/juddi/publish
+juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
+juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
+juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
+
+# JNDI settings (used by RMITransport)
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+
Added: labs/jbossesb/trunk/product/samples/quickstarts/business_service/log4j.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/business_service/log4j.xml (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/business_service/log4j.xml 2007-01-30 02:50:22 UTC (rev 9110)
@@ -0,0 +1,78 @@
+<?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"/>
+
+ <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="INFO"/>
+ </category>
+ <!-- ======================= -->
+ <!-- Setup the Root category -->
+ <!-- ======================= -->
+
+ <root>
+ <appender-ref ref="CONSOLE"/>
+ <appender-ref ref="FILE"/>
+ </root>
+
+</log4j:configuration>
Added: labs/jbossesb/trunk/product/samples/quickstarts/business_service/readme.txt
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/business_service/readme.txt (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/business_service/readme.txt 2007-01-30 02:50:22 UTC (rev 9110)
@@ -0,0 +1,54 @@
+Overview:
+=========
+ This example demonstrates the how to access an EJB3 Stateless Session Bean
+ from within an ESB Action. ESB Actions are primarily custom mediation
+ components. They allow you to introduce different specialized transformations,
+ routing behaviors, orchestration, etc. The EJB3 is a simple "Hello World"
+ annotated POJO.
+
+Before Running:
+===============
+1. Update the "jbosshome.dir" property in the quickstarts.properties file in "../".
+2. Make sure the jbossesb.sar is deployed on your JBoss Application Server.
+ In the ESB "install" folder update deployment.properties and then run "ant".
+ This example does require you to use a version for 4.0.4+ with the EJB3 profile.
+3. Make sure the JBoss Application server is running.
+4. Make sure you have deployed the JMS destinations described in the
+ esb-quickstart-service.xml by dropping this file into the JBoss AS deploy directory.
+5. Note: This example doesn't have a deployToSAR task at this time.
+
+
+To Run:
+=======
+1. In the first command window, execute "ant". This will compile the project, build
+the needed jars and deploy the EJB3 component to the Application Server. If you are
+monitoring the Application Server console you will see it hot deploy the EJB3 jar.
+2. In a second command window, execute "ant runtest". You will see the ESB console
+(the first command window) display:
+ [echo] Action uses EJB as a business service
+
+ [java] &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
+ [java] Body: Your Name
+ [java] &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
+
+ [java] Invoked EJB3: Hello World: Your Name Mon Jan 29 21:41:23 EST 2007
+
+ [java] &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
+ [java] Body: Hello World: Your Name Mon Jan 29 21:41:23 EST 2007
+ [java] &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
+
+You should also notice the following on the Application Server console window:
+ 21:41:23,515 INFO [STDOUT] Saying Hello to Your Name
+
+What to look at in this Quickstart:
+===================================
+The EJB3 POJO is very simple and the build.xml also includes tasks for testing the EJB3
+standalone apart from the ESB. You can execute "ant testasejb" to test the EJB3
+component by itself.
+The action is also very simple:
+ InitialContext ctx = new InitialContext();
+
+ HelloWorld client = (HelloWorld) ctx.lookup("HelloWorldBean/remote");
+ results = client.sayHello(contents);
+
+
\ No newline at end of file
More information about the jboss-svn-commits
mailing list