Connect to ibm mq with jms . Specify the channel and queue manager
- by bhargav
How do i specify which queue manager to connect to in my system properties.
Here is the code:
Properties properties = new Properties();
properties.setProperty("java.naming.factory.initial", "com.ibm.mq.jms.context.WMQInitialContextFactory");
properties.setProperty("java.naming.provider.url", "localhost:1414/SYSTEM.DEF.SVRCONN");
Context context = new InitialContext(properties);
factory= (QueueConnectionFactory)context.lookup("TESTOUT");
context always gets TEST que only not able to connect to TESTOUT queue