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.

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:

- Click Create Session

- Enter a name for the session:
activeMQsession

- Click Apply
The session is now ready for further configuration:

- Click OK
The session is now accessible in the HermesJMS manager:

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

- Start with a created Session
Add Provider

- Choose the Providers tab first at the bottom

-
Select Classpath Groups (it may be the only one available)
-
Right-click in the Classpath Groups area

- Select Add Group

- Enter the name
ActiveMQ-5.x.x(the version you are using)
A library is added:

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

- Right-Click on Library

-
Select Add JAR(s)
-
Browse to the ActiveMQ install directory

-
Select
activemq-all-5.X.X.jar(Note: Do not useactivemq-client-5.X.X.jar) -
Click Open
-
If the scan window opens, click Scan
The jar is added to the library:

Library .jar
- Right-Click on Library

-
Select Add JAR(s)
-
Browse to the ActiveMQ install directory

- Open the
libdirectory

-
Select
geronimo-j2ee-management_1.X_spec-1.X.X.jar -
Click Open

- If the scan window opens, click Scan
The jar is added to the library:

- Click Apply
The provider is added:

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

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.

-
Start with a created session containing a provider for editing
-
Click Edit

Add Loader
- Open the Loader menu

- Select
ActiveMQ-5.x.x

Add Factory Class
- Open the Class menu

- Select
org.apache.activemq.ActiveMQXAConnectionFactory

Add Plugin
- Open the Plugin menu

- Select
ActiveMQ

- Click Apply

- Click OK
The modified session is now accessible in the HermesJMS manager:

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

-
Start with a created session with a connection factory for editing
-
Click Edit

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

- Select Add Property
An empty property is added:

- Click in the property column

- Select the property brokerName

-
Click in the value column
-
Add the value
localhost

ServiceURL
- Right-click in the Plugin Property area

- Select Add Property
An empty property is added:

- Click in the property column

- Select the property serviceURL

-
Click in the value column
-
Add the value
service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi

Connection Factory Property
To add a Connection Factory property for the address to the broker:
- Right-click in the Connection properties area

- Select Add Property
An empty property is added:

- Click in the property column

- Select the property brokerURL

-
Click in the value column
-
Add the value
tcp://localhost:61616

- Click Apply

- Click OK
The modified session is now accessible in the HermesJMS manager:

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

- Start with a created session with configured properties
Topics
We will add two topics
To add two topics to the session:
First Topic:
- Click Create Topic

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

Second Topic

- Click Create Topic

-
Enter a topic Name (e.g.
TestQ2) -
Enter a ShortName)
-
Click OK

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:

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