...
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Context ctx = new InitialContext(env); QueueConnectionFactory factory = (QueueConnectionFactory) ctx.lookup(propLoader.getValue(CONNECTION_FACTORY_NAMES)); conn = factory.createQueueConnection(); Queue myQueue = (Queue) ctx.lookup(propLoader.getValue(QUEUE_NAME)); session = conn.createQueueSession(false,javax.jms.Session.AUTO_ACKNOWLEDGE); producer = session.createProducer(myQueue); conn.start(); consignmentMessage = session.createTextMessage(); consignmentMessage.setText(content); producer.send(consignmentMessage); System.out.println("Consignment Sent !!!"); |
...