| Commit in servicemix/base/src/main/release/examples/bpel on MAIN | |||
| activemq.xml | +69 | added 1.1 | |
| message.soap | +238 | added 1.1 | |
| jndi.xml | +23 | added 1.1 | |
| README.txt | +14 | added 1.1 | |
| servicemix.xml | +51 | added 1.1 | |
| carol.properties | +1 | added 1.1 | |
| build.xml | +35 | added 1.1 | |
| JMSClient.java | +66 | added 1.1 | |
| jndi.properties | +1 | added 1.1 | |
| install/AsyncProcess-sa.jar | [binary] | added 1.1 | |
| /pxe-install.jar | [binary] | added 1.1 | |
| +498 | |||
bpel example
servicemix/base/src/main/release/examples/bpel
activemq.xml added at 1.1
diff -N activemq.xml --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ activemq.xml 1 Aug 2005 07:13:29 -0000 1.1 @@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE beans PUBLIC "-//ACTIVEMQ//DTD//EN" "http://activemq.org/dtd/activemq.dtd"> +<beans> + + <!-- ==================================================================== --> + <!-- ActiveMQ Broker Configuration --> + <!-- ==================================================================== --> + <broker> + <connector> + <tcpServerTransport uri="tcp://localhost:61616" backlog="1000" useAsyncSend="true" maxOutstandingMessages="50"/> + </connector> + + <persistence> + <cachePersistence> + <journalPersistence directory="../var/journal"> + <jdbcPersistence dataSourceRef="derby-ds"/> + </journalPersistence> + </cachePersistence> + </persistence> + </broker> + + <!-- ==================================================================== --> + <!-- JDBC DataSource Configurations --> + <!-- ==================================================================== --> + + <!-- The Derby Datasource that will be used by the Broker --> + <bean id="derby-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> + <property name="driverClassName"> + <value>org.apache.derby.jdbc.EmbeddedDriver</value> + </property> + <property name="url"> + <!-- Use a URL like 'jdbc:hsqldb:hsql://localhost:9001' if you want to connect to a remote hsqldb --> + <value>jdbc:derby:derbydb;create=true</value> + </property> + <property name="username"> + <value></value> + </property> + <property name="password"> + <value></value> + </property> + <property name="poolPreparedStatements"> + <value>true</value> + </property> + </bean> + + <!-- The MYSQL Datasource that will be used by the Broker --> + <bean id="mysql-ds" + class="org.apache.commons.dbcp.BasicDataSource" + destroy-method="close"> + <property name="driverClassName"> + <value>com.mysql.jdbc.Driver</value> + </property> + <property name="url"> + <value>jdbc:mysql://localhost/activemq</value> + </property> + <property name="username"> + <value>myname</value> + </property> + <property name="password"> + <value>mypassword</value> + </property> + <property name="poolPreparedStatements"> + <value>true</value> + </property> + </bean> + + +</beans> +
servicemix/base/src/main/release/examples/bpel
message.soap added at 1.1
diff -N message.soap --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ message.soap 1 Aug 2005 07:13:29 -0000 1.1 @@ -0,0 +1,238 @@
+<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> + <SOAP-ENV:Body> + <AllOrders xmlns="uri:com.bptest.types"> + <Order > + <OrderId>$sequence$</OrderId> + <OrderType>BookOrder</OrderType> + <OrderDetails> + <BookOrder> + <id>$sequence$</id> + <author>John Doe</author> + <isbn>abc</isbn> + <title>The World of John Doe</title> + <pages>10</pages> + <price>25</price> + <level>advanced</level> + <publisher>Kaufmann Books and Papers</publisher> + <reviewer>Joe Doe</reviewer> + <coauthor>Mary Doe</coauthor> + <foreword>This is a gripping book $string$</foreword> + <summary>An autobiographical book about John Doe</summary> + <binding>Hardbound</binding> + <copyright>John Doe and Kaufmann Publishers</copyright> + <webvisible>http://www.example.com/johndoe</webvisible> + <legacy>no</legacy> + <specialorder>no</specialorder> + <printingtype>ondemand</printingtype> + <inktype>black toner</inktype> + </BookOrder> + </OrderDetails> + <TrackingNumber/> + </Order> + + <Order> + <OrderId>$sequence$</OrderId> + <OrderType>PaperOrder</OrderType> + <OrderDetails> + <PaperOrder> + <id>$sequence$</id> + <author>John Doe</author> + <isbn>BOOK</isbn> + <title>The World of John Doe</title> + <pages>10</pages> + <price>25</price> + <level>advanced</level> + <publisher>Kaufmann Books and Papers</publisher> + <reviewer>Joe Doe</reviewer> + <coauthor>Mary Doe</coauthor> + <foreword>This is a gripping book</foreword> + <summary>An autobiographical book about John Doe</summary> + <binding>Hardbound</binding> + <copyright>John Doe and Kaufmann Publishers</copyright> + <webvisible>http://www.example.com/johndoe</webvisible> + <legacy>no</legacy> + <specialorder>no</specialorder> + <printingtype>ondemand</printingtype> + <inktype>black toner</inktype> + </PaperOrder> + </OrderDetails> + <TrackingNumber/> + </Order> + + <Order> + <OrderId>$sequence$</OrderId> + <OrderType>BookOrder</OrderType> + <OrderDetails> + <BookOrder> + <id>$sequence$</id> + <author>John Doe</author> + <isbn>BOOK</isbn> + <title>The World of John Doe</title> + <pages>10</pages> + <price>25</price> + <level>advanced</level> + <publisher>Kaufmann Books and Papers</publisher> + <reviewer>Joe Doe</reviewer> + <coauthor>Mary Doe</coauthor> + <foreword>This is a gripping book</foreword> + <summary>An autobiographical book about John Doe</summary> + <binding>Hardbound</binding> + <copyright>John Doe and Kaufmann Publishers</copyright> + <webvisible>http://www.example.com/johndoe</webvisible> + <legacy>no</legacy> + <specialorder>no</specialorder> + <printingtype>ondemand</printingtype> + <inktype>black toner</inktype> + </BookOrder> + </OrderDetails> + <TrackingNumber/> + </Order> + + <Order> + <OrderId>$sequence$</OrderId> + <OrderType>PaperOrder</OrderType> + <OrderDetails> + <PaperOrder> + <id>$sequence$</id> + <author>John Doe</author> + <isbn>BOOK</isbn> + <title>The World of John Doe</title> + <pages>10</pages> + <price>25</price> + <level>advanced</level> + <publisher>Kaufmann Books and Papers</publisher> + <reviewer>Joe Doe</reviewer> + <coauthor>Mary Doe</coauthor> + <foreword>This is a gripping book</foreword> + <summary>An autobiographical book about John Doe</summary> + <binding>Hardbound</binding> + <copyright>John Doe and Kaufmann Publishers</copyright> + <webvisible>http://www.example.com/johndoe</webvisible> + <legacy>no</legacy> + <specialorder>no</specialorder> + <printingtype>ondemand</printingtype> + <inktype>black toner</inktype> + </PaperOrder> + </OrderDetails> + <TrackingNumber/> + </Order> + + <Order> + <OrderId>$sequence$</OrderId> + <OrderType>BookOrder</OrderType> + <OrderDetails> + <BookOrder> + <id>$sequence$</id> + <author>John Doe</author> + <isbn>$rowid$-BOOK-$rowid$</isbn> + <title>The World of John Doe</title> + <pages>30</pages> + <price>25</price> + <level>advanced</level> + <publisher>Kaufmann Books and Papers</publisher> + <reviewer>Joe Doe</reviewer> + <coauthor>Mary Doe</coauthor> + <foreword>This is a gripping book $string$</foreword> + <summary>An autobiographical book about John Doe</summary> + <binding>Hardbound</binding> + <copyright>John Doe and Kaufmann Publishers</copyright> + <webvisible>http://www.example.com/johndoe</webvisible> + <legacy>no</legacy> + <specialorder>no</specialorder> + <printingtype>ondemand</printingtype> + <inktype>black toner</inktype> + </BookOrder> + </OrderDetails> + <TrackingNumber/> + </Order> + + <Order> + <OrderId>$sequence$</OrderId> + <OrderType>PaperOrder</OrderType> + <OrderDetails> + <PaperOrder> + <id>$sequence$</id> + <author>John Doe</author> + <isbn>BOOK</isbn> + <title>The World of John Doe</title> + <pages>900</pages> + <price>25</price> + <level>advanced</level> + <publisher>Kaufmann Books and Papers</publisher> + <reviewer>Joe Doe</reviewer> + <coauthor>Mary Doe</coauthor> + <foreword>This is a gripping book</foreword> + <summary>An autobiographical book about John Doe</summary> + <binding>Hardbound</binding> + <copyright>John Doe and Kaufmann Publishers</copyright> + <webvisible>http://www.example.com/johndoe</webvisible> + <legacy>no</legacy> + <specialorder>no</specialorder> + <printingtype>ondemand</printingtype> + <inktype>black toner</inktype> + </PaperOrder> + </OrderDetails> + <TrackingNumber/> + </Order> + + <Order> + <OrderId>$sequence$</OrderId> + <OrderType>BookOrder</OrderType> + <OrderDetails> + <BookOrder> + <id>$sequence$</id> + <author>John Doe</author> + <isbn>BOOK</isbn> + <title>The World of John Doe</title> + <pages>15</pages> + <price>25</price> + <level>advanced</level> + <publisher>Kaufmann Books and Papers</publisher> + <reviewer>Joe Doe</reviewer> + <coauthor>Mary Doe</coauthor> + <foreword>This is a gripping book</foreword> + <summary>An autobiographical book about John Doe</summary> + <binding>Hardbound</binding> + <copyright>John Doe and Kaufmann Publishers</copyright> + <webvisible>http://www.example.com/johndoe</webvisible> + <legacy>no</legacy> + <specialorder>no</specialorder> + <printingtype>ondemand</printingtype> + <inktype>black toner</inktype> + </BookOrder> + </OrderDetails> + <TrackingNumber/> + </Order> + + <Order> + <OrderId>$sequence$</OrderId> + <OrderType>PaperOrder</OrderType> + <OrderDetails> + <PaperOrder> + <id>$sequence$</id> + <author>John Doe</author> + <isbn>BOOK</isbn> + <title>The World of John Doe</title> + <pages>900</pages> + <price>25</price> + <level>advanced</level> + <publisher>Kaufmann Books and Papers</publisher> + <reviewer>Joe Doe</reviewer> + <coauthor>Mary Doe</coauthor> + <foreword>This is a gripping book</foreword> + <summary>An autobiographical book about John Doe</summary> + <binding>Hardbound</binding> + <copyright>John Doe and Kaufmann Publishers</copyright> + <webvisible>http://www.example.com/johndoe</webvisible> + <legacy>no</legacy> + <specialorder>no</specialorder> + <printingtype>ondemand</printingtype> + <inktype>black toner</inktype> + </PaperOrder> + </OrderDetails> + <TrackingNumber/> + </Order> + </AllOrders> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope>
servicemix/base/src/main/release/examples/bpel
jndi.xml added at 1.1
diff -N jndi.xml --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ jndi.xml 1 Aug 2005 07:13:29 -0000 1.1 @@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> +<!-- START SNIPPET: jndi --> +<beans> + <bean id="jndi" class="org.servicemix.jbi.jndi.DefaultContext" singleton="true"> + <property name="entries"> + <map> + <entry key="jdbc/pxe__pm"> + <bean class="org.hsqldb.jdbc.jdbcDataSource"> + <property name="database" value="jdbc:hsqldb:mem:pxe"/> + <property name="user" value = "sa"/> + <property name="password" value = ""/> + </bean> + </entry> + + <entry key="javax.transaction.TransactionManager"> + <bean class="org.springframework.transaction.jta.JotmFactoryBean"/> + </entry> + </map> + </property> + </bean> +</beans> +<!-- END SNIPPET: jndi -->
servicemix/base/src/main/release/examples/bpel
README.txt added at 1.1
diff -N README.txt --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ README.txt 1 Aug 2005 07:13:29 -0000 1.1 @@ -0,0 +1,14 @@
+Welcome to the ServiceMixBPEL Example +============================================= + +This example uses shows how to connect the JMS bindings to a BPEL service component provided by the PXE AsyncProcess example - see www.fivesight.com + +To start the servicemix server using the sample configuration, just run: + +../../bin/servicemix servicemix.xml + +This will start a component which sends a soap message to a JmsServiceComponent which forwards the request to the PXE BPEL engine and waits for a response. + +A simple JMS client is provided so that messages can sent and received from the JMSService. The client is built +and run from source using Ant, http://ant.apache.org. Just execute 'ant' from the current directory to +run the JMS client.
\ No newline at end of file
servicemix/base/src/main/release/examples/bpel
servicemix.xml added at 1.1
diff -N servicemix.xml --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ servicemix.xml 1 Aug 2005 07:13:29 -0000 1.1 @@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?> +<beans xmlns:pxe="uri:fivesight.com/examples/AsyncProcessJBI"> + + <!-- the JBI container --> + <container id="jbi"> + <property name="rootDir" value="./wdir"/> + <property name="createMBeanServer" value="true"/> + <property name="installationDirPath" value="./install"/> + <property name="monitorInstallationDirectory" value="true"/> + <property name="dumpStats" value="true"/> + <property name="statsInterval" value="10"/> + <property name="transactionManager" ref="transactionManager"/> + + <components> + + + <!-- Subscribe to a JMS destination --> + <component id="inputService" service="pxe:JmService" class="org.servicemix.components.jms.JmsServiceComponent" destinationService="pxe:ProcessSVC"> + <property name="template"> + <bean class="org.springframework.jms.core.JmsTemplate"> + <property name="connectionFactory"> + <ref local="jmsFactory"/> + </property> + <property name="defaultDestinationName" value="demo.org.servicemix.source"/> + <property name="pubSubDomain" value="true"/> + </bean> + </property> + </component> + </components> + </container> + + + + <!-- message broker --> + <bean id="broker" class="org.activemq.spring.BrokerFactoryBean"> + <property name="config" value="classpath:activemq.xml"/> + </bean> + + <bean id="transactionManager" class="org.springframework.transaction.jta.JotmFactoryBean"/> + + <bean id="jmsFactory" class="org.activemq.pool.PooledConnectionFactory"> + <property name="connectionFactory"> + <bean class="org.activemq.ActiveMQConnectionFactory"> + <property name="brokerURL"> + <value>tcp://localhost:61616</value> + </property> + </bean> + </property> + </bean> + +</beans>
servicemix/base/src/main/release/examples/bpel
carol.properties added at 1.1
diff -N carol.properties --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ carol.properties 1 Aug 2005 07:13:29 -0000 1.1 @@ -0,0 +1 @@
+carol.start.jndi=false
\ No newline at end of file
servicemix/base/src/main/release/examples/bpel
build.xml added at 1.1
diff -N build.xml --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ build.xml 1 Aug 2005 07:13:29 -0000 1.1 @@ -0,0 +1,35 @@
+<project name="jms-binding" default="run" basedir=".">
+
+ <property name="class.dir" value="classes"/>
+
+ <target name="clean">
+ <delete dir="target" quiet="true"/>
+ <delete dir="${class.dir}" quiet="true"/>
+ </target>
+
+ <target name="init">
+ <mkdir dir="${class.dir}"/>
+ <mkdir dir="src/ddl"/>
+
+ <path id="javac.classpath">
+ <pathelement path="${class.dir}"/>
+ <fileset dir="../../lib">
+ <include name="**/*.jar"/>
+ </fileset>
+ </path>
+ </target>
+
+ <target name="compile" depends="init" description="Compile all Java">
+ <javac srcdir="." destdir="${class.dir}">
+ <classpath refid="javac.classpath"/>
+ </javac>
+ </target>
+
+ <target name="run" depends="compile" description="Runs the example client">
+ <echo>Running exsample client</echo>
+ <java classname="JMSClient" fork="yes" maxmemory="100M">
+ <classpath refid="javac.classpath"/>
+ </java>
+ </target>
+
+</project>
servicemix/base/src/main/release/examples/bpel
JMSClient.java added at 1.1
diff -N JMSClient.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ JMSClient.java 1 Aug 2005 07:13:29 -0000 1.1 @@ -0,0 +1,66 @@
+/**
+ *
+ * Copyright 2005 RAJD Consultanct Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ **/
+import java.io.BufferedReader;
+import java.io.FileReader;
+import javax.jms.Message;
+import javax.jms.Session;
+import javax.jms.TopicConnection;
+import javax.jms.TopicRequestor;
+import javax.jms.TopicSession;
+import org.activemq.ActiveMQConnectionFactory;
+import org.activemq.message.ActiveMQTopic;
+
+/**
+ * @version $Revision: 1.1 $
+ */
+public class JMSClient {
+ /**
+ * main ...
+ * @param args
+ * @throws Exception
+ */
+ public static void main(String[] args) throws Exception {
+ ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("tcp://localhost:61616");
+ ActiveMQTopic pubTopic = new ActiveMQTopic("demo.org.servicemix.source");
+ System.out.println("Connecting to JMS server.");
+ TopicConnection connection = factory.createTopicConnection();
+ TopicSession session = connection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
+ connection.start();
+ TopicRequestor requestor = new TopicRequestor(session, pubTopic);
+ System.out.println("Sending request.");
+ String payload = "";
+ BufferedReader reader = new BufferedReader(new FileReader("message.soap"));
+ String str = null;
+ while ((str = reader.readLine()) != null) {
+ payload += str;
+ }
+ Message out = session.createTextMessage(payload);
+ //set the specific operation for PXE to do ...
+ out.setStringProperty("opNameSpace", "uri:fivesight.com/examples/AsyncProcessJBI");
+ out.setStringProperty("opLocalPart","invoke");
+ Message in = requestor.request(out);
+ if (in == null) {
+ System.out.println("Response timed out.");
+ }
+ else {
+ System.out.println("Response was: " + in);
+ }
+ System.out.println("Closing.");
+ connection.close();
+ }
+}
servicemix/base/src/main/release/examples/bpel
jndi.properties added at 1.1
diff -N jndi.properties --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ jndi.properties 1 Aug 2005 07:13:29 -0000 1.1 @@ -0,0 +1 @@
+java.naming.factory.initial = org.servicemix.jbi.jndi.SpringInitialContextFactory
