Creating the Connector Plugin

Applies to ReadyAPI 3.57, last modified on December 20, 2024

About JMS Connector Plugins

JMS connector plugins serve as a way to deliver the JMS client libraries to ReadyAPI and support direct connections to JMS brokers. The plugins provide ReadyAPI with template values that can be used for a connection. The initial context class cannot be changed in the UI, but other values are provided as a template.

Requirements

  • You need Java libraries you use to connect to your JMS provider.

  • We recommend that you have a Java Development Kit (JDK) installed and configured.

Before Creating Plugin

During the plugin configuration, you will need to know the following values:

  • Initial Context Class name

  • Provider URL

  • Connection Factory JNDI name

To get these values, you need to configure the JMS provider first.

Create a JAR File

To create a plugin jar file:

  1. In File Explorer, create an empty folder. This folder will become the root folder of the plugin.

  2. In the created directory, create the lib subfolder.

  3. Copy the JMS client libraries in the .jar format to the lib folder.

    If the JMS client libraries depend on other libraries, copy the latter to the lib folder, as well.

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

    ActiveMQ

    WebSphere MQ 8 and 9

    WebSphere MQ 7

  4. Download the jms-plugin.properties file and save it to the root folder of the plugin.

  5. You should have the following file structure:

    <Plugin root folder>
    |--lib
       |--<Provider’s jar files>
    |--jms-plugin.properties

  6. Open the file in any text editor and edit the default values. Comments in the file help you understand what the properties mean.

  7. Configure the properties that affect the way the plugin works with ReadyAPI and the way it will be represented in the ReadyAPI interface.

    Property Description
    plugin.name The name of the plugin that will be displayed in the Plugin Manager. Does not affect your tests.
    plugin.version The version of the plugin that will be displayed in the Plugin Manager. Does not affect your tests.
    plugin.description The description of the plugin that will be displayed in the Plugin Manager. Does not affect your tests.
    plugin.autodetect Commands ReadyAPI to search for plugin components that are used in Custom Plugins. If set to false, ReadyAPI will only load the JMS client libraries.
    Only set to true if you plan to add custom elements to the plugin.
    minimum.ready.version The minimum supported version of ReadyAPI. The plugin will not be loaded in unsupported versions.
    connector.label The label that is used to select the plugin in ReadyAPI interface.
  8. Configure the properties that affect the way the plugin works with a JMS provider. When you configure them, you might need to specify the values that you get when you configure the JMS provider.

    initial.context.class.name

    The Context.INITIAL_CONTEXT_FACTORY property that the plugin uses to connect to the JMS provider. You can usually find the context factory in the JMS provider documentation.

    Here are classes name for some popular JMS providers:

    ActiveMQ org.apache.activemq.jndi.ActiveMQInitialContextFactory
    WebSphere MQ Specify the value that you get from the Initial Context Factory property when you configure the WebSphere MQ installation.
    Oracle Weblogic weblogic.jndi.WLInitialContextFactory
    TIBCO EMS com.tibco.tibjms.naming.TibjmsInitialContextFactory

    provider.url.template

    The URL of the service that will be suggested by the plugin by default. The user can change it at any point.

    Here are example values for some popular JMS providers:

    ActiveMQ tcp://<hostname>:61616
    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

    connection.factory.name.template

    The suggested Java Connection Factory that is used to create a connection to the JMS broker.

    Here are example values for some popular JMS providers:

    ActiveMQ ConnectionFactory
    WebSphere MQ Specify the value that you specify for the Connection Factory when you configure the WebSphere MQ installation.
  9. Build the plugin. You can do it in two ways:

    By using JDK

    By using a file archiver

After you have a final .jar file, you can install it as described in the ../../integrations/managing.html#install-from-file topic.

See Also

JMS Virtual Services
JMS Support

Highlight search results