users@glassfish.java.net

Re: Glassfish JMS cluster

From: <forums_at_java.net>
Date: Wed, 4 May 2011 10:58:24 -0500 (CDT)

Re: Are you using a MDB?

No I'm not. In startup servlet init method I do connection factory lookup,
topic lookup, session and non durable consumer creation.

Smth like follows

cf = (ConnectionFactory)ctx.lookup(connFac);        bus =
(Destination)ctx.lookup("T1");
        conn = cf.createConnection();
        logger.fine("The created connection client id is "+clientId);
        sess = conn.createSession(false, Session.DUPS_OK_ACKNOWLEDGE);
        MessageConsumer cons = sess.createConsumer(bus);
        cons.setMessageListener(this);
 


--
[Message sent by forum member 'alex2001']
View Post: http://forums.java.net/node/798066