This topic provides a reference for configuring SOAtest and Virtualize for popular JMS providers.

Sections include:

Adding Required jar Files

To add the required jar files (listed in the tables below) to theSOAtest and Virtualize classpath, complete the following:

  1. Choose Parasoft> Preferences.
  2. Open the Parasoft> System Properties page.
  3. Click the Add JARS button and choose and select the necessary JAR files to be added.

JNDI Authentication

Any time that a username and password are required to connect to a JMS system that is configured to require authentication for JNDI access, the following JNDI properties must be configured:


Amazon Simple Queue Service (SQS)


Amazon Simple Queue Service (SQS) and other JMS providers where building JMS ConnectionFactory through JNDI lookup is difficult.

Minimum required JARs

Amazon SQS java client JARs:

  • amazon-sqs-java-messaging-lib-<version>.jar
  • aws-java-sdk-sqs-<version>.jar
  • aws-java-sdk-core-<version>.jar
  • aws-java-sdk-sts-<version>.jar

Apache httpclient dependencies:

  • httpclient-<version>.jar
  • httpcore-<version>.jar

WSO2 carbon-jndi JAR:


Factory class

InMemoryInitialContextFactory from the WSO2 carbon-jndi project. See Creating the JMS ConnectionFactory Object.

Connecting to AWS

Use I AM user roles for connecting to AWS. Refer to the following Amazon documentation for details:

Learn more

Creating the JMS ConnectionFactory Object

The following Groovy script is provided to help you create a JMS ConnectionFactory object and bind it to an in-memory InitialContext (bindConnectionFactory method). Run the script once per SOAtest or Virtualize startup. You can run the script using an Extension tool (e.g., setup test in a SOAtest .tst or a Virtualize .pvn) for each .tst that requires the object, or implement a more sophisticated process that automates script execution in a manner suitable to your environment. 

The script supports two methods of authenticating with AWS. If your SOAtest/Virtualize server is deployed within an AWS environment, AWS recommends using the instance provider flow for authentication. Alternatively, you can authenticate with AWS using the static mode, which requires the region, accessKey, and secretKey. See Script Variables for information about the authentication variables defined in the script.

import java.util.*

import javax.jms.*
import javax.naming.*

import com.amazonaws.auth.*
import com.amazonaws.regions.*

// Specify how you want to connect to AWS ("instance" or "static")
provider = "instance"

// Access keys for CLI, SDK, & API access
// see
accessKey = ""
secretKey = ""
region = Regions.US_WEST_1

// Multi-factor authentication
// set serialNumber to null if MFA not enabled
serialNumber = null
tokenCode = ""   // code from Google Authenticator (for example)
durationSeconds = 3600

