title: JMS-Loadtest using Gatling: unable to initialize ContextFactory of IBM MQ
body: <p>I'm implementing a load test scenario against a IBM MQ with Gatling. 
  The setup is basically the same as mentioned <a href="https://gatling.io/docs/2.3/jms/" rel="nofollow noreferrer">here</a></p>
  
  <p>Problem: I'm not able to initialize the required <code>ContextFactory</code> with IBM MQ - which should be <code>com.ibm.mq.jms.context.WMQInitialContextFactory</code>. 
  The <code>WMQInitialContextFactory</code> cannot be found. </p>
  
  <p>But my <code>build.sbt</code> is containing the IBM MQ dependency correctly (being successfully retrieved by our internal Nexus : </p>
  
  <pre><code>"com.ibm.mq" % "com.ibm.mq" % "8.0.0.3"  
  </code></pre>
  
  <p>My gatling scenario:</p>
  
  <pre><code>package com.myawesomecompany.loadtest
  
  import com.ibm.mq._
  import com.ibm.mq.jms.MQConnectionFactory
  import com.ibm.mq.jms.JMSMQ_Messages
  import com.ibm.msg.client.wmq.common.CommonConstants
  import io.gatling.core.Predef._
  import io.gatling.core.scenario.Simulation
  import io.gatling.jms.Predef._
  import javax.jms._
  
  import scala.concurrent.duration._
  
  class JMSLoadTest extends Simulation {
  
    val jmsConfiguration = jms
      .connectionFactoryName("ConnectionFactory")
      .url("devmq01.company.dmz")
      .credentials("mqm", "mqm")
  
    .contextFactory(classOf[com.ibm.mq.jms.context.WMQInitialContrextFactory].getName) 
    .listenerCount(1)
    .usePersistentDeliveryMode  
  
   val scn = scenario("Load testing GPRSForwarder").repeat(1) {
  exec(jms("testing GPRSForwarder...").reqreply
    .queue("COMPANY.TEST.QUEUE")
    .textMessage("00001404020611100E033102C20EBB51CC1C036EFFFF00010002323802000200FE05001400000000FFFFFFFFFFFFFFFFFF040010038B0D6912EB10CE070206110F37298C")
    .jmsType("test_jms_type")
      )
    }  
  
   setUp(scn.inject(rampUsersPerSec(10) to 1000 during (2 minutes)))
      .protocols(jmsConfiguration)
  
  
  }  
  </code></pre>
  
  <p>The setup is equivalent to <a href="https://stackoverflow.com/questions/37980175/publishing-messages-to-activemq-using-gatling">this one</a> - but instead of using <code>ActiveMQInitalContextFactory</code>, I'm forced to use the "counterpart" of IBM MQ. </p>
  
  <p>According to <a href="https://www.ibm.com/developerworks/websphere/techjournal/0502_woolf/0502_woolf.html" rel="nofollow noreferrer">official docks</a> the <code>WMQInitialContextFactory</code> should be in <code>com.ibm.mq.jms.context</code> but it is not. Ore is there some constant in <code>CommonConstants</code> which I can use to initialize a <code>ContextFactory</code> ? </p>
  
  <p>Thanks a lot in advance. </p>