Showing posts with label Producer. Show all posts
Showing posts with label Producer. Show all posts

Wednesday, May 8, 2013

Setting Unit Of Order in OSB Producer

Unit Of Order is used in Weblogic JMS queues/topics to group messages into a single unit that can be processed sequentially even if the message are being processed by multiple consumers.  For example, you can use CustomerID for the Unit Of Order to ensure that you will always process a given customers transactions in order.

Follow the link for more information on Unit Of Order

Setting the Unit Of Order in an OSB Producer is quite simple.

1) Add a Transport Header action in the Request Action section of your communication node (Route, Publish, Service Call Out)



2) Set the Transport Header Properties
     a) For Direction select  Outbount Request.   
     b) Click on the Add Header button.
     c) Select Defined, jms, JMS_BEA_UnitOfOrder under the Name column.
     d) Select Set header to and set the <Expression> you want to use to set your Unit of Work in the Action column.



Friday, December 28, 2012

Creating a Business Service to Publish to a JMS Queue/Topic


The following steps outline how to create a business service that will publish to a JMS Queue or Topic.  For this example, I created the Business Service in the OSB Console.  You could also use Eclipse and the steps would be very similar.

1.  Log into OSB Console.
2.  Create new project.  For this example I used the project name of PublishJMSQueue.
3.  Create a new folder called BusinessServices to hold the service we are going to create.
4.  Navigate to the BusinessServices folder and select Business Service from the Create Resource menu.
















5.  Enter Service Name, select Messaging Service for the Service Type and click on Next.
















6.  Select the Request Message Type, Response Message Type and click on Next.  For this example I am using Text for the Request Message Type and None for the Response Message Type.  Below is information on the other types from the Oracle Documentation.

None - Select this option if there is no request message (HTTP GET example)
Binary - Select this option if the content-type of the message is unknown or not important.
Text - Select this option if the message can be restricted to text.
MFL - Select this option if the message is a binary document conforming to an MFL definition. You can configure only one MFL file.
For MFLs, you can click Browse to select an MFL from the MFL Browser, then click Submit.
XML - Select this option if the message is an XML document. To provide some type information, you can choose to declare the XML schema type of the XML document exchanged.


7.  Select jms for Protocol, enter the Endpoint URI for the queue/topic you are publishing to, click on Add and then click on Next.  You can leave everything else with the default values.

Note:  The Endpoing URI follow the format of “jms://host:port(,host:port)*/FactoryJndiName/DestJndiName”.   If you are using a Weblogic queue/topic you do not need to change the FactoryJndiName, OSB will prepopulated the correct JNDI name.  You can get the DestJndiName from the Weblogic console (domain -> Services -> Messaging -> JMS Modules -> <Module Containing the Queue/Topic you are publishing to> -> JNDI Name)


















8.  Set Destination Type, Message Type and then click on Last.  Everything else can remain at the default value.  For this example, we are using a queue for destination type and Text for message type.
















       9.   Review Settings and then click Save.




















      
     
     10.  Test Business Service.