This topic contains sections marked as revised for this release

WebSphere Message Brokers
File: ac24820_
Writer: John Cooper

Reference topic

This build: July 31, 2007 21:19:34

JMSInput node

Use the JMSInput node to receive messages from JMS destinations. JMS destinations are accessed through a connection to a JMS provider.

This topic contains the following sections:

Purpose

The JMSInput node acts as a JMS message consumer and can receive all six message types that are defined in the Java Message Service Specification, version 1.1. Messages are received by using method calls, which are described in the JMS specification.

The JMSInput node is contained in the JMS drawer of the palette, and is represented in the workbench by the following icon:

JMSInput node icon

Using the JMSInput node in a message flow

The following sample contains a message flow in which the JMSInput node is used. Refer to this sample for an example of how to use the JMSInput node. You can view samples only when you use the information center that is integrated with the Message Brokers Toolkit.

The JMSInput node receives and propagates messages with a JMS message tree. You can set the properties of the JMSInput node to control the way in which the JMS messages are received.

The JMSInput node handles messages in the following message domains:
  • BLOB
  • XML
  • XMLNS
  • XMLNSC
  • MRM
  • JMSMap
  • JMSStream
  • MIME
  • IDOC

Message flows that handle messages that are received from connections to JMS providers must always start with a JMSInput node. If you include an output node in a message flow that starts with a JMSInput node, it can be any of the supported output nodes (including user-defined output nodes); you do not need to include a JMSOutput node. However, if you do not include a JMSOutput node, you must include the JMSMQTransform node to transform the message to the format that is expected by the output node.

If you are propagating JMS messages and creating a message flow to use as a subflow, you cannot use a standard input node; you must use an instance of the JMSInput node as the first node in order to create an In terminal for the subflow.

Restriction: When the JMSInput node receives publication topics, it internally restricts the message flow property Additional Instances to zero to prevent the receipt of duplicate publications.

Making the JMS provider client available to the JMS nodes

Choose one of the following methods to make the JMS provider available to the JMS nodes.
  • Use the mqsicreateconfigurableservice command to create a new object name for the JMS provider. For further information about this command, see mqsicreateconfigurableservice command.

    Use the -c parameter on the mqsichangeproperties command to change the property settings for an object name that already exists in the broker persistent store. For a JMS provider, this object name is a JMS Provider name.

    Use the mqsideleteconfigurableservice command to delete a JMS provider resource that was created by the mqsicreateconfigurableservice command.

    Use the -c parameter on the mqsireportproperties command to report on the properties of any JMS provider resource (both default and user-defined).

  • On distributed systems, copy the Java™ .jar files and any native libraries for the JMS provider client into the broker shared-classes directory; for example, C:\Documents and Settings\All Users\Application Data\IBM\MQSI\shared-classes on Windows. Copying the files into the shared-classes directory ensures that the Java class path for the JMS nodes is set correctly.
  • z/OS platform On z/OS, no shared-classes directory is used; instead, perform the following steps:
    1. Specify each JMS provider Java .jar file in the class path in the BIPPROF member of the broker’s Partitioned Data Set (PDS).
    2. Update the LIBPATH with any native libraries.
    3. Submit the BIPGEN JCL job to update the broker ENVFILE.

Configuring the JMSInput node

When you have put an instance of the JMSInput node into a message flow, you can configure it; see Configuring a message flow node. The properties of the node are displayed in the Properties view.

All mandatory properties that do not have a default value defined are marked with an asterisk.

