Abstract | This example contains sample source code for a program that implements an activity, 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 three activities are implemented using the same program, which acts as a dispatcher and executes the command that is retrieved from the input container. The value of the bean counter is then written to the output container. This value is used to validate the exit condition for the second activity. The activity implementation uses the Java High Performance Bridge which caches the JVM and the static variables of the main class, which then significantly improves performance. 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. The EJB invocation via the PEA allows you to retrieve the meta model of the Workflow containers, but does not support transactions. To use transactions, you can invoke EJBs using the UPES. The configuration files referred to below are available only for Windows NT (or Windows 2000) and WebSphere, but the Java code is not dependent on the operating system or EJB container. It respects the EJB 1.1 standard. |
Setup |
To prepare the sample, follow these steps:
|
Running the sample |
To run the sample, perform the following steps:
|
View source code | IncrementEJBPea.java IncrementEJBPea.html (Javadoc) |