Sync to Async Sample
This sample illustrates a scalable solution to the problem of enabling an asynchronous business process to support
invocation by a client that does not support asynchrony (callbacks). This design pattern is
appropriate when application architecture requires synchronous invocation of an asynchronous process. In this pattern
a synchronous (blocking) client must invoke an asynchronous business process while waiting for the process to return information.
Note: This sample is provided on dev2dev for your convenience and is not supported by BEA.
What the Sample Does
The sample consists of a single WebLogic Integration application containing one asynchronous business process (a JPD) and
associated artifacts (SyncAsync WSDL, Web Service Control, and Schema), plus a Page Flow client.
The client invokes the JPD, the JPD executes simple asynchronous activity using a Timer Control and
generates an XML document with a unique timestamp. The JPD then returns an XML document to the client using XMLBean
functionality. The client displays the returned XML document.
How It Works
The key to the operation of the sample is the design-time configuration of the business process that enables synchronous
clients to communicate with it. This configuration, coupled with the run-time functionality of the "sync to async" servlet
shipped with BEA WebLogic Integration 8.1 Service Pack 4, enables this design pattern to function. It is important to
note that the JPD configuration process is the same whether it is stateless or stateful and remains the same
regardless of the synchronous client implementation.
The following diagram illustrates the sample architecture:
This sample requires the following software:
- WebLogic Integration 8.1, SP4 or later (includes Jython 2.1). You can download WebLogic Integration 8.1 from the
download page on dev2dev.
- WLI Common Utilities, version 2.5. You can download WLI Common Utilities from the
- WebLogic Server Scripting Tool (WLST) (included with WLI Common Utilities). You can also download WLST from
the download page.
- Note: WLST Offline and WLST Online are available for download and evaluation from BEA's dev2dev site,
but have not been formally included in the WebLogic Platform 8.1 product. WLST is supported through BEA newsgroups
only, and the utility and APIs are subject to change. BEA intends to formally support this capability in a future
release of WebLogic Platform.
In addition to providing application code, the sample includes the following items:
- Instructions and scripts for generating a java client using clientGen.
- Instructions and scripts for configuring a BEA WebLogic Integration cluster to support the application.
- Instructions and scripts for deploying the application to an appropriately configured cluster.
- Instructions, guidelines, and caveats for designing asynchronous processes that will participate in
synchronous client interactions.
How to Download
You can download the Sync to Async sample and WLI Common Utilities from the
download page on dev2dev.