X

Innovative ideas for every utility

Sending JMS messages in real time

Anthony Shorten
Senior Principal Product Manager

One of the features of the framework is the ability to send data to a JMS resource (Queue or Topic) from a business event in the product in real time. The idea is that some business event occurs, such as data changing or a status changing, which is picked up by an algorithm or other program object and then an outbound message created to be sent by the JMS Real Time Senders we supply in the product. The real time sender deposits the message on the JMS within the transaction context.

To do this a number of objects need to be setup:

  • Create a XAI JNDI Server entry with the JNDI sever for your JMS Resources
  • Create a XAI JMS Connection entry with your JMS connection factory and referring to the XAI JNDI Server you created.
  • Create a XAI JMS Queue/Topic entry to connect to the JMS Connection and JNDI Server. You will also need to provide credentials if necessary in the Context tab (if your JMS resource is secured).
  • Configure a XAI JMS Sender entry of type RTJMSQSNDR referring to the JMS Connection, and JMS Queue/Topics you defined.
  • Create an Outbound Message Type entry you want to use to define your transaction and refer to the object you want to use as the primary object to send the data out on. 
  • Create an External System definition which links the Outbound Message Type to the JMS Sender you created. This tells the product to process the messgae of that type to the JMS resources you defined.
  • Decide the appropriate algorithm to use to detect the business even that occurs. Of course you can use class extensions or server user exits as well as objects to detect a business event but algorithms are the most commonly used.
  • Build a Business Object schema against the Outbound Messae (F1-OUTMSG) maintenance object. In the XML_SOURCE XML object you can define the structure you want to send to the JMS resource. Specify the External System in the NT_XID_CD element and Outbound Message Type in the OUTMSG_TYPE_CD element as defaults. The schema should be somewhat similar to the example below (this is used to send To Do status messages to BAM for example):

<schema>
    <outboundMessageId mapField="OUTMSG_ID"/> 
    <externalSystem mapField="NT_XID_CD" fkRef="F1-ESTMP" default="XXXSYS"/> 
    <outboundMessageType mapField="OUTMSG_TYPE_CD" fkRef="F1-OMTYP" default="XXXMSG"/>  
    <todoPackage type="group" mapXML="XML_SOURCE">
        <toDoId mdField="TD_ENTRY_ID"/> 
        <toDoType mdField="TD_TYPE_CD"/> 
        <toDoRole mdField="ROLE_ID"/> 
        <toDoEntryStatus mdField="ENTRY_STATUS_FLG"/>
    </todoPackage>
</schema>

  • Create the algorithm to populate the elements of the schema above and use invokeBO to create the outbound message. This will then appear in the JMS Queue or Topic in real time. Note: If the JMS Queue/Topic is not available at runtime then the transaction may fail as it assumes the JMS is now part of the transaction.

The first part of the process is all definition of the JMS resources within XAI. The Sender, Business Object and Algorithm are the key elements for the interface. The data for the outbound message is not restricted to one object, your algorithm can get data from as many objects as you want to build the message. The key is to define the message elements in the XML Source XML element.

For more information about JMS Outbound refer to the Oracle WebLogic JMS Integration and Oracle Utilities Application Framework (Doc Id: 1308181.1) whitepaper available from My Oracle Support.

Join the discussion

Comments ( 2 )
  • guest Thursday, November 3, 2011

    Hi,

    how we can submit a batch job to named thread pools?

    Thanks.


  • Ernesto Dominguez Tuesday, December 4, 2012

    Is there any way to get the changes on a XAI Sender configuration without bouncing the environment?

    I tried all the XAI Commands and flushAll, but it still gets the old values.

    Thanks.


Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.