void bindConnectionFactory() {
    Properties env = new Properties()
    env.put(Context.INITIAL_CONTEXT_FACTORY, "org.wso2.carbon.jndi.internal.InMemoryInitialContextFactory")
    Context ctx = new InitialContext(env)
    SQSConnectionFactory sqsConnectionFactory = createSQSConnectionFactory()
    ctx.rebind("SQSConnectionFactory", sqsConnectionFactory)

SQSConnectionFactory createSQSConnectionFactory() {
    AWSCredentialsProvider credentialsProvider = null
    if (provider.equals("instance")) {
        credentialsProvider = new InstanceProfileCredentialsProvider(false)
    } else {
        credentialsProvider = new AWSStaticCredentialsProvider(
                new BasicAWSCredentials(accessKey, secretKey))
        if (serialNumber != null) {
            credentialsProvider = getTemporaryCredentials(credentialsProvider)
    return new SQSConnectionFactory(
            new ProviderConfiguration(),

AWSStaticCredentialsProvider getTemporaryCredentials(AWSCredentialsProvider credentialsProvider) {
    AWSSecurityTokenService sts_client = null
    try {
        sts_client = AWSSecurityTokenServiceClientBuilder.standard()
        Credentials creds = sts_client.getSessionToken(new GetSessionTokenRequest()
        return new AWSStaticCredentialsProvider(
                new BasicSessionCredentials(
    } finally {
        if (sts_client != null) {

A SQSConnectionFactory will be created and bound to the name SQSConnectionFactory. Set the initial context to org.wso2.carbon.jndi.internal.InMemoryInitialContextFactory and connection factory to SQSConnectionFactory in any JNDI properties for looking up JMS ConnectionFactory.

Provider URL is unused because the JMS ConnectionFactory is created programmatically and not dynamically based on URL. For some SOAtest and Virtualize interfaces, such as the Virtualize Message Proxy, the provider URL field is required. In these cases, enter any non-empty string for the dialog to accept your configuration settings.

You can create a Messaging Client and send/receive messages for one of the queues that were already defined. You will be able to also see all the expected JMS header properties, including message IDs.

Script Variables

The following table describes the variables used in the script:




Access key credentials for CLI, SDK, and API access.
serialNumberNumber that uniquely identifies the device if multi-factor authentication (MFA) is enabled. For virtual MFA devices, the serial number is the the Amazon resource name (ARN) of the device as shown on the AWS security credentials page.
tokenCodeThe value returned by your MFA device, such as Google Authenticator.
durationSecondsThe value specifying how long the temporary MFA credentials will be valid.

Apache ActiveMQ

ForFor Apache Active MQ
Minimum required jarsFound under the ActiveMQ installation directory
- activemq-all-[version].jar
Typical provider URL patterntcp://hostname:61616
Factory class

JNDI Initial Context factory class
- org.apache.activemq.jndi.ActiveMQInitialContextFactory

Default connection factory JNDI name
- ConnectionFactory

Learn more

Apache Qpid

ForFor Apache Qpid
Minimum required JARs

Found in qpid-java-client-{ver}.tar.gz from

The jars vary depending on the version of Qpid. The jar for Qpid 0.8 includes the following:

  • backport-util-concurrent-2.2.jar
  • geronimo-jms_1.1_spec-1.0.jar
  • mina-core-1.0.1.jar
  • mina-filter-ssl-1.0.1.jar
  • qpid-all.jar
  • qpid-client-0.8.jar
  • qpid-common-0.8.jar
  • slf4j-api-1.6.1.jar
Connection URL JNDI propertyconnectionfactory.<jndiname> 
For example:
connectionfactory.local = amqp://user:password@clientid/testpath?brokerlist='tcp://localhost:5672'
Factory class

JNDI Initial Context factory class
- org.apache.qpid.jndi.PropertiesFileInitialContextFactory

Learn more

GlassFish MQ

ForFor GlassFish
Minimum required JARs

GlassFish 3 - Found under [GlassFish install directory]/glassfish/lib: - gf-client.jar

Note that the gf-client.jar references a few dozen other jars from the GlassFish 3 installation. You must reference gf-client.jar from the GlassFish installation directory so that the referenced jars can be found and loaded. GlassFish can be downloaded from

GlassFish 2 - Found under [GlassFish install directory]/lib:

- appserv-admin.jar
 - appserv-deployment-client.jar
 - appserv-ext.jar
 - appserv-rt.jar
 - javaee.jar
 - install/applications/jmsra/imqjmsra.jar

Typical provider URL patterniiop://yourhostname:3700
Factory class

JNDI Initial Context factory class
- com.sun.enterprise.naming.SerialInitContextFactory

Note that GlassFish has another JNDI Initial Context factory class called "com.sun.appserv.naming.S1ASCtxFactory". This class has poor performance and should not be used. Use the mentioned SerialInitContextFactory class instead which is available in both GlassFish 2 and GlassFish 3.

NotesThe GlassFish client and GlassFish server perform a reverse DNS lookup on each other. If the server does not recognize the client's host name, then you can add the client's host name and IP address to the hosts file on the server. If the client does not recognize the server's host name, then you can add the server's host name and IP address to the hosts file on the client. The hosts file is typically /etc/hosts on Unix or %SystemRoot%\system32\drivers\etc\hosts on Windows.
Learn more

IBM WebSphere Application Server (WAS)

ForFor the WAS Default JMS provider. Parasoft recommends the use of IBM's JMS thin client that is provided by WAS 7.0 or later, and which can interoperate with WAS 6.0.2 and later.
Minimum required JARs

Found under [WAS installation dir]/runtimes

Typical provider URL patterniiop://yourhostname:2809/
Factory class

JNDI Initial Context factory class

Learn moreWebSphere Application Server Network Deployment, Version 7.0 documentation

What if you don’t have WAS 7.0 or later?

If you aren’t using (or don’t have access to) a WAS 7 installation, download and install the IBM Client for JMS, which also works with WAS 6.0.2 and later:

  1. Download the JMS Client installer jar from
  2. Follow the instructions on the download page to install both the JMS and JNDI jars for the Sun JRE. The command to install the client jars is similar to:
    "java -jar sibc_oeminst-o0902.06.jar jms_jndi_sun C:\ibmjms"
    The client jars will be installed under the lib folder.
  3. Add the JNDI property
    • For simplicity, this jndi property can be set globally in a file in the JRE's lib folder.
    • For the standalone build of this product, the JRE lib folder is under <INSTALL>/plugins/com.parasoft.ptest.jdk.eclipse.core.web.<OS>.<ARCH>_<VERSION>/jdk/jre/lib.
    • This JNDI property is not needed when using the jars from the WAS 7 runtimes folder.

IBM WebSphere MQ (MQ Series)


For the WebSphere MQ JMS provider

Minimum required JARs

For MQ 9

You can find these under [WebSphere MQ installation directory]/java/lib:


For MQ 8

You can find these under [WebSphere MQ installation directory]/java/lib:


For MQ 7.0

You can find these under [WebSphere MQ installation directory]/java/lib:

  • connector.jar
  • dhbcore.jar

You also need to download the following jar:

  • ME01: WebSphere MQ - Initial Context Factory — mqcontext.jar

For MQ 6.0

You can find these under [WebSphere MQ installation directory]/java/lib:

  • - connector.jar
  • dhbcore.jar
  • jta.jar

You also need to download the following jars:

  • MS0B: WebSphere MQ Java classes for PCF —
  • ME01: WebSphere MQ - Initial Context Factory — mqcontext.jar

MQ Client Download

The jars from [WebSphere MQ installation directory]/java/lib are also included in the MQ Client. The MQ 6 Client is no longer available from IBM. The MQ 7 Client is available at

Typical provider URL pattern


Factory class

WebSphere MQ JNDI Initial Context factory class -

SSL configuration

WebSphere JMS clients can achieve SSL connections by setting the appropriate properties in the initial context. Both WebSphere MQ and WebSphere JMS clients will set the same properties for SSL connectivity.

JMS messaging without JNDI

Under the properties tab, define the following properties:
Name: Value
provider:  WebSphere MQ
queue.manager: [your queue manager name]
channel: [your channel name]
port: [port number, the default WebSphere MQ port is 1414]
With this configuration, SOAtest/Virtualize will create the connection factory using the provided parameters as follows:

  MQConnectionFactory cf = new MQConnectionFactory();
 Additional information

IBM's JNDI provider authenticates itself with the Websphere MQ server by sending the user's login name. This is typically the user name that was provided when logging into the workstation before starting SOAtest/Virtualize.

If the MQ server does not recognize the user name, then your tool will fail with the error "javax.jms.JMSSecurityException: MQJMS2013: invalid security authentication supplied for MQQueueManager".

This error can be resolved by adding a Windows user account on the Websphere MQ server machine. This account should 1) have the same user name as the account on the local machine whereSOAtest and Virtualizeis running and 2)  be a member of the "mqm" IBM WebSphere MQ Administration Group.

Alternatively, use a different user name by changing the value of the Java System property. This system property can be configured by startingSOAtest and Virtualizeusing soatest/virtualize.exe where username is the user name you want to use. In some configurations using an empty username via soatest/virtualize.exe will work. Using SYSTEM for the property may also work in some configurations. 

It is also possible to modify Java system properties during test suite execution by using an Extension Tool to call the java.lang.System.setProperty() method from Sun's Java API.

For more details on this error, see

Learn more


ForFor JBoss JMS; the following jar list is based on JBoss 5.0
Minimum required JARs

Found under [JBoss install dir]/client
 - jboss-javaee.jar
 - jnp-client.jar
 - jboss-logging-spi.jar
 - jboss-messaging-client.jar
- jboss-aop-client.jar
 - jboss-remoting.jar
 - jboss-common-core.jar
 - trove.jar
 - javassist.jar
 - jboss-mdr.jar
 - concurrent.jar
 - log4j.jar
 - jboss-serialization.jar

Typical provider URL patternyourhostname
Factory class

JNDI Initial Context factory class
- org.jnp.interfaces.NamingContextFactory

Open Message Queue (OpenMQ)

Note that OpenMQ can run by itself or as part of Glassfish App Server, where it is called "Glassfish MQ". If you are using OpenMQ from Glassfish, see the GlassFish section.

ForFor  OpenMQ Server
Minimum required JARs

Found under [OpenMQ install dir]/mq/lib
 - fscontext.jar  
 - imq.jar
 - jms.jar

Typical provider URL patternyourhostname
Factory class

JNDI Initial Context factory class
- com.sun.jndi.fscontext.RefFSContextFactory

Learn more

Oracle Advanced Queuing  (AQ)

ForFor Oracle Advanced Queuing (AQ)
Minimum required JARs

From Oracle Database installation:
- server/rdbms/jlib/aqapi.jar 
- server/jdbc/lib/ojdbc6.jar


From Oracle Weblogic Server installation:
- server/lib/aqapi.jar 
- server/lib/ojdbc6.jar

Provider URLLeave this field empty.
JNDI initial context factory classoracle.jms.AQjmsInitialContextFactory
Connection factory JNDI name

One of the following:
- QueueConnectionFactory
- TopicConnectionFactory
- ConnectionFactory
- XAQueueConnectionFactory
- XATopicConnectionFactory
- XAConnectionFactory

Required JNDI properties<username><password>

Queue/topic names

Prefix a queue name with Queues/ and a topic name with Topics/. For example:
Queue: Queues/<queue_name> 
Topic: Topics/<topic_name>

Additional informationThe aqapi.jar from older version of Oracle Database, such as 10g, may be missing the Initial Context factory class. Use the jars from Oracle Database 11g or later. The latest Oracle Database Express Edition (XE) can be downloaded from
Oracle Database Express Edition 11g Release 2
Learn moreInteroperating with Oracle AQ JMS

Oracle BEA WebLogic

ForFor Oracle BEA WebLogic
Minimum required JARs (thin client) *

Found under [weblogic home]/wlserver_x/server/lib
 - wljmsclient.jar 
 - wlclient.jar

Note that additional jars may be needed. We recommend using a full client; this relieves you from having to find and add many jars.

Minimum required JARs (full client) *Build the single wlfullclient5.jar as described in the instructions for "Creating a wlfullclient5.jar for JDK 1.5 client applications."
Typical provider URL pattern

Thin Client:

Full Client:

Factory class

JNDI Initial Context factory class:
- weblogic.jndi.WLInitialContextFactory

Learn more

Progress Sonic MQ/ESB

ForFor Progress Sonic MQ/ESB
Minimum required JARs

Found under [sonic install dir]/MQ7.x/lib
- mfcontext.jar 
- broker.jar
- sonic_Client.jar

Note that SonicMQ's broker.jar and TIBCO’s tibcojms.jar cannot be used together.

Typical provider URL Pptterntcp://yourhostname:2506
Factory class

JNDI Initial Context factory class
- com.sonicsw.jndi.mfcontext.MFContextFactory

Learn moreRefer to SonicMQ Application Programming Guide, Appendix A (Using the Sonic JNDI SPI) and which also refers to other relevant sections.


ForFor RabbitMQ
Minimum required JARs

Download client library from Maven's Central Repository.


.bindings file example#This file is used by the JNDI FSContext.
#Wed Jan 31 15:36:15 PST 2018
Typical provider URL pattern

The directory path containing the .bindings file


Initial contextcom.sun.jndi.fscontext.RefFSContextFactory
Connection factory

JNDI Initial Context factory class
- ConnectionFactory

Solace JMS

ForFor Solace JMS
Minimum required JARscommons-lang-<version>.jar
Typical provider URL patternsmf://<host>:<port>
Factory class

JNDI Initial Context factory class
 - com.solacesystems.jndi.SolJNDIInitialContextFactory
There is no default name; the specific JNDI name is needed to look up the connection factory.

The additional JNDI property  Solace_JMS_VPN=myvpn must be set in order to gain access to look up the connection factory. There is no default vpn name.

Sun Java System Message Queue (Sun MQ)

ForFor  Sun MQ Server
Minimum required JARs

Found under [Sun MQ install dir]Sun/MessageQueue/mq/lib
- fscontext.jar
- imq.jar
- jms.jar

Typical provider URL patternyourhostname
Factory class

JNDI Initial Context factory class
- com.sun.jndi.fscontext.RefFSContextFactory

Learn moreSee the Sun Java System Message Queue Administration 3.x/4.x Guide, Section Quick-Start Tutorial. This document can be downloaded from In the document, navigate to Software> Application & Integration Services> Message Queue.


Minimum required JARs

Found under [TIBCO install dir]/ems/clients/java
- tibjms.jar
- tibcrypt.jar (required for SSL)

Note that SonicMQ's broker.jar and TIBCO’s tibcojms.jar cannot be used together.

Typical provider URL patterntcp://yourhostname:7222
yourhostname (if using default port numbers)
Factory class

JNDI Initial Context factory class
- com.tibco.tibjms.naming.TibjmsInitialContextFactory

SSL configuration

The following JNDI properties must be configured:
- com.tibco.tibjms.naming.security_protocol=ssl
- com.tibco.tibjms.naming.ssl_enable_verify_host=false
- com.tibco.tibjms.naming.ssl_enable_verify_hostname=false

For two-way SSL, the following additional properties must also be configured:
 - com.tibco.tibjms.naming.ssl_identity=<path to client keystore>
 - com.tibco.tibjms.naming.ssl_password=<keystore password>
 - com.tibco.tibjms.naming.ssl_trusted_certs=<path to trusted certificate> 
- com.tibco.tibjms.naming.ssl_vendor=j2se
 - com.tibco.tibjms.naming.ssl_auth_only=true/false

Additional information

Any time that a username and password is needed to connect to Tibco EMS the following JNDI properties must be configured:

Learn moreRefer to the TIBCO Enterprise Message Service User's Guide, section 9: Developing an EMS Client Application> Programmer Checklist


SOAtest and Virtualize bundle a Sun JNDI implementation that stores JNDI bindings in directories and files on the local hard drive using com.sun.jndi.fscontext.RefFSContextFactory as the Initial Context and a user defined Provider URL (directory) of “C:\JNDIRoot” or something similar.

When using the Sun implementation, you must populate the “C:\JNDIRoot” directory with a .binding file so that fscontext can successfully look up the ConnectionFactory and Queue or Topic objects. Parasoft has put together an example that can be found in the SOAtest/Virtualize installation directory (/examples/jms/, which creates a .binding file.

Other JMS Providers

For other JMS providers, please refer to your vendor guides on how to configure a JMS client to communicate with your system.

  • No labels