XMS element

IBMStreams com.ibm.streamsx.messaging Toolkit > com.ibm.streamsx.messaging 5.4.3 > Connection specifications document > Connection_specification element > XMS element

The <XMS> element specifies the information that is needed by the XMSSink and XMSSource operators to establish a connection to messaging system. The <XMS> element does not actually contain the information; rather, it references an XMS or JMS administered object, which is held in an external directory service. The information about how to make the connection is held in this administered object.

Here is an example connection specification that contains an <XMS> element:

<connection_specification name="wbe">
  <XMS initial_context="file:///opt/InitialContext/" 
    connection_factory="TestConFac" 
    user="user1"
    password="password1" />
</connection_specification>
The <XMS> element has four attributes:
  • initial_context
    • This mandatory attribute value is a URL that points to the directory service that contains the administered objects. It uses the reference JNDI implementation, which stores objects in the file system. The syntax of the URL can take four forms:
      • file:///xxx/yyy/zzz: This format specifies that the JNDI objects are stored in a file that is called zzz, which is in the directory xxx/yyy.
      • file:xxx/yyy/zzz: This format specifies that the JNDI objects are stored in a file that is called zzz, which is in the directory xxx/yyy relative to the application directory.
      • file:///xxx/yyy/: This format specifies that the JNDI objects are stored in a file that is called .bindings, which is in the directory xxx/yyy.
      • file:xxx/yyy/: This format specifies that the JNDI objects are stored in a file that is called .bindings, which is in the directory xxx/yyy relative to the application directory. By default, the MQExplorer tool puts its entries in a file called .bindings.
  • connection_factory
    • This mandatory attribute value is the name of the ConnectionFactory administered object. In particular, it is the administered object within the directory service context that is specified by the initial_context attribute, and it is used to make the connection.
  • user
    • This optional attribute value provides the user identification that is used to connect to the messaging provider. If this attribute is not specified, a NULL value is used for the corresponding parameter in the XMS connect() function call.
  • password
    • This optional attribute value provides the authentication credentials (password) for the user ID. If this attribute is not specified, a NULL value is used for the corresponding parameter in the XMS connect() function call.