activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jworkman <>
Subject AMQ + Programmatic Creation of Destinations + Registration in JNDI
Date Tue, 04 Aug 2009 14:27:45 GMT

I really need help, I am struggling to create queues and topics in ActiveMQ
and have them accessible from JNDI lookups. I need this
creation/registration to be done without bringing the server down, and done
without manual configuration.

Something like:

//create the jndi context
InitialContext jndiContext = new InitialContext(loadConnectionProps());

// Create a ConnectionFactory
ConnectionFactory connectionFactory = (ConnectionFactory)

// Create a Connection
Connection connection = connectionFactory.createConnection();

// Create a Session
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);

// Create the destination (Topic or Queue)       

************this below doesn't work***********

//get the topic from jndi 
topic = (Topic) ctx.lookup(name);

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message