Putting simple text message on a jms queue
try { String jndi_pref = "java:comp/env/"; String qConnectionFactoryJndi = "qConnectionFactoryJndi"; String qJndi = "qJndi" ; InitialContext context = new InitialContext(); QueueConnectionFactory qConnectionFactory = (QueueConnectionFactory) context.lookup(qConnectionFactoryJndi); Queue queue = (Queue) context.lookup(qJndi); logger.debug("Resource " + queue.getQueueName() + " obtained"); ...