...
- Java Standard Edition 5.0
- Ant - http://ant.apache.org
- PXE - We support WS-BPEL via the PXE BPEL Engine from FiveSight.
Warning title Warning Note that NOTE: ServiceMix works on any Java SE 1.4 or later environment; however to use PXE you need to use a Java SE 5 or later platform is required. Before running this demoexample, use Java 1.5 to startup start up ServiceMix.
Running the BPEL Example
Before running this example, the following setup must be done. PXE has a JBI component and deployment unit, which can be auto-deployed in any JBI compliant container, in this case ServiceMix. To use PXE with ServiceMix, the PXE deployment unit must be placed in the install
directory so it will be auto-deployed in ServiceMix. NoteNOTE: The PXE deployment unit has already been put placed into the install
directory for you - take a look at the servicemix_install_dir\examples\bpel\install
directory to see the PXE jar file.
...
- From a command shell, go to the BPEL example directory:
whereCode Block cd [servicemix_install_dir]\examples\bpel
servicemix_install_dir
is the directory in which ServiceMix was installed. - Then type:
Code Block [servicemix_install_dir]\bin\servicemix servicemix.xml OR ..\..\bin\servicemix servicemix.xml
- To trigger the BPEL business process, send it some messages. To do this, compile and run a simple JMS client. The client is built and run from source code using Ant. Execute ant Ant from the BPEL directory:
servicemix_install_dir\examples\bpel
. To run the JMS client type:Code Block ant
Ant will compile and run the simple JMS client, JMSClient, which performs a JMS based request-response into the ServiceMix container before returning the results to the console.
...
The diagram below illustrates the logical flow of the program through the BPEL components.:
Panel | ||||||
---|---|---|---|---|---|---|
| ||||||
...
The following table provides more details about the function of each component and bean in the servicemix.xml
file. :
Component or Bean ID | Description |
---|---|
jbi | jbi is the "id" of the JBI container and provides the basic infrastructure services for myComponent. During initialization, several singletons are instantiated: transactionManager, broker, jmsFactory, and jbi. Also, take note of the properties installationDirPath and deploymentDirPath defined in |
JMSClient | This Java standalone program, through the ActiveMQConnectionFactory, connects to topic "demo.org.servicemix.source." It then creates a text message from the file |
myComponent | This JMS service component subscribes to the "demo.org.servicemix.source" topic via its defaultDestinationName property specified in the |
jndi | This bean loads up database and transaction manager resources, which will be used by the other components in the system. More importantly, the JNDI context must be configured so that PXE can be deployed. |
Pxe-install.jar | This jarfile is located in the |
AsyncProcess-sa.jar | This jarfile is located in the |
broker | The broker bean uses the |
transactionManager | This bean is configured to be the default transaction manager for the jbi container. This transaction manager provides transactional services between the resource adapter (in this case the ActiveMQ resource adapter provided by the jencks JCA container) and components in the jbi container. |
jmsFactory | This bean listens on port 61616 and provides a pooled ActiveMQ connection. |
...