Fix Pack 8550

Deploying JMS applications to connect to the embedded messaging server

To deploy messaging applications that use the Java™ Messaging Service (JMS), you must add the wasJmsServer-1.0 and wasJmsClient-1.1 features to the server.xml file, and define the connection factory and destination properties. If you want to perform a JNDI lookup, then you must add the jndi-1.0 feature along with the other two features.

Before you begin

Ensure that a Liberty profile server is created on which you want to deploy the messaging application that uses JMS. For more information, see Creating a Liberty profile server manually.

About this task

The wasJmsServer-1.0 feature provides support for applications that use Java Messaging Service 1.1 specifications.

Procedure

  1. Add the wasJmsServer-1.0, wasJmsClient-1.1, and jndi-1.0 features to the server.xml file.
    <featureManager>
        <feature>wasJmsServer-1.0</feature>
        <feature>wasJmsClient-1.1</feature>
        <feature>jndi-1.0</feature>
    </featureManager>
  2. Add the destination definitions to the server.xml file.
    <messagingEngine>
        <queue id="QUEUE1"> </queue>
    </messagingEngine>
  3. Optional: Add the <wasJmsEndpoint> element to enable the JMS messaging engine to accept the remote incoming messaging connections from TCP/IP (with and without SSL).
    <wasJmsEndpoint id="InboundJmsEndpoint"
        host="*"
        wasJmsPort="7276"
        wasJmsSSLPort="9100">
    </wasJmsEndpoint>
    Note: Adding <wasJmsEndpoint> is optional. By default, the Liberty profile enables messaging engine to listen on 7276 port (unsecured) and 7286 (secured). If you want to specify a different port, then <wasJmsEndpoint> can be configured.
  4. Add the connection factory definitions to the server.xml file.
    • For Point-to-Point domain:
      <jmsQueueConnectionFactory jndiName="jndi_JMS_BASE_QCF">
          <properties.wasJms
          remoteServerAddress="localhost:7276:BootStrapBasicMessaging" />
      </jmsQueueConnectionFactory>
      
      <jmsQueue jndiName="jndi_INPUT_Q">
          <properties.wasJms queueName="QUEUE1" />
      </jmsQueue>
    • For Publish-Subscribe domain:
      <jmsTopicConnectionFactory jndiName="eis/tcf">
          <properties.wasJms
          clientID="defaultID" />
      </jmsTopicConnectionFactory>
      
      <jmsTopic jndiName="eis/topic1">
          <properties.wasJms topicName="Football" />
      </jmsTopic>
    The JMS applications are now connected to the embedded messaging server.

Icon that indicates the type of topic Task topic

Terms and conditions for information centers | Feedback


Timestamp icon Last updated: Monday, 21 April 2014
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=phil&product=was-express-iseries&topic=twlp_dep_msg_embedded
File name: twlp_dep_msg_embedded.html