JmsFactoryFactory is your entry point into the JMS implementation classes. You need to add com.ibm.msg.client.jms and com.ibm.msg.client.mqtt as imports along with javax.jms in the manifest.
Get started with creating a connection factory like this
JmsFactoryFactory jmsFactory = JmsFactoryFactory .getInstance(MQTTConstants.PROVIDER_NAME);
JMS 1.1 simplifies messaging with unified domains and hence you just need to create a connection factory and use it for both topics and queues
ConnectionFactory connFactory = jmsFactory.createConnectionFactory();
Now set the URI telling the factory how to connect to the server
((JmsConnectionFactory) connFactory).setStringProperty( MQTTConstants.MQTT_CONNECTION_URL, MQTTConstants.MQTT_TCP_SCHEMA + "127.0.0.1:1883");
From here you can go ahead creating a connection (don't forget to set the clientID as this is unique for each client) and a session and the other JMS objects as required.... Full example is given in this article in listing 2.
Neeraj Krishna & Vijay