To enable jms messaging between two liberty profiles

  • No School
  • AA 1
  • ghitaarab
  • 672

This preview shows page 495 - 497 out of 672 pages.

To enable JMS messaging between two Liberty profiles, one instance is defined as the client by enabling the wasJmsClient-1.1 feature in the server configuration. The other instance is defined as the server by enabling the feature wasJmsServer-1.0. The server instance must define these objects: The messaging engine by using the messagingEngine element and the queue or topic property. The endpoint by using the wasJmsEndpoint element. The wasJmsPort specifies the messaging engine listener port. Example 13-1 shows a Liberty profile server configuration that is defined for use with a JMS server. The configuration defines a queue named queue1 . The listener port is 9011 . The jndi-1.0 feature is included so that the application can run a JNDI lookup. Example 13-1 Liberty profile using JMS messaging: Server definition <featureManager> <feature>wasJmsServer-1.0</feature> <feature>jndi-1.0</feature> </featureManager> <wasJmsEndpoint id="InboundJmsCommsEndpoint" host="*" wasJmsPort="9011" /> <messagingEngine> <queue id="queue1" /> </messagingEngine> The client instance must define these objects: The JMS queue connection factory or topic connection factory by using the jmsQueueConnectionFactory or jmsTopicConnectionFactory elements. The remoteServerAddress property with the host name and port where the JMS server is listening. The JMS queue or JMS topic. Example 13-2 shows a Liberty profile server configuration that is defined for use with a JMS client application. Example 13-2 Liberty profile JMS client connecting to Liberty profile JMS server <featureManager> <feature>wasJmsClient-1.1</feature> <feature>jndi-1.0</feature> </featureManager>
Image of page 495
470 WebSphere Application Server V8.5 Concepts, Planning, and Design Guide <jmsQueueConnectionFactory jndiName="jms/QueueCF"> <properties.wasJms remoteServerAddress="LibertyMsgEngineServer:9011" /> </jmsQueueConnectionFactory> <jmsQueue id="queue1" jndiName="jms/Queue"> <properties.wasJms queueName="queue1" /> </jmsQueue> 13.3.2 Service integration bus messaging provider You can use a service integration bus as a server or as a client. Enabling Liberty messaging to connect to service integration bus To enable a Liberty profile to access a service integration bus in the full profile, configure the Liberty profile as the client by enabling the feature wasJmsClient-1.1 . The Liberty profile server configuration for the client must define these objects: The JMS queue connection factory or topic connection factory by using the jmsQueueConnectionFactory or jmsTopicConnectionFactory elements. The remoteServerAddress property with the host name and port where the full profile endpoint is listening. The JMS queue or JMS topic. Example 13-3 shows a Liberty profile server configuration that defines the JMS client feature and the service integration bus as the JMS server. Example 13-3 Liberty profile JMS client connecting to a bus <featureManager> <feature>wasJmsClient-1.1</feature> <feature>jndi-1.0</feature> </featureManager> <jmsQueueConnectionFactory jndiName="jms/QueueCF"> <properties.wasJms busName="SampleBus" remoteServerAddress="WebSpherehost:8888:BootStrapBasicMessaging"
Image of page 496
Image of page 497

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture