Package org.objectweb.joram.client.jms

Examples of org.objectweb.joram.client.jms.Session


    ConnectionFactory cf = (ConnectionFactory) context.lookup("cf");
    javax.jms.Queue queue =(Queue)context.lookup("queue");
    context.close();
   
    Connection cnx = cf.createConnection();
    Session session = (Session) cnx.createSession(false, Session.AUTO_ACKNOWLEDGE);
//    session.setImplicitAck(true);
    session.setQueueMessageReadMax(100);
    MessageConsumer consumer = (MessageConsumer) session.createConsumer(queue);
    consumer.setMessageListener(new MyListener());
    cnx.start();
   
    System.in.read();
   
    session.close();
    cnx.close();
    System.exit(0);
  }
View Full Code Here

TOP

Related Classes of org.objectweb.joram.client.jms.Session

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.