Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Expand
titleContents

Table of Contents
indent15px
maxLevel45
stylenone

The JMSIn component is used to transfer messages to a JMS topic or queue. Using the Configuration Property Sheet wizard, you can specify the topic or queue on which the message is to be sent. This component retrieves messages from a component and sends them to a JMS topic or queue. Additionally, you can create a Publisher or a Sender on Topic or Queue respectively, and configure the component to publish or send a message on a JMS Server at runtime.

...

Parameters to create the connection can be specified in the input message when this property is set to true. If this property is selected, the validation errors in the managed connection factory Managed Connection Factory panel of the CPS are treated as warnings. So user users can bypass this step without giving valid configuration and complete the configuration of the component. If valid properties are not provided even in the input message, an exception will be thrown at runtime.

...

Note
  • If these jars are added to resources of the System library "JMSAdapters" under System Lib in the Micro Service Repository panel, the jars get available for all JMS components. Refer to the Adding Resources To a Microservice section to perform this action.
  • In case of BEA Weblogic, InitialContext can be created by specifying empty values for JNDI Username and JNDI password as well.
  • When configuring JMSIn 4.0 for BEA Weblogic in scheduling mode, the colour of the component does not change to green on startup. In order to avoid this, it is necessary to add the following security permission in java.policy file under {JRE_HOME}/lib/security.

    The permission to be added is "grant { permission

    Code Block
    grant { permission javax.management.MBeanTrustPermission "register";}
    "
     
  • After adding BEA Weblogic jars as resources, if we try to configure the component for Topic destination type in Fiorano MQ provider, test in Interactions configuration page of CPS will fail with java.lang.NoSuchMethodError. This is due to javax.jms package conflict present in both weblogic jars and jms-2.0.jar used by Fiorano. To avoid this, wljmsclient.jar and wlthint3client.jar has to be updated with the classes in javax.jms package of jms-2.0 jar by following these steps:
    1. Copy jms-2.0.jar present in %FIORANO_HOME%/extlib/jms to any location and extract the contents of jar using the following command

      "

      Code Block
      jar xf jms-2.0.jar
      " from command prompt. 
    2. Update javax.jms package classes in wljmsclient.jar with the above-extracted classes using the command " jar uf wljmsclient.jar -C %EXTRACTED_PATH%  javax/jms/* " from command prompt where %EXTRACTED_PATH% is the location where jms-2.0.jar is extracted. Similarly, wlthint3client.jar has to be updated.

...


Figure 6: Interaction Configurations panel in CPS

Note

For the Expert Properties such as Send message on the output port, Validate Input, Cleanup resources (excluding connection) after each document, Target Namespace, Elements to Decrypt and Elements to encrypt, refer respective sections in Common Configurations page.

Destination Settings

Destination Configuration

...

Name of the topic/queue to be subscribed to.

Note
In case of
  • If JMS Provider is "BEA Weblogic",
    • JNDI name of the topic or queue has to be specified.
    value for
    • Destination Name should be the JNDI name of the destination.

      Tip
      titleExample
    :
    • weblogic.examples.jms.exampleTopic

    .

...

  • If JMS Provider is "Other" (ActiveMQ), and the AutoCreate Destination property (explained below) is disabled,

    • the Topic name and Queue name to be specified must be in the following format:

      Tip
      titleTopic name format

      dynamicTopics/<TopicName>

      Tip
      titleQueue name format

      dynamicQueues/<QueueName>

Destination Type

The JMS type of the destination; either Topic or Queue.

Select one of these destination types:

  • Topic: Message can consumed be consumed by a number of clients. Topic represents Public Subscription (Pub/Sub) domain.
  • Queue: Message can be consumed by only one client. Queue represents Point to Point (PTP) domain.

...

AutoCreate Destination

Whether a destination needs to be created, if it does not exists.

...

  • Map Message
    A MapMessage object is used to send a set of name-value pairs. The names are String objects, and the values are primitive data types in the Java programming language. The names must have a value that is not null, and not an empty string. The entries can be accessed sequentially or randomly by name. The order of the entries is undefined. MapMessage inherits from the Message interface and adds a message body that contains a Map.
  • Byte Message as Base64 encoded Text
    Base64 encoding schemes are commonly used when there is a need to encode binary data that needs to be stored and transferred over media that are designed to deal with textual data. This is to ensure that the data remains intact without modification during transport. Base64 is commonly used in a number of applications including email via MIME, and storing complex data in XML.
  • Text Message
    Text message in any of the following formats:
    • Raw Text
    • Plain Text
    • XML Text: Selecting this option gives more options to provide a specific XSD Schema.


      Figure 10: Text Message option in Message Type Configuration dialog box

Expert Properties

These attributes are meant for advanced users.

Image Added
Figure 11: Interaction Configurations panel with the Expert Properties view enabled

Send message on the output port

By enabling this property, the message sent to the JMS destination is also sent to the output port of the destination.

Note

For descriptions of Expert properties given below, please refer the Interaction Configurations section in Common Configurations page:

  • Pre Processing XSL Configuration
  • Post Processing XSL Configuration
  • Process Message Based On a Property
  • Validate Input
  • Cleanup Resources (excluding connection) after each input document
  • TargetNamespace
  • Elements to Decrypt
  • Elements to encrypt

Scheduler Configurations

Please refer section in Common Configurations page.

...

Server connection can be tested from within the CPS by clicking on Test in the Managed Connection Factory panel.


Figure 1112: Sample connection test result indicating success

...

Priority of message - 4
Time to Live - 0
Delivery Mode  - Non-persistent

Sample Input


Figure 1213: Sample JMSIn input message

Output


Figure 1314: Sample JMSIn output message

...

When the property Use Connection details from input is chosen, the following input schema with the element ConnectionFactorySettings, is generated. Properties that are used to create the connection are present under this element.


Figure 1415: Input schema with ConnectionFactorySettings

...

Configure the JMSIn as described in Configuration and Testing section and use feeder and display component to send sample input and check the response respectively.


Figure 1516: Demonstrating Scenario 1 with sample input and output

...

Adaptavist ThemeBuilder EngineAtlassian Confluence