1 Reply Latest reply on Apr 24, 2013 11:03 AM by Justin Bertram

    How to configure AS7 to use jndi (contextfactory) provided by remote jms provider (Sonic MQ)?

    Nav Dhillon Newbie

      I am using sonic mq resource adapter (rewired from a jboss 5 compatible adapter) to connect a MDB to our enterprise sonic mq.  My standalone.xml is attached along and my MDB's annotations are posted below.  The MDB can receive messages but (according to our MQ admin) it is connecting directly to broker.  Instead, I need to be using the contextfactory and connectionfactory that our Sonic MQ provides from its jndi service.  I am very new to Java EE and don't have enough experience to know how I should do this. 


      I tried populating the jndi.properties in my classpath with remote jndi info but it doesn't seem to click.



      Any thoughts/pointers are appreciated.



      My MDB Annotations (what I need to do apparently is replace the connectionURLs value with a jndi path from sonic mq's jndi along with a providerUrl to the sonic mq jndi):

      @MessageDriven(mappedName = "testdest",


                activationConfig =


               @ActivationConfigProperty(propertyName = "connectionURLs", propertyValue = "tcp://entlssmqd003:2507,tcp://entlssmqd004:2507,tcp://entlssmqd003:2508,tcp://entlssmqd004:2508"),

                          @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Topic"),

                          @ActivationConfigProperty(propertyName = "destination", propertyValue = "ent.sharedtopic.sonar.ecs.file"),

               @ActivationConfigProperty(propertyName = "username", propertyValue="user1"),

                          @ActivationConfigProperty(propertyName = "password", propertyValue="user1x"),

                          //TODO: Fault taulerant



      My jndi.properties file: