How to easily create an asynchronous web service with Oracle ADF (BC) by Markus Lohn

Posted: July 31, 2015 in JDeveloper & ADF
Tags: , , , , , , ,

 

clip_image002In a SOA architecture there is often a need to create asynchronous services. As a simple example imagine a workflow approval process. In such a case the approval process can run from minutes to weeks, before the final approval returned back to the client. This is a typical example of an asynchronous service. So when a platform like Oracle SOA Suite is involved the implementation of an asynchronous service  is a quite easy task to do. However when developing such a service manually it is a challenging task. The primary challenge in this scenario is the correlation between the request from the client and the response from the service. In more detail the service have to notice at a minimum the

  • URL of the client
  • a unique identifier for the request (correlation id)

After the service successfully processed the request it has to use this information to build the response and send it back to the client. There exists a web service standard used for correlation: WS-Adressing.

When developing an asynchronous web service manually the developer has to deal with a lot of requirements and standards. Edwin Biemond wrote a nice blog about building a simple asynchronous web service with JAX-WS.

But there exists an alternative using Oracle Fusion Middleware. In the documentation there exists a book about creating Infrastructure web services. In detail this means buildung web services with Oracle ADF. When developing an asynchronous web service according to this guide, Oracle prepares the infrastructure for correlation of the request and response. The developer are able to concentrate on developing the business logic for the service. The correlation of request and response is automatically provided by the infrastructure. So afterwards the preconditions and the general steps are described in more detail.

Preconditions

The preparation of the infrastructure for asynchronous web services consist of creating a request and response JMS queue in WebLogic Server. The default queue names are as follows:

  • Request queue: oracle.j2ee.ws.server.async.DefaultRequestQueue
  • Response queue: oracle.j2ee.ws.server.async.DefaultResponseQueue

It is also possible to change the names of the queues. In addition this queues can be used in a cluster setup as well. Some best practices when using this queues also provided in the documentation. The installation is quite easy. It is only necessary to apply the template oracle.jrf.ws.async_template_12.1.3.jar ($ORACLE_HOME/oracle_common/common/templates/wls) when creating a new WebLogic domain. An existing WebLogic domain can also be extended by applying this template. Read the complete article here.

WebLogic Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Forum Wiki

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s