Skip to content

Configure JMS

Launch HermesJMS

Once you have configured SoapUI with the location of HermesJMS, you can start Hermes JMS from inside SoapUI.

You can start HermesJMS from the Project menu:

  • Select Project > Start HermesJMS

The HermesJMS Manager opens. 
 

HermesJMS Manager

The HermesJMS manager lets you configure the interface to your provider for use with SoapUI.

HermesJMS

Create Session

To access a provider you need to configure a session. This should include a connection factory for your provider and the needed connection details.

Configuration

To create and configure a session in HermesJMS:

Session

  • Click Create Session

Session

  • Enter a name for the session: activeMQsession

Session

  • Click Apply

The session is now ready for further configuration:

Session

  • Click OK

The session is now accessible in the HermesJMS manager:

Session

Add Provider

The provider ActiveMQ is recommended, but other providers are possible. See Providers for other providers.

Configuration

Provider

  • Start with a created Session

Add Provider

Provider

  • Choose the Providers tab first at the bottom

Provider

  • Select Classpath Groups (it may be the only one available)

  • Right-click in the Classpath Groups area

Provider

  • Select Add Group

Provider

  • Enter the name ActiveMQ-5.x.x (the version you are using)

A library is added:

Provider

The library is empty, so we need to add the .jar files.

Add .jar Files:

In this example, two .jar files are needed. If you are using another provider than ActiveMQ, others may apply.

Main .jar

Provider

  • Right-Click on Library

Jars

  • Select Add JAR(s)

  • Browse to the ActiveMQ install directory

Jars

  • Select activemq-all-5.X.X.jar (Note: Do not use activemq-client-5.X.X.jar)

  • Click Open

  • If the scan window opens, click Scan

The jar is added to the library:

Jars

Library .jar

  • Right-Click on Library

Jars

  • Select Add JAR(s)

  • Browse to the ActiveMQ install directory

Jars

  • Open the lib directory

Jars

  • Select geronimo-j2ee-management_1.X_spec-1.X.X.jar

  • Click Open

Jars

  • If the scan window opens, click Scan

The jar is added to the library:

Jars

  • Click Apply

The provider is added:

Jars

  • Click OK

The new (or modified) session is available in the HermesJMS manager:

Jars

In order to have configuration loaded, HermesJMS must be restarted.

  • Restart HermesJMS

Add Factory

A connection factory is an object used to create connections to the provider.

Configuration

To get a working Connection Factory you need to add a loader, pick the factory class and select the plugin.

Factory

  • Start with a created session containing a provider for editing

  • Click Edit

Factory

Add Loader

  • Open the Loader menu

Factory

  • Select ActiveMQ-5.x.x

Factory

Add Factory Class

  • Open the Class menu

Factory

  • Select org.apache.activemq.ActiveMQXAConnectionFactory

Factory

Add Plugin

  • Open the Plugin menu

Factory

  • Select ActiveMQ

Factory

  • Click Apply

Factory

  • Click OK

The modified session is now accessible in the HermesJMS manager:

Session

Add Properties

In order for HermesJMS to handle the connections, you need to add plugin and properties properties containing addresses to use for the broker and service.

Configuration

Properties

  • Start with a created session with a connection factory for editing

  • Click Edit

Properties

Plugin Properties

The minimum number of properties to add are the addresses to the broker and to the service:

BrokerName

  • Right-click in the Plugin Property area

Properties

  • Select Add Property

An empty property is added:

Properties

  • Click in the property column

Properties

  • Select the property brokerName

Properties

  • Click in the value column

  • Add the value localhost

Properties

ServiceURL

  • Right-click in the Plugin Property area

Properties

  • Select Add Property

An empty property is added:

Properties

  • Click in the property column

Properties

  • Select the property serviceURL

Properties

  • Click in the value column

  • Add the value service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi

Properties

Connection Factory Property

To add a Connection Factory property for the address to the broker:

  • Right-click in the Connection properties area

Properties

  • Select Add Property

An empty property is added:

Properties

  • Click in the property column

Properties

  • Select the property brokerURL

Properties

  • Click in the value column

  • Add the value tcp://localhost:61616

Properties

  • Click Apply

Properties

  • Click OK

The modified session is now accessible in the HermesJMS manager:

Session

Add Topics

A topic is a publish-subscriber destination that can have any number of senders and receivers. Every message can be consumed by multiple receivers.

Configuration

Properties

  • Start with a created session with configured properties

Topics

We will add two topics

To add two topics to the session:

First Topic:

Topics

  • Click Create Topic

Topics

  • Enter a topic Name)
  • Enter a ShortName)
  • Click OK

Topics

Second Topic

Topics

  • Click Create Topic

Topics

  • Enter a topic Name (e.g. TestQ2)

  • Enter a ShortName)

  • Click OK

Topics

In order to have configuration loaded, HermesJMS must be restarted.

  • Restart HermesJMS

Sample Configuration

After performing the necessary steps, we have a finished HermesJMS configuration, using an ActiveMQ session.

Configuration

The session is available in the HermesJMS manager:

HermesJMS

The created session in HermesJMS named activeMQSession, containing two queues, and two topics which we can use from within SoapUI.

HermesJMS