Configure the JMSInput node.

  1. Optional: On the Description tab, enter a short description, a long description, or both. You can also rename the node on this tab.
  2. On the JMS Connection tab, set the following properties:
    • Enter an Initial Context Factory value. A JMS application uses the initial context to obtain and look up the JNDI administered objects for the JMS provider. The default value is

      com.sun.jndi.fscontext.RefFSContextFactory, which defines the file-based initial context factory for the WebSphere MQ JMS provider.

      To identify the name of the Initial Context Factory for the JMS provider, refer to the JMS provider documentation.

    • Enter a value for the Location JNDI Bindings. This value specifies either the file system path or the LDAP location for the bindings file. The bindings file contains definitions for the JNDI administered objects that are used by the JMSInput node.

      When you enter a value for Location JNDI Bindings, ensure that it complies with the following instructions:

      • Construct the bindings file before you deploy a message flow that contains a JMSInput node.
      • Do not include the file name of the bindings file in this field.
      • If you have specified an LDAP location that requires authentication, configure the LDAP principal (userid) and LDAP credentials (password) separately. These values are configured at broker level. For information about configuring these values, refer to the mqsicreatebroker and mqsichangebroker commands.
      • The string value must include the leading keyword, which is one of:
        • file:/
        • iiop:/
        • ldap:/

      For information about constructing the JNDI administered objects bindings file, refer to the documentation that is supplied with the JMS provider.

    • Enter a Connection Factory Name. The connection factory name is used by the JMSInput node to create a connection to the JMS provider. This name must already exist in the bindings file.
    • Enter a Backout Destination name. Input messages are sent to this destination when errors prevent the message flow from processing the message, and the message must be removed from the input destination. The backout destination name must exist in the bindings file.
    • Enter a value for the Backout Threshold. This value determines when an input message is put to the Backout Destination. For example, if the value is 3, the JMS provider attempts to deliver the message to the input destination three times. After the third attempted delivery, the message is removed from the input destination and is sent to the backout destination. The default value is 0.
  3. The JMSInput node has two modes, which are mutually exclusive. On the Basic tab, select the mode for the JMSInput node.
    • If the node is to read from a queue (point-to-point), select Source Queue and enter the name of the source queue, which is the JMS queue that is listed in the bindings file. This property is mutually exclusive with Subscription Topic on the Basic tab.
    • If the node is to read from a subscription topic (publish/subscribe), select Subscription Topic and enter the name of the subscription topic.
      • If you select Subscription Topic, the node operates in the publish/subscribe message domain only.
      • This property is mutually exclusive with Source Queue on the Basic tab.
      • The Subscription Topic name must conform to the standards of the JMS provider that is being used by the node.
    • If the node is to receive publications from a durable subscription topic, enter a Durable Subscription ID.
      • Removing a durable subscription is a separate administration task. For information about removing a durable subscription, refer to the JMS provider documentation.
      • This property is valid only when a Subscription Topic string has been specified.
  4. On the Input Message Parsing tab, set values for the properties that describe the message domain, message set, message type, and message format.
    • In Message Domain, select the name of the parser that you are using from the drop-down list. Choose from the following names:
      • MRM
      • XML
      • XMLNS
      • XMLNSC
      • JMSMap
      • JMSStream
      • MIME
      • BLOB
      • IDOC
      If Message Domain is left blank, the JMSInput node determines the domain in one of two ways:
      • By checking for the presence of data in the JMSType header value of the JMS input message
      • Based upon the Java Class of the JMS message
      For information about the order of precedence for determining the message domain, see Order of precedence for deriving the message domain.
    • If you are using the MRM or IDOC parser, select the correct message set from the drop-down list in Message Set. This list is populated with available message sets when you select MRM or IDOC as the domain.

      Leave Message Set blank for XML, XMLNS, XMLNSC, JMS, MIME, and BLOB parsers.

    • If you are using the MRM parser, select the correct message from the drop-down list in Message Type. This list is populated with messages that are defined in the message set that you have selected.

      Leave Message Type blank for XML, XMLNS, XMLNSC, JMS, MIME, BLOB, and IDOC parsers.

    • If you are using the MRM or IDOC parser, select the format of the message from the drop-down list in Message Format. This list includes all the physical formats that you have defined for this message set.

      Leave Message Format blank for XML, XMLNS, XMLNSC, JMS, MIME, and BLOB parsers.

  5. On the Parser Options tab, the default value for Parse Timing is set to On Demand. This value causes validation to be delayed until the message is parsed by partial parsing.
    • If you change this value to Immediate, partial parsing is overridden and everything in the message is parsed and validated, except complex types with a composition of Choice or Message that cannot be resolved at the time.
    • If you change this value to Complete, partial parsing is overridden and everything in the message is parsed and validated; complex types with a composition of Choice or Message that cannot be resolved at the time cause a validation failure.
  6. If you need to filter messages, set the properties on the Message Selectors tab:
    • If the JMS provider is required to filter messages, based on message properties that are set by the originating JMS client application, enter a value for Application Property, specifying both the property name and the selection conditions; for example, OrderValue > 200.

      Leave this property blank if you do not want the input node to make a selection based upon application property. For a description of how to construct the JMS message selector, see JMS message selector.

    • If the JMS provider is required to filter messages that have been generated at specific times, enter a value for Timestamp, where the value is an unqualified Java millisecond time; for example, 105757642321. Qualify the selector with operators, such as BETWEEN or AND.

      Leave this property blank if you do not want the input node to make a selection based on JMSTimeStamp.

    • If the JMS provider is required to filter messages based on the JMSDeliveryMode header value in the JMS messages, select an option for Delivery Mode from the drop-down list:
      • Non Persistent (the default) to receive messages that are marked as non persistent by the originating JMS client application.
      • Persistent to receive messages that are marked as persistent by the originating JMS client application.
    • If the JMS provider is required to filter messages based on the JMSPriority header value in the JMS message, enter a value for Priority.

      Valid values for message priority are from 0 (lowest) to 9 (highest); for example, you can enter 5 to receive messages of priority 5. You can also qualify the selector; for example, > 4 to receive messages with a priority greater than 4, or BETWEEN 4 AND 8 to receive messages with a priority in the range 4 to 8.

      Leave this property blank if you do not want the input node to make a selection based on JMSPriority.

    • If the JMS provider is required to filter messages based on the JMSMessageID header, enter a value for Message ID.

      Enter a specific Message ID, or enter a conditional selector; for example, enter > WMBRK123456 to return messages where the Message ID is greater than WMBRK123456.

      Leave this property blank if you do not want the input node to make a selection based on JMSMessageID.

    • If the JMS provider is required to filter messages based on the JMSRedelivered header, enter a value for Redelivered:
      • Enter FALSE if the input node accepts only messages that have not been redelivered by the JMS provider.
      • Enter TRUE if the input node accepts only messages that have been redelivered by the JMS provider.
      • Leave this property blank if you do not want the input node to make a selection based on JMSRedelivered.
    • If the JMS provider is required to filter messages based on the JMSCorrelationID header, enter a value for Correlation ID.

      Enter a specific Correlation ID or enter a conditional string; for example, WMBRKABCDEFG returns messages with a Correlation ID that matches this value.

      Leave this property blank if you do not want the input node to make a selection based on JMSCorrelationID.

  7. On the Advanced tab, define the transactional characteristics of how the message is handled by selecting an option from the Transaction Mode list. Choose one of the following options:
    • Select None if the incoming message is to be treated as non persistent. If you select this value, the message is received using a non-transacted JMS session that is created using the Session.AUTO_ACKNOWLEDGE flag.
    • Select Local if the JMSInput node should coordinate the commit or roll back of JMS messages that are received by the node, along with any other resources such as DB2 or WebSphere MQ that perform work within the message flow. If you select this value, the node uses a transacted JMS session.
    • Select Global if the JMSInput node should participate in a global message flow transaction that is managed by the broker’s external syncpoint coordinator. The syncpoint coordinator is the broker’s queue manager on distributed systems and RRS (Resource Recovery Services) on z/OS. If you select this value, any messages that are received by the node are globally coordinated using an XA JMS session.
  8. On the Validation tab, set the properties that relate to input message validation.
    • Select an option from the Validate drop-down list:
      • None
      • Content and Value
      • Content
      If you select Content or Content and Value, select an option from the Failure Action drop-down list:
      • User Trace
      • Local Error Log
      • Exception (default value)
      • Exception List

    For more details, see Validating messages and Validation properties.

