List of usage examples for javax.jms Session AUTO_ACKNOWLEDGE
int AUTO_ACKNOWLEDGE
To view the source code for javax.jms Session AUTO_ACKNOWLEDGE.
Click Source Link
From source file:prodandes.Prodandes.java
@GET @Path("/inicializarColas") public String inicializarColas() throws JMSException, NamingException { InitialContext init = new InitialContext(); this.cf = (ConnectionFactory) init.lookup("RemoteConnectionFactory"); this.d = (Destination) init.lookup("queue/queue1"); this.c = (javax.jms.Connection) this.cf.createConnection("guest123", "guest"); ((javax.jms.Connection) this.c).start(); this.s = ((javax.jms.Connection) this.c).createSession(false, Session.AUTO_ACKNOWLEDGE); mc = s.createConsumer(d);/* ww w. jav a 2s. c o m*/ this.mc.setMessageListener(this); buzon = new ArrayList<String>(); return "Inicializo bien"; }