activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jiang <>
Subject Why cannot get Destination
Date Fri, 11 May 2007 12:40:53 GMT

I add one topic(name is Hello) use jmx . And I can see the topic through
jconsole. But when I use code below to get the destination : 

Hashtable env = new Hashtable();
env.put(Context.PROVIDER_URL, "tcp://localhost:61616");
Context ctx = new InitialContext(env);
Destination des = (Destination)ctx.lookup("Hello");

It throught Exception like :
                javax.naming.NameNotFoundException: Hello
	at javax.naming.InitialContext.lookup(Unknown Source)
	at JndiTest.start(
	at JndiTest.main(

Why I can see the topic but cannot lookup it ???
View this message in context:
Sent from the ActiveMQ - Dev mailing list archive at

View raw message