03: JMS API & File based JNDI Tutorial with Websphere MQ Client – Message Sender

Step 1: You need to have the Webspeher MQ client jar “com.ibm.mq.allclient.jar” in your project at “${basedir}/lib” and the JMS or JEE jar from a maven repository.

Step 2: Use the “JMS API” to send a message to a queue using a file based JNDI.

Step 3:You need to have the “Websphere MQ” set up and the “.bindings file generated using a Webspehere MQ admin tool and copied to “/home/myapp/mq_admin_objects”. So, it will be “/home/myapp/mq_admin_objects/.bindings“. The “.bindings” file will contain the host, port number, connection factory, and destination (e.g. queue) details.

Java developer & architect Q&As

Java developers Q&As