Oracle SOA, AIA BPEL ESB and OSB knowledge base

Monday, February 23, 2009

OSB service invocation from BPEL 11g through JMS adapter

OSB service invocation from BPEL 11g through JMS adapter Request/Reply Sync service
This scenario is slightly different from the Request/Reply Async call. When you invoke a BPEL process that will in turn start a global transaction. The JCA adapter invoke JmsRequestReplyInteractionSpec class which uses an XA enabled connection factory by default(eg: weblogic.jms.XAConnectionFactory). WLS JMS will automatically enlist the XAResource with the transaction. There will not be a problem when you use the Async Request/reply since the process will not wait for the reply.

When you use a Synchronous request/reply call with a XA aware Connection Factory, the message is written to the request queue and the global transaction is still active. The status of the message in the queue will be "Send Transaction" which is not a valid status for a client to read the message. Hence the message is not be visible to any client of that queue till the global transaction gets committed.So we have to make sure the transcation happens locally by using a NON-XA connection Factory(eg: weblogic.jms.ConnectionFactory). When defining the connection instance for using the weblogic.jms.ConnectionFactory make sure that 'isTransacted' connection instance property is set to true. Which means the JMS Session will be locally transacted which thereby will let the third party client consume the message from request queue and put it in the response queue used for message listening when using JmsrequestreplyInteractionSpec class.

You can create a new Outbound Connection Group in the WebLogic Admin Console(see the previous post) with the NON-XA connection Factory

Note : The above mentioned setting is necessary for the remote WLS-JMS invocation.If you are using the local JMS queue you can still use the XA aware connection factory to invoke the service.The WebLogic JMS server has some optimization logic to make it work





No comments:

FEEDJIT Live Traffic Map

My Blog List