The ActiveMQ JNDI context is not a J2EE container, so doesn't support "java:comp/env" stuff by default.
try using the name "ConnectionFactory" like the example... http://activemq.apache.org/jndi-support.html On 3/21/07, Hendry <[EMAIL PROTECTED]> wrote:
Hi, I'm trying to connecting my jms client to broker that embedded into Jetty, but I'm getting NamingException, these are the codes: Properties properties = new Properties(); properties.load(Resources.getResourceAsStream("jndi.properties")); InitialContext jndiContext = new InitialContext(properties); QueueConnectionFactory queueConnectionFactory = (QueueConnectionFactory) jndiContext.lookup("java:comp/env/jms/connectionFactory"); and the errors: Naming Exception: javax.naming.NamingException: scheme java not recognized [ERROR] org.apache.activemq.jndi.ReadOnlyContext.lookup(ReadOnlyContext.java:199) [ERROR] javax.naming.InitialContext.lookup(InitialContext.java:351) [ERROR] com.elasitas.message.MessageReceiver.establishConnection(MessageReceiver.java:83) Could anyone tell me what's wrong? Thanx. -- Regards, Hendry
-- James ------- http://radio.weblogs.com/0112098/