Abstract | This example contains sample source code for a user-defined Program Execution Server (UPES) implementation with JMS, which invokes an EJB. |
This example shows ... |
|
You can use this example ... |
|
Minimum MQWF version required |
|
Other required products |
|
Description |
This sample contains a complete Workflow scenario, that is, an Entity Bean is created, incrementing its counter in a loop until it reaches the value of 3 and finally the EJB is removed. All activities are implemented using the same UPES, which acts as a dispatcher and executes the command that is retrieved from the input XML message. The value of the bean counter is then written to the output XML message. This value is used to validate the exit condition for the second activity. The last activity shuts down the UPES. The EJB that is invoked here is the HitCount Bean which is installed by default with WebSphere. Because it is already deployed, you only have to start it. This UPES sample focuses on the EJB invocation. If you need a sample with a more sophisticated XML parsing using a DOM tree, refer to the Distributed process sample using XML, which can be installed from the IBM WebSphere MQ Workflow product CD and check the <MQWF_Root>\SMP\DPXML\readme.html file, where <MQWF_Root> is the directory into which you installed IBM WebSphere MQ Workflow. The EJB invocation via the UPES supports transactions, but offers no possibility to retrieve the meta model of the containers. The meta model can be retrieved when you invoke EJBs via the PEA. The configuration files referred to below are available only for Windows NT (or Windows 2000), WebSphere and MQSeries, but the Java code is not dependent on the operating system, EJB container, or JMS provider. It respects the EJB 1.1 and JMS 1.0.2 standards. |
Setup |
To prepare the sample, follow these steps:
|
Running the sample |
To run the sample, perform the following steps:
unregister_upes.cmd .
|
View source code | IncrementEJBPea.java IncrementEJBUpes.html (Javadoc) |