My memory is not the best. Recently I had to write a quick Loadrunner script to connect to a JMS queue, using the OC4J Oracle containers for J2EE libraries. A simple task that caused me a little grief due to some quirky configuration details. Well I have posted some quick tips here – so next time I do this I will remember what I did.
The following was done utilising LoadRuner v11.00.0.0 Here we go:-
First of all, you need to create a new script within VUGen using the Web Services protocol. You then need to set the RunTime settings and goto JMS advanced and set the JMS connection details here: –
Make sure you put in the correct JMS Property values
PROPERTY – DESCRIPTION
jms.qcf.jndi – Queue Connection Factory JNDI reference
jms.qc.user – Queue Connection User
jms.qc.password – Queue Connection Password
jms.q.jndi – Queue JNDI reference
jms.context.class – Context Factory Class
jms.context.principal – Context Factory Principal
jms.context.credentials – Context Factory Credentials
jms.context.url – Context Factory URL
For JMS connection factory use jms/QueueConnectionFactory
You can test the sending of a message to a queue with a very simple script utilizing the LoadRunner JMS functions. Like this : –
You will however get exceptions as you need to copy some jar files from your Java runtime location to the LoadRunner directories.
I copied from c:\Program Files\Java\jre6\lib to c:\Program Files\HP\LoadRunner\jre\lib\ext the follwoing jars (obviously your installation directories for Java runtime and LOadRunner may differ)
If you cant find javax77.jar you will need to download and extract. Once this is done it should all be good.
Download from here javax77.jar
A great tool for checking your JMS connections and monitoring your queues is HermesJMS
Download from here HermesJMS