AS11 Oracle B2B Sync Support - Series 2
Posted
by sinkarbabu.kirubanithi
on Oracle Blogs
See other posts from Oracle Blogs
or by sinkarbabu.kirubanithi
Published on Thu, 27 May 2010 15:34:15 +0530
Indexed on
2010/05/27
14:22 UTC
Read the original article
Hit count: 537
transport
|What do i like Most in 11
|JMS Request/Reply
|Oracle B2B 11g
|Sync Support
In the earlier series, we discussed about how to model "Sync Support" in Oracle B2B. And, we haven't discussed how the response can be consumed synchronously by the back-end application or initiator of sync request.
In this sequel, we will see how we can extend it to the SOA composite applications to model the end-to-end usecase, this would help the initiator of sync request to receive the response synchronously.
Series 2 - is little lengthier for blog standards so be prepared before you continue further :).
Let's start our discussion with a high-level scenario where one need to initiate a synchronous request and get response synchronously. There are various approaches available, we will see one simplest approach here.
Components Involved:
1. Oracle B2B
2. Oracle JCA JMS Adapter
3. Oracle BPEL
4. All of the above are wrapped up in a single SOA composite application.
Oracle B2B:
Skipping the "Sync Support" setup part in B2B, as we have already discussed that in the earlier series 1. Here we have provided "Sync Support" samples that can be imported to B2B directly and users can start testing the same in few minutes.
Initiator Sample:
This requires two JMS queues to be created, one for B2B to receive initial outbound sync request and the other is for B2B to deliver the incoming sync response to the back-end.
Please enable "Use JMS Id" option in both internal listening and delivery channels. This would enable JCA JMS Adapter to correlate the initial B2B request and response and in turn it would be returned as synchronous response of BPEL.
Internal Listening Channel Image:
Internal Delivery Channel Image:
To get going without much challenges, just create queues in Weblogic with the JNDI mentioned in the above two screenshots. If you want to use different names, then you may have to change the queue jndi names in sample after importing it into B2B.
Here are the Queue related JNDI names used in the sample,
1. Internal Listening Channel Queue details,
Name:
JNDI Name: jms/b2b/syncreplyqueue
2. Internal Delivery Channel Queue details,
Name:
JNDI Name: jms/b2b/syncrequestqueue
Here is the Initiator Sample Acme.zip
Note: You may have to adjust the ip address of GlobalChips endpoint in the Delivery Channel.
Responder Sample:
Contains B2B meta-data and the Callout. Just import the sample and place the callout binary under "/tmp/callout" directory.
If you choose to use a different location for callout, then you may have to change the same in B2B Configuration after importing the sample.
Here are the artifacts,
1. Callout Source SampleCallout.java
2. Callout Binary sample-callout.jar
3. Responder Sample GlobalChips.zip
Callout Details:
Just gives the static response XML that needs to be sent back as response for the inbound sync request. For a sample purpose, we have given static response but in production you may have to invoke a web service or something similar to get the response.
IMPORTANT NOTE:
For Sync Support use case, responder is not expected to deliver the inbound sync request to backend as the process of delivering and getting the response from backend are expected from the Callout.
This default behavior can be overridden by enabling the config property "b2b.SyncAppDelivery=true" in B2B config mbean (b2b-config.xml). This makes B2B to deliver the inbound sync request to be delivered to backend queue but the response to be sent to remote caller still has to come from Callout.
2. Oracle JCA JMS Adapter:
On the initiator side, we have used JCA JMS Request/Reply pattern to send/receive the synchronous message from B2B.
3. Oracle BPEL:
Exposes WS-SOAP Endpoint that takes payload as input and passes the same to B2B and returns the synchronous response of B2B as SOAP response. For outside world, it looks as if it is the synchronous web service endpoint but under the cover it uses JMS to trigger/initiate B2B to send and receive the synchronous response.
4. Composite application:
All the components discussed above are wired in SOA composite application that helps to model a end-to-end synchronous use case. Here's the composite application sca_B2BSyncSample_rev1.0.jar, you may just deploy this to your AS11 SOA to make use of it. For any editing, you can just import the project in your JDEV under any SOA Application.
Here are the composite application screenshots,
Composite Application:
BPEL With JCA JMS Adapter (Request/Reply):
© Oracle Blogs or respective owner