Applies to ReadyAPI 3.0, last modified on November 12, 2019

You can configure a direct connection to the JMS provider from ReadyAPI without using any additional intermediaries.

Requirements

To connect to a JMS provider, ReadyAPI needs to load the appropriate client libraries for your JMS broker. There are two ways to get the libraries:

  • Create a JMS connector plugin. The plugin contains all the JMS client libraries and provides with the default values for the connection settings. See Creating the Connector Plugin.

  • Use JMS client libraries that are provided by your JMS broker. To do this:

    • Copy the .jar files that contain the client libraries for your JMS provider to the <ReadyAPI>\bin\ext folder.

      Here is where you can find the library files for some popular providers:

      ActiveMQ

      WebSphere MQ 8 and 9

      WebSphere MQ 7

    • Restart ReadyAPI to load the libraries.

    If you use this approach, ReadyAPI cannot identify default values, so you will need to enter them manually.

Adding JMS Server

To use a direct connection to a JMS provider, you must specify a JMS server. You can do this in the JMS dialog or when selecting a JMS endpoint.

When you create a JMS server, ReadyAPI shows the JMS configuration dialog, where you specify the settings of the server. ReadyAPI will use the connector libraries to establish a JMS connection to the specified server.

JMS testing: Adding a JMS server

Click the image to enlarge it.

Option Description
JMS Provider The list of preconfigured JMS providers.
Install the JMS Connector plugin for your JMS provider for it to appear on the list.
Initial Context Class The class that will be used to create an InitialContext object.
If you use the JMS Connector plugin, this value is provided by the plugin and cannot be changed. Otherwise, you need to set up it manually.
Here are context classes for some popular JMS providers:
Apache ActiveMQ org.apache.activemq.jndi.ActiveMQInitialContextFactory
IBM WebSphere MQ    Depends on how the context class is configured. You get this value from the Initial Context Factory property when you configure WebSphere MQ installation
Oracle Weblogic weblogic.jndi.WLInitialContextFactory
TIBCO EMS com.tibco.tibjms.naming.TibjmsInitialContextFactory

For other JMS providers, you can find the initial context class name in the provider documentation.

Provider URL The URL of the JMS server you use. The JMS Connector plugin sets a default value for the selected provider.
Here are context classes for some popular JMS providers:
Apache ActiveMQ tcp://<hostname>:61616
IBM WebSphere MQ    Specify the value that you get from the Provider URL property when you configure the WebSphere MQ installation.
TIBCO EMS tibjmsnaming://<hostname>:7222

For other JMS providers, you can find the initial context class name in the provider documentation.

Connection Factory JNDI Name The name of the ConnectionFactory object you use to connect to the JMS broker. For most JMS providers, you can specify the name during the provider setup.
The JMS Connector plugin sets a default value for the selected provider.
Here are context classes for some popular JMS providers:
Apache ActiveMQ ConnectionFactory
IBM WebSphere MQ    Specify the value, that you specify for the Connection Factory when you configure the WebSphere MQ installation.

For other JMS providers, you can find the initial context class name in the provider documentation.

User Name The name of the user that is used to authenticate with the JMS broker.
Password The password of the user who authenticates with the JMS broker.
Additional JNDI Properties Custom JNDI properties you may need depending on the JMS provider you use.
For example, the ActiveMQ JMS broker does not include a fully functional JNDI server, so you need to use the properties to provide JNDI context for your requests. You do this by adding custom properties, such as queue.SampleQueue = SampleQueue for static queues. For more information about working with JNDI in ActiveMQ, see the ActiveMQ documentation.
JMS testing: JNDI destination name

Click the image to enlarge it.

JMS Dialog

The JMS dialog contains a list of JMS servers. You select these servers when specifying an endpoint for the JMS Requests test step or when setting up a JMS virtual service.

JMS testing: List of JMS servers

Click the image to enlarge it.

To open the dialog, click JMS on the main toolbar:

JMS testing: JMS button on the main toolbar

Click the image to enlarge it.

To add, remove or configure JMS servers, use the items of the dialog’s toolbar:

JMS testing: Toolbar of the JMS dialog

See Also

JMS Support

Highlight search results