activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hendry <hendry...@elasitas.com>
Subject JMS Client connecting to Broker
Date Wed, 21 Mar 2007 04:21:47 GMT
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

Mime
View raw message