此内容没有您所选择的语言版本。
Chapter 4. An Introductory Tutorial
Introduction
The "BPEL ESB Hello World" quickstart demonstrates how an ESB service can directly invoke a BPEL process, provided that:
- The BPEL engine and the ESB are located in the same JVM
- The invoked BPEL process is deployed to the BPEL engine instance running on the same ESB.
4.2. Deploy the "BPEL ESB Hello World" Quickstart 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
Procedure 4.1. Deploy the "BPEL ESB Hello World" Quickstart
- Check that the JBoss Enterprise SOA Platform server is running.
- Navigate to the directory containing the quickstarts:
cd SOA_ROOT/samples/quickstarts/bpel_helloworld(orchdir SOA_ROOT\samples\quickstarts\bpel_helloworldin Microsoft Windows). - Deploy the quickstart by running
ant deploy. - Execute the quickstart by running
ant runtest.
Result
This command will send the text "Hello World via ESB to BPEL" to the ESB service, which will invoke the BPEL process. This in turn will append "Hello World" to the text and echo it back until it is received by the client application.
4.3. Quickstart 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
The quickstarts are sample projects. Each one demonstrates how to use a specific piece of functionality in order to aid you in building services. There are several dozen quickstarts included in the
SOA_ROOT/jboss-as/samples/quickstarts/ directory. Build and deploy every quickstart by using Apache Ant.
4.4. ant deploy 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
ant deploy compiles a quickstart's source code in the build directory, then generates an .ESB file (such as Quickstart_helloworld.esb) in the server profile's deploy directory. (Note that it generates .JAR files for BPEL quickstarts.) The server detects the presence of the new .esb archive and deploys it. In the .ESB archive is a deployment.xml file that ant deploy uses to configure a queue.
ant deploy also uses an XSL template to transform generic JMS queue names into the specific JMS queues needed by the target server's messaging provider. Ant selects the correct messaging provider by examining the server for a messaging provider deployment. Only JBoss Messaging, JBoss MQ, and HornetQ are detected by the build script. Other messaging providers are not supported by the quick start. Ant then puts the deployment.xml file into the build/META-INF directory before including it in the same .ESB archive as the rest of the quickstart.
4.5. ant runtest 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
ant runtest sends an ESB-unaware "Hello World" message (which is a plain String object) to the JMS Queue (queue/quickstart_helloworld_Request_gw). It instructs Java to run the sender class (in the case of the "Hello World" quick start, this is called org.jboss.soa.esb.samples.quickstart.helloworld.test.sendJMSMessage). By doing so, it sends a message directly to the deployed process.