activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: JMS Client connecting to Broker
Date Wed, 21 Mar 2007 07:48:42 GMT
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 <hendry.hu@elasitas.com> 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/

Mime
View raw message