Showing posts with label jms. Show all posts
Showing posts with label jms. Show all posts

Thursday, June 29, 2017

OSB - JMS Custom Properties

To set JMS custom properties to an outbound message, use a Transport Header activity in the Routing activity that calls the JMS outbound adapter:

















To obtain JMS custom properties from an inbound JMS request, do the following in an Assign activity:

$inbound/ctx:transport/ctx:request/tp:headers/tp:user-header[@name='WsTo']/@value

...where the "WsTo" value is the Name of the custom property/header set initially in the JMS message.

Wednesday, July 27, 2016

FYI - JMS Polling and Error Queues

FYI:

When polling a JMS queue in OSB, in order for it to go to the configured error queue, an error must be raised. Raising an error and then handling this error won't cause the message to be sent to the error queue. If the error is handled, then a fault must be raised again.

Take this simple proxy service as an example that polls from a JMS queue configured in weblogic and calls a stored procedure to insert the polled record:



EmployeePS Pipeline:



Should an unexpected error occur somewhere in this pipeline, it will be caught by the error handler. The error will be reported in the EM Message Reports but the error is raised again so that it can be sent to the error queue.

Doing a Reply with Failure will NOT send the message to the error queue. As explained by AbhishekJ here:

In case of JMS transport the JMS Queue or Topic will receive a NACK back but the message will NOT roll back and will be removed from the destination just like in case of Reply with Success. This happens because using a Reply action is considered as an exception being handled properly and a commit will be sent back to the JMS destination. To roll back the message ensure that you use Raise Error instead of a Reply action.

Monday, July 25, 2016

Resources: Helpful Weblogic JMS Links

Creating a JMS Server and Queue in Weblogic:
https://blogs.oracle.com/soaproactive/entry/how_to_create_a_simple

Creating a JMS Error Queue:
http://middlewaremagic.com/weblogic/?p=4670