All Packages Class Hierarchy This Package Previous Next Index
Object | +----HostPublisher.ParallelHPIO
ParallelHPIO is a JavaBean which allows you to invoke two or more Host Publisher Integration Objects in parallel. This is useful if multiple Integration Objects can run independent of each other (meaning that one object does not depend on the output or state of another, such as through Integration Object chaining), allowing the objects to be invoked at the same time.
You simply give an instance of ParallelHPIO pointers to each Integration Object you want to run, then tell it to run them. It will return once all Integration Objects have completed.
This class only works with Host Publisher generated Integration Objects, but can easily be modified to invoke any kind of object in parallel.
The most common implementation of ParallelHPIO JavaBean will be on a JSP page. To use the bean, follow these steps.
CLASSPATH=%CLASSPATH%;c:\hostpub\studio\ParallelHPIO.jar
<BEAN NAME="HAParallelTest" TYPE="IntegrationObject.HAParallelTest" INTROSPECT="yes" CREATE="yes" SCOPE="request"></BEAN> <BEAN NAME="HAParallelTest2" TYPE="IntegrationObject.HAParallelTest" INTROSPECT="yes" CREATE="yes" SCOPE="request"></BEAN> <BEAN NAME="HAParallelTest3" TYPE="IntegrationObject.HAParallelTest" INTROSPECT="yes" CREATE="yes" SCOPE="request"></BEAN> <BEAN NAME="ParallelHPIO" TYPE="HostPublisher.ParallelHPIO" INTROSPECT="yes" CREATE="yes" SCOPE="request"></BEAN> <% ParallelHPIO.setSessionInfo(request, response); ParallelHPIO.addIO(HAParallelTest); ParallelHPIO.addIO(HAParallelTest2); ParallelHPIO.addIO(HAParallelTest3); ParallelHPIO.runIOs(); %>
Note that the Integration Objects must be able to be run in parallel. Make sure that if pooling is turned on that the pool is configured with a high enough maximum for the number of connections to support parallelism. Also be careful of chained Integration Objects running in parallel that might be dependent on another's state before starting.
NOTE: This object and source is provided AS IS as a productivity aid to customers. While feedback is welcome and encouraged, IBM is in no way obligated to support or service this feature. The source is provided so that you may make modifications as appropriate. Feedback may be provided through the Internet newsgroup ibm.software.hostpubv2 on news.software.ibm.com.
Provides ParallelHPIO with the HttpServletResponse and HttpServletRequest objects to use when invoking the Integration Objects.
public ParallelHPIO()
public void addIO(HPubCommon io)
public void runIOs()
public void setSessionInfo(HttpServletRequest req, HttpServletResponse res)
Provides ParallelHPIO with the HttpServletResponse and HttpServletRequest objects to use when invoking the Integration Objects. Integration Objects are invoked by calling their doHPTransaction() method, which requires these objects as input.
The same objects are used for every Integration Object invocation.
These objects are created and maintained by WebSphere.
All Packages Class Hierarchy This Package Previous Next Index