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:
WebLogic 12 (Available in ReadyAPI up to 3.51.0 and VirtServer 3.20.0)
-
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.
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:
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:
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:
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. If you want to dynamically pass the username and password to JMS settings, store them in project properties and use property expansions to pass them: click the ellipsis button next to the User Name or Password field and select the respective project property. The property can be encrypted.
|
||||||||
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 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.
To open the dialog, click JMS on the main toolbar:
To add, remove or configure JMS servers, use the items of the dialog’s toolbar: