Previous | Home | Next
Configuring messaging providers
Asynchronous messaging support provides applications with the ability to create, send, receive, and read asynchronous requests as messages. WAS V8.5 supports asynchronous messaging based on the JMS and the Java EE Connector Architecture (JCA) specifications.WAS includes a default messaging provider and support for WebSphere MQ and third-party messaging providers. In this chapter, we introduce how to configure these messaging providers step-by-step.
Messaging providers introduction
WAS V8.5 supports a variety of JMS providers, including:
- The WAS default messaging provider, which is a JCA resource adapter implementation fully integrated into WebSphere. The default messaging provider uses a service integration bus as the messaging system.
- The WebSphere MQ messaging provider, which uses a WebSphere MQ installation as the provider.
- Third-party messaging providers that implement either a JCA v1.5 or 1.6 resource adapter or JMS v1.1 unified connection factories.
To work with message-driven beans, third-party non-JCA messaging providers must include Application Server Facility (ASF), which is an optional feature part of the JMS v1.1 specification.
Configure resources for the default messaging provider
To enable a messaging application to use the WAS default messaging provider, configure the following resources:
- A connection factory
- A JMS destination
- A JMS activation specification
The sections that follow explain how to configure these resources step-by-step.
Configure JMS connection factories
To configure a JMS connection factory for the default messaging provider:
- If we did not create a service integration bus, create it now. (Refer to WAS V7 Messaging Administration Guide, SG24-7770 for details.) In this example, we use a bus called SampleBus.
- Click...
Resources | JMS | Connection factories (Cell) | New
- Select the Default messaging provider option and then click OK.
- Enter the following basic properties:
- Name
- JNDI name
- Bus names
In this example, SampleJMSCF connects to SampleBus. The JMS application accesses the factory using the JNDI name jms/SampleJMSCF.
- Click OK to create the new connection factory, which is then listed among the resources to be administered
- Save the changes to the configuration.
Configure JMS destinations
We can configure both queue and topic destinations for the default messaging provider. In this section, we describe how to create and configure a JMS queue. Refer to WAS V7 Messaging Administration Guide, SG24-7770.
To configure JMS destinations:
- Create a new destination in the service integration bus.
Service integration | Buses | SampleBus | Destination resources | Destination | New
- Select Queue as the destination type and then click Next.
- Enter the identifier for the queue destination and then click Next.
- Accept the default values for the other options by clicking Next and then Finish. A new queue named SampleJMSQueueDest is created.
- Save the changes to the configuration.
Configure JMS queues
A JMS queue is an administrative object containing the name of a queue destination on a service integration bus. Applications find the JMS queue by looking up the JMS queue name in the JNDI namespace.
To configure a JMS Queue:
- Click...
Resources | JMS | Queues | Scope (Cell) | New
- Select the Default messaging provider option and then click OK.
- Enter the following basic properties:
- Name
- JNDI name
- Bus name
- Queue name
In this example, the queue name is SampleJMSQueue.
- Click OK. The new queue is created.
- Save the changes to the configuration.
Configure JMS activation specifications
Activation specifications are used to configure inbound message delivery to message-driven beans (MDBs) running inside WAS. A JMS activation specification is associated with a MDB during application deployment.
To configure a JMS activation specification for the default messaging provider:
- Click...
Resources | JMS | Activation specifications | Scope (Cell) | New
- Select the Default messaging provider option and then click OK.
- Enter the following basic properties:
- Name
- JNDI name
- Destination type
- Destination JNDI name
- Bus name
In this example, the activation specification name is SampleJMSAS.
We can configure other properties for this activation specification if needed.
- Click OK. The new activation specification is created.
- Save the changes to the configuration.
Configure resources for the WebSphere MQ messaging provider
In this section, we explain how to configure the resources for the WebSphere MQ messaging provider to communicate with WebSphere MQ using bindings or client connections.
Configure WebSphere MQ messaging provider connection factories
To configure a JMS connection factory for the WebSphere MQ messaging provider, complete the following steps:
- Click...
Resources | JMS | Connection factories | Scope (Cell) | New
- Select the WebSphere MQ messaging provider option and then click OK.
- Enter the name for the connection factory and the JNDI name that binds it to the namespace and then click Next .
- Select the Enter all the required information into this wizard option and then click Next.
Refer to WAS V7 Messaging Administration Guide, SG24-7770.
- Specify the queue manager or queue sharing group name and then click Next
- Choose the transport type, specify the host name and port properties of the WebSphere MQ queue manager, and click Next.
The port must match the listener port defined for the queue manager, for example, 1424.
WAS V8.5 supports connections to multi-instance WebSphere MQ queue managers. To do this, you provide host and port information in the form of a connection name list, which a connection factory or activation specification uses to connect to a multi-instance queue manager. If we are using multi-instance WebSphere MQ queue managers, select Enter host and port information in the form of a connection name list.
- Click Test connection to verify that we can connect to the WebSphere MQ queue manager and then click Next.
- In the Summary window, review the summary and then click Finish. The new connection factory is created.
- Save the changes to the configuration.
WAS V8.5 exposes the client reconnection properties for connection factories. We can use this property to specify whether a client mode connection reconnects automatically, in the event of a communications or queue manager failure, and also to specify a timeout value for reconnection attempts.
We can find this property on the Advanced properties window of a defined WebSphere MQ connection factory.
Configure WebSphere MQ messaging provider destinations
We can configure both the queue and topic destinations for the WebSphere MQ messaging provider. In this section, we introduce how to create and configure the WebSphere MQ queue destination. For information about creating and configuring the WebSphere MQ topic destination, refer to WAS V7 Messaging Administration Guide, SG24-7770.
To configure a queue destination for the WebSphere MQ messaging provider:
- Click...
Resources | JMS | Queues Scope (Cell) | New
- Select the WebSphere MQ messaging provider option and then click OK.
- Enter the following basic properties:
- Name
- JNDI name
- Queue name
In this example, the queue name is SampleMQQueue, which must match the queue name defined in the MQ queue manager to which we are connecting.
- Click OK. The new queue is now created.
- Save the changes to the configuration.
WAS V8.5 provides several advanced properties for WebSphere MQ queue or topic destinations, including:
- Append RFH version 2 headers to messages sent to this destination
This applies to reply messages sent to the reply-to queue obtained from a message. Select this option to append an RFH version 2 header to the reply message regardless of whether the original message had an RFH version 2 header.
Set in the Advanced properties window of a defined WebSphere MQ queue.
- Reply to style
How the JMSReplyTo header field in a WebSphere MQ messaging provider message is generated.
Set in the Advanced properties window of a defined WebSphere MQ queue
- Message descriptor
- Whether an application can read or write the values of MQMD fields from JMS messages that were sent or received using the WebSphere MQ messaging provider.
- Which message context options are used when sending messages to a destination.
Set these properties in the Advanced properties window of a defined WebSphere MQ queue.
Configure WebSphere MQ messaging provider activation specifications
To configure an activation specification for the WebSphere MQ messaging provider:
- Click...
Resources | JMS | Activation specifications | Scope (Cell) | New
- Select the WebSphere MQ messaging provider option and then click OK.
- Enter the following basic properties:
- Name
- JNDI name
- Click Next and then enter the information of the destination.
In this example, the destination JNDI name is...
jms/SampleMQQueue
- On the next page, select...
Enter all the required information into this wizard
- Enter the name of the queue manager or queue sharing group and then click Next
- Select the transport method.
- Enter the host and port information of WebSphere MQ and then click Next...
- Click Test connection.
- In the Summary window, review the summary and then click Finish.
The new activation specification is created.
- Save the changes to the configuration.
WAS V8.5 exposes several WebSphere MQ connection properties to configure the WebSphere MQ resource adapter used by the WebSphere MQ messaging provider. Among these properties, which affect the connection pool used by activation specifications, are:
- maxConnections
- connectionConcurrency (WAS V7 nodes only)
- reconnectionRetryCount
- reconnectionRetryInterval
To configure these properties...
JMS providers | WebSphere MQ messaging provider | Additional properties | Resource adapter properties
Configure resources for third-party messaging providers
For messaging between application servers, most requirements can be satisfied using either the WAS default messaging provider or the WebSphere MQ messaging provider. However, if desired, we can instead use a third-party messaging provider.
To administer a third-party messaging provider, use either...
- The resource adapter (JCA 1.5 or 1.6)
- The client (Non-JCA) supplied by the third party
In this section, we describe how to configure a third-party, non-JCA messaging provider using the dmgr console. We can configure any third-party non-JCA messaging provider that supports the JMS v1.1 unified connection factory.
Configure JMS messaging providers
To define a new third-party messaging provider:
- Click...
Resources | JMS | JMS providers | Scope (Cell) | New
- Enter the following properties:
- Name
- Class path
- Native library path
- External initial context factory.
Java class name of the third-party JMS provider's initial context factory. For example, for the ActiveMQ JMS provider, this is...
org.apache.activemq.jndi.ActiveMQWASInitialContextFactory
- External provider URL.
JMS provider URL for external JNDI lookups.
Format...
<protocol>://<host name>:<port number>
- Click OK. A new JMS provider is created.
- Save the changes to the configuration.
Configure JMS connection factories
To configure a JMS connection factory for a third-party JMS provider:
- Click...
Resources | JMS | Connection factories | Connection factories | Scope (use Cell scope in this sample) | New
- Choose the third-party JMS provider created in the previous sub-section and then click OK.
- Enter the following basic properties:
- Click OK. The new connection factory is created.
- Save the changes to the configuration.
Configure JMS destinations
We can configure both queue and topic destinations for third-party JMS messaging providers. In this section, we describe how to create and configure a JMS queue.
To configure a JMS destination:
- Click...
Resources | JMS | Queues | Scope (Cell) | New
- Select the Generic JMS provider option and then click OK.
- Enter the following basic properties:
- Click OK. The new queue is created.
- Save the changes to the configuration.