Connecting the terminals

For each message that is received successfully, the JMSInput node routes the message to the Out terminal. If this action fails, the message is retried. If the retry threshold is reached, where the threshold is defined by the BackoutThreshold property of the node, the message is routed to the Failure terminal. You can connect nodes to the Failure terminal to handle this condition. If you have not connected nodes to the Failure terminal, the message is written to the backout destination. If a backout destination has not been provided, the node issues a BIP4669 error message and stops processing further input.

If the message is caught by the JMSInput node after an exception has been generated elsewhere in the message flow, the message is routed to the Catch terminal. If you have not connected nodes to the Catch terminal, the node backs out messages for re-delivery until the problem is resolved, or the backout threshold is reached.

You must define a backout destination. If you do not define a backout destination, the node issues a BIP4669 error message and stops processing further input.

Configuring for coordinated transactions

When you include a JMSInput node in a message flow, the value that you set for Transaction Mode defines whether messages are received under syncpoint.

  • If you set this property to Global, the message is received under external syncpoint coordination; that is, within a WebSphere MQ unit of work. Any messages that are sent subsequently by an output node in the same instance of the message flow are put under syncpoint, unless the output node overrides this setting explicitly.
  • If you set this property to Local, the message is received under the local syncpoint control of the JMSInput node. Any messages that are sent subsequently by an output node in the flow are not put under local syncpoint, unless an individual output node specifies that the message must be put under local syncpoint.
  • If you set this property to None, the message is not received under syncpoint. Any messages that are sent subsequently by an output node in the flow are not put under syncpoint, unless an individual output node specifies that the message must be put under syncpoint.

The JMS provider can supply additional .jar files that are required for transactional support. Refer to the JMS provider documentation. For example, on distributed systems, the WebSphere MQ JMS provider supplies an extra .jar file: com.ibm,mqetclient.jar. You must add this .jar file to the broker shared-classes directory. Refer to Making the JMS provider client available to the JMS nodes in this topic.

To receive messages under external syncpoint, you must take additional configuration steps, which need be applied only the first time that a JMSOutput or JMSInput node is deployed to the broker for a particular JMS provider.
  • On distributed systems, the external syncpoint coordinator for the broker is WebSphere MQ. Before you deploy a message flow in which the Transaction Coordination property is set to Global, modify the queue manager .ini file to include extra definitions for each JMS provider Resource Manager that participates in globally-coordinated transactions.
    • Windows platform On Windows systems, if you have WebSphere MQ Version 5 installed:
      1. Start WebSphere MQ Services.
      2. Right-click the queue manager name and click Properties.
      3. Click the Resource properties tab.
      4. Set the SwitchFile property to the following value:
        install_dir/bin/ JMSSwitch.dll  
        XAOpenString=Initial Context,location JNDI,Optional_parms
        ThreadOfControl=THREAD 
    • Windows platform On Windows systems, if you have WebSphere MQ Version 6.0 installed:
      1. Start WebSphere MQ Explorer.
      2. Right-click the queue manager name in the left pane and click Properties.
      3. Click XA resource managers in the left pane.
      4. Set the SwitchFile property to the following value:
        install_dir/bin/ JMSSwitch.dll  
        XAOpenString=Initial Context,location JNDI,Optional_parms
        ThreadOfControl=THREAD 
      For more information, refer to the System Administration Guide section of the WebSphere MQ Version 6 information center online.
    • Linux platform UNIX platform On Linux and UNIX systems, add a stanza to the queue manager ini file for each JMS provider.
      For example:
      XAResourceManager:
      Name=Jms_Provider_Name 
      SwitchFile=/install_dir/bin/ JMSSwitch.so
      XAOpenString=Initial Context,location JNDI,Optional_parms
      ThreadOfControl=THREAD
      Where:
      Name
      is an installation defined name that identifies a JMS provider Resource Manager.
      SwitchFile
      is the file system path to the JMSSwitch library that is supplied in the bin directory of the broker.
      The values for XAOpenString are as follows:
      • Initial Context is the value that is set in the JMSInput node basic property Initial Context Factory.
      • location JNDI is the value that is set in the JMSInput node basic property Location of JNDI. This value should include the leading keyword, which is one of file:/, iiop:/, or ldap:/.
      The following parameters are optional:
      • LDAP Principal matches the value that is set for the broker by using the mqsicreatebroker or mqsichangebroker commands.
      • LDAP Credentials matches the value that is set for the broker by using the mqsicreatebroker or mqsichangebroker commands.
      • Recovery Connection Factory Name is the JNDI administered connection factory that is defined in the bindings file. If a value is not specified, you must add a default value for recoverXAQCF to the bindings file. In either case, the Recovery Connection Factory should be defined as an XA Queue Connection Factory for the JMS provider that is associated with the Initial Context Factory.

      The optional parameters are comma separated and are positional. Therefore, any parameters that are missing must be represented by a comma.

      1. Update the Java CLASSPATH environment variable for the broker's queue manager to include a reference to xarecovery.jar; for example:
        install_dir/classes/xarecovery.jar
      2. Update the Java PATH environment variable for the broker's queue manager to point to the bin directory in which the SwitchFile is located; for example:
        install_dir/bin

      For more information, refer to the System Administration Guide section of the WebSphere MQ Version 6 information center online.

      To use the same queue manager for both the broker and the JMS provider, ensure that your WebSphere MQ installation is at the minimum required level: WebSphere® MQ Version 6.0 Fix Pack 1 or above is required for XA to use the same queue manager for both the broker and the provider.

    • z/OS platform On z/OS, the external syncpoint manager is Resource Recovery Services (RRS). The only JMS provider that is supported on z/OS is WebSphere MQ JMS. The only transport option that is supported for WebSphere MQ JMS on z/OS is the bind option.

      Syncpoint control for the JMS provider is managed with RRS syncpoint coordination of the queue manager of the broker. You do not need to modify the .ini file.

Terminals and properties

The terminals of the JMSInput node are described in the following table.

Terminal Description
Failure The output terminal to which the message is routed if an error occurs. Even if the Validation property is set, messages that are propagated to this terminal are not validated.
Out The output terminal to which the message is routed if it is retrieved successfully.
Catch The output terminal to which the message is routed if an exception is generated downstream and caught by this node.

The following tables describe the node properties. The column headed M indicates whether the property is mandatory (marked with an asterisk if you must enter a value when no default is defined); the column headed C indicates whether the property is configurable (you can change the value when you add the message flow to the bar file to deploy it).

The Description properties of the JMSInput node are described in the following table.

Property M C Default Description
Node name No No The node type, JMSInput The name of the node.
Short Description No No   A brief description of the node.
Long Description No No   Text that describes the purpose of the node in the message flow.

The JMS Connection properties of the JMSInput node are described in the following table.

Property M C Default Description
Initial Context Factory Yes Yes com.sun.jndi.fscontext.RefFSContextFactory The starting point for a JNDI name space. A JMS application uses the initial context to obtain and look up the connection factory and queue or topic objects for the JMS provider.

The default value is the value that is used when WebSphere MQ Java is used as the JMS provider.

Location JNDI Bindings Yes Yes   The system path or the LDAP location for the bindings file.
Connection Factory Name Yes Yes   The name of the connection factory that is used by the JMSInputnode to create a connection to the JMS provider.
Backout Destination No Yes   The destination that is used by the JMSInput node when a message cannot be processed by the message flow because of errors in the message.
Backout Threshold No Yes 0 The value that controls when a re-delivered message is put to the backout destination.

The Basic properties of the JMSInput node are described in the following table.

Property M C Default Description
Source Queue No No Selected The name of the queue from which the node receives incoming messages.
Subscription Topic No No Cleared The name of the topic to which the node is subscribed.
Durable Subscription ID No No   The identifier for a durable subscription topic.

The Input Message Parsing properties of the JMSInput node are described in the following table.

Property M C Default Description
Message Domain No No   The domain that is used to parse the incoming message.
Message Set No No   The name or identifier of the message set in which the incoming message is defined.
Message Type No No   The name of the incoming message.
Message Format No No   The name of the physical format of the incoming message.

The properties of the Parser Options for the JMSInput node are described in the following table.

Property M C Default Description
Parse Timing Yes No On Demand This property controls when an input message is parsed. Valid values are On Demand, Immediate, and Complete.

For a full description of this property, see Parsing on demand.

Use XMLNSC Compact Parser for XMLNS Domain Yes No Cleared This property controls whether the XMLNSC Compact Parser is used for messages in the XMLNS Domain. If you set this property, the message data appears under XMLNSC in nodes that are connected to the output terminal when the input MQRFH2 header or Input Message Parsing properties Domain is XMLNS.
Retain Mixed Content Yes No Cleared This property controls whether the XMLNSC parser creates elements in the message tree when it encounters mixed text in an input message. If you select the check box, elements are created for mixed text. If you clear the check box, mixed text is ignored and no elements are created.
Retain Comments Yes No Cleared This property controls whether the XMLNSC parser creates elements in the message tree when it encounters comments in an input message. If you select the check box, elements are created for comments. If you clear the check box, comments are ignored and no elements are created.
Retain Processing Instructions Yes No Cleared This property controls whether the XMLNSC parser creates elements in the message tree when it encounters processing instructions in an input message. If you select the check box, elements are created for processing instructions. If you clear the check box, processing instructions are ignored and no elements are created.

The Message Selectors properties of the JMSInput node are described in the following table.

Property M C Default Description
Application Property No Yes   The message selector that filters messages according to the application property value.
Timestamp No Yes   The message selector that filters messages according to the JMSTimestamp.
Delivery Mode No Yes   The message selector that filters messages according to the message delivery mode.
Priority No Yes   The message selector that filters messages according to the message priority.
Message ID No Yes   The message selector that filters messages according to the message ID.
Correlation ID No Yes   The message selector that filters messages according to the correlation ID.

The Advanced properties of the JMSInput node are described in the following table.

Property M C Default Description
Transaction Mode Yes No none This property controls whether the incoming message is received under external syncpoint, local syncpoint, or out of syncpoint. Valid values are none, local, and global.

The Validation properties of the JMSInput node are described in the following table. For more details, see Validation properties.

Property M C Default Description
Validate Yes Yes None This property controls whether validation takes place. Valid values are None, Content, and Content And Value.
Failure Action Yes No Exception This property controls what happens if validation fails. You can set this property only if you set Validate to Content or Content and Value. Valid values are User Trace, Local Error Log, Exception, and Exception List.
Include All Value Constraints Yes No Selected You cannot edit this property. Basic value constraint checks are included in Content and Value validation.
Fix Yes No None You cannot edit this property.
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2007Copyright IBM Corporation 1999, 2007. All Rights Reserved.
This build: July 31, 2007 21:19:35

ac24820_ This topic's URL is: