
![[8.5.5.6 or later]](../ng_v8556.gif)
This topic applies to WebSphere Application Server Liberty V8.5.5.9 and earlier. For the latest Liberty topics, see the WebSphere Application Server Liberty documentation.
Configuring point-to-point messaging for a single Liberty server
You can configure point-to-point messaging such as sending of messages to a queue or receiving of messages from a queue.
Procedure
- Configure the messaging features in the server.xml file. If you want to
perform a JNDI lookup, then you must also add the jndi-1.0 feature.
<featureManager> <feature>wasJmsServer-1.0</feature> <feature>wasJmsClient-2.0</feature> <feature>jndi-1.0</feature> </featureManager>
- Configure the messaging engine to create a queue, called libertyQ, as given
in the following example.
<messagingEngine> <queue id="libertyQ" forceReliability="ReliablePersistent" maxMessageDepth="5000"> </queue> </messagingEngine>
- Declare a queue connection factory resource to create a connection to the messaging engine as
given in the following example.
<jmsQueueConnectionFactory jndiName="jms/libertyQCF" connectionManagerRef="ConMgr2"> <properties.wasJms nonPersistentMapping="ExpressNonPersistent" persistentMapping="ReliablePersistent"/> </jmsQueueConnectionFactory> <connectionManager id="ConMgr2" maxPoolSize="2"/>
- Declare a queue resource to create a Producer/Consumer session to the queue,
libertyQ, as given in the following example.
<jmsQueue jndiName="jms/libertyQue"> <properties.wasJms queueName="libertyQ" deliveryMode="Application" timeToLive="500000" priority="1" readAhead="AsConnection" /> </jmsQueue>
- Declare an activation specification for the message-driven beans that are deployed on
Liberty. The message-driven beans use the activation specification to asynchronously consume
messages from the jmsQueue resource.
<jmsActivationSpec id="JMSSample/JMSApp/SampleMDB"> <properties.wasJms destinationRef="jms/libertyQue" /> </jmsActivationSpec>
The ID value must be given in the following format: application name/module name/bean name format, where application name is the name of the application that is deployed, module name is the name of the module in which the bean is packaged, and bean name is the ejb-name of the enterprise bean. Ensure that the destinationRef attribute is pointing to a valid jmsQueue resource ID.Note: The application name is applicable only if the bean is packaged within an EAR file. - Optional: You can configure the wasJmsSecurity-1.0 feature to enable the wasJmsServer-1.0 feature work in a secure mode. For more information, see Enabling secure JMS messaging for Liberty. The point-to-point messaging is configured to send messages to a queue or to receive messages from a queue.
Related tasks:


http://www14.software.ibm.com/webapp/wsbroker/redirect?version=phil&product=was-libcore-mp&topic=twlp_msg_single_p2p
File name: twlp_msg_single_p2p.html