This topic provides a reference for configuring
Virtualize
for popular JMS providers.
Sections include:
Adding Required jar Files
To add the required jar files (listed in the tables below) to the
Virtualize
classpath, complete the following:
- Choose Parasoft> Preferences.
- Open the Parasoft> System Properties page.
- 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:
- java.naming.security.principal=<username>
- java.naming.security.credentials=<password>
Apache ActiveMQ
For | For Apache Active MQ |
Minimum Required jars | Found under the ActiveMQ installation directory - activemq-all-[version].jar |
Typical Provider URL Pattern | tcp://hostname:61616 |
Factory class | JNDI Initial Context factory class Default connection factory JNDI name |
Learn more | http://activemq.apache.org/jndi-support.html |
Apache Qpid
For | For Apache Qpid |
Minimum Required jars | Found in qpid-java-client-{ver}.tar.gz from http://qpid.apache.org/download.html. The jars vary depending on the version of Qpid. The jar for Qpid 0.8 includes the following:
|
Connection URL JNDI property | connectionfactory.<jndiname> For example: connectionfactory.local = amqp://user:password@clientid/testpath?brokerlist='tcp://localhost:5672' |
Factory class | JNDI Initial Context factory class |
Learn more | https://cwiki.apache.org/qpid/how-to-use-jndi.html |
GlassFish MQ
For | For 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 http://glassfish.java.net/. GlassFish 2 - Found under [GlassFish install directory]/lib: - appserv-admin.jar |
Typical Provider URL Pattern | iiop://yourhostname:3700 |
Factory class | JNDI Initial Context factory class 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. |
Notes | The 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 | http://glassfish.java.net/ |
IBM WebSphere Application Server (WAS)
For | For 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 Pattern | iiop://yourhostname:2809/ |
Factory class | JNDI Initial Context factory class |
Learn more | WebSphere 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:
- Download the JMS Client installer jar from http://www-01.ibm.com/support/docview.wss?uid=swg24012804
- 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 thelib
folder. - Add the JNDI property
com.ibm.CORBA.ORBInit=com.ibm.ws.sib.client.ORB
- For simplicity, this jndi property can be set globally in a jndi.properties file in the JRE's lib folder.
- For the standalone build of this product, the JRE lib folder is under Parasoft/Test/{ver}/plugins/com.parasoft.xtest.jdk.eclipse.core.{platform}.{arch}_{ver}/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 | For the WebSphere MQ JMS provider |
Minimum Required jars | For MQ 6.0 You can find these under [WebSphere MQ installation directory]/java/lib: You need to download these: For MQ 7.0 You can find these under [WebSphere MQ installation directory]/java/lib: You need to download these: 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 http://www-01.ibm.com/support/docview.wss?uid=swg24019253 |
Typical Provider URL Pattern | yourhostname:1414/SYSTEM.DEF.SVRCONN |
Factory class | WebSphere MQ JNDI Initial Context factory class - com.ibm.mq.jms.context.WMQInitialContextFactory |
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: import com.ibm.mq.jms.*; ... MQConnectionFactory cf = new MQConnectionFactory(); cf.setHostName(hostname); cf.setPort(port); cf.setQueueManager(queuemanager); cf.setChannel(channel); cf.setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP); cf.setFailIfQuiesce(JMSC.MQJMS_FIQ_YES); cf.setUseConnectionPooling(true); |
Additional Notes | 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 where Virtualize is 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 user.name Java System property. This system property can be configured by starting Virtualize using
|
Learn more at | http://www-01.ibm.com/software/integration/wmq/library/ http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzaw.doc/jm10320_.htm |
JBoss JMS
For | For JBoss JMS; the following jar list is based on JBoss 5.0 |
Minimum Required jars | Found under [JBoss install dir]/client |
Typical Provider URL Pattern | yourhostname |
Factory class | JNDI Initial Context factory class |
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.
For | For OpenMQ Server |
Minimum Required jars | Found under [OpenMQ install dir]/mq/lib |
Typical Provider URL Pattern | yourhostname |
Factory class | JNDI Initial Context factory class |
Learn more | http://mq.java.net |
Oracle Advanced Queuing (AQ)
For | For Oracle Advanced Queuing (AQ) |
Minimum required jars | From Oracle Database installation: or From Oracle Weblogic Server installation: |
Provider URL | Leave this field empty. |
JNDI initial context factory class | oracle.jms.AQjmsInitialContextFactory |
Connection factory JNDI name | One of the following: |
Required JNDI properties | java.naming.security.principal=<username> |
Queue/Topic names | Prefix a queue name with |
Notes | The 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.com: Oracle Database Express Edition 11g Release 2 |
Learn more | Interoperating with Oracle AQ JMS |
Oracle BEA WebLogic
For | For Oracle BEA WebLogic |
Minimum Required jars (Thin Client) * | Found under [weblogic home]/wlserver_x/server/lib 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: |
Learn more | http://docs.oracle.com/cd/E12840_01/wls/docs103/client/jarbuilder.html |
Progress Sonic MQ/ESB
For | For Progress Sonic MQ/ESB |
Minimum Required jars | Found under [sonic install dir]/MQ7.x/lib Note that SonicMQ's broker.jar and TIBCO’s tibcojms.jar cannot be used together. |
Typical Provider URL Pattern | tcp://yourhostname:2506 |
Factory class | JNDI Initial Context factory class |
Learn more | Refer to SonicMQ Application Programming Guide, Appendix A (Using the Sonic JNDI SPI) and which also refers to other relevant sections. |
RabbitMQ
For | For RabbitMQ |
Minimum Required jars | Download client library from Maven's Central Repository. rabbitmq-jms-<version>.jar |
.bindings File example | #This file is used by the JNDI FSContext. #Wed Jan 31 15:36:15 PST 2018 ConnectionFactory/FactoryName=com.rabbitmq.jms.admin.RMQObjectFactory ConnectionFactory/ClassName=javax.jms.ConnectionFactory ConnectionFactory/RefAddr/0/Type=name ConnectionFactory/RefAddr/0/Encoding=String ConnectionFactory/RefAddr/0/Content=jms/ConnectionFactory ConnectionFactory/RefAddr/1/Type=type ConnectionFactory/RefAddr/1/Encoding=String ConnectionFactory/RefAddr/1/Content=javax.jms.ConnectionFactory ConnectionFactory/RefAddr/2/Type=factory ConnectionFactory/RefAddr/2/Encoding=String ConnectionFactory/RefAddr/2/Content=com.rabbitmq.jms.admin.RMQObjectFactory ConnectionFactory/RefAddr/3/Type=host ConnectionFactory/RefAddr/3/Encoding=String ConnectionFactory/RefAddr/3/Content=host.company.com ConnectionFactory/RefAddr/4/Type=port ConnectionFactory/RefAddr/4/Encoding=String ConnectionFactory/RefAddr/4/Content=5672 |
Typical Provider URL Pattern | The directory path containing the .bindings file file://C:/JNDI/rabbitMQ/ |
Initial Context | com.sun.jndi.fscontext.RefFSContextFactory |
Connection Factory | JNDI Initial Context factory class |
Solace JMS
For | For Solace JMS |
Minimum Required jars | commons-lang-<version>.jar sol-common-<version>.jar sol-jcsmp-<version>.jar sol-jms-<version>.jar |
Typical Provider URL Pattern | smf://<host>:<port> |
Factory class | JNDI Initial Context factory class The additional JNDI property |
Sun Java System Message Queue (Sun MQ)
For | For Sun MQ Server |
Minimum Required jars | Found under [Sun MQ install dir]Sun/MessageQueue/mq/lib |
Typical Provider URL Pattern | yourhostname |
Factory class | JNDI Initial Context factory class |
Learn more | See the Sun Java System Message Queue Administration 3.x/4.x Guide, Section Quick-Start Tutorial. This document can be downloaded from http://docs.sun.com/app/docs/prod/message?l=en#hic. In the document, navigate to Software> Application & Integration Services> Message Queue. |
TIBCO EMS
For | For TIBCO EMS |
Minimum Required jars | Found under [TIBCO install dir]/ems/clients/java Note that SonicMQ's broker.jar and TIBCO’s tibcojms.jar cannot be used together. |
Typical Provider URL Pattern | tcp://yourhostname:7222 yourhostname (if using default port numbers) |
Factory class | JNDI Initial Context factory class |
SSL Configuration | The following JNDI properties must be configured: For two-way SSL, the following additional properties must also be configured: |
Notes | Any time that a username and password is needed to connect to Tibco EMS the following JNDI properties must be configured: |
Learn more | Refer to the TIBCO Enterprise Message Service User's Guide, section 9: Developing an EMS Client Application> Programmer Checklist |
Sun JMS
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/JndiFileProviderTest.java), 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.