geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anshuk <>
Subject Re: geronimo 1.1.1 jms resource
Date Fri, 15 May 2009 06:17:10 GMT

Thanks David.
It is now working. I added the in the classpath and also
tweaked the code a bit. 

java.naming.factory.initial =
java.naming.provider.url = tcp://localhost:61616
connectionFactoryNames = TestQueueConnectionFactory 
queue.sampleQueue = sampleQueue


Properties props = new Properties();
			fis = new"config/")));
		    Context ctxt = new InitialContext(props);
			QueueConnectionFactory factory = (QueueConnectionFactory)
			Queue queue = (Queue)ctxt.lookup(props.getProperty("queue.sampleQueue"));

It clearly mentions in the link..

Once you have the edited and ready, it needs to be
accessible to your application. The easiest way is to add to
a jar file. When "new InitialContext()" is called, it will scan the
resources and find the file. If you get "javax.naming.NamingException", it
usually means the file is not accessible.


Anshuk Pal Chaudhuri

Anshuk wrote:
> Hi, 
> I am using geronimo 1.1.1 and there is a specfic requirement for some jms
> resources. I have created a queue connection factory and a queue from the
> web console.
> I am writing a standalone jms client to send message to the queue, but I
> presume it is failing to lookup.
> I did a similar kind of practice earlier, but I forgot what was the
> solution.
> Properties props = new Properties();
> props.setProperty(Context.PROVIDER_URL, "tcp://localhost:61616");
> props.setProperty(Context.INITIAL_CONTEXT_FACTORY,
> "org.activemq.jndi.ActiveMQInitialContextFactory");
> Context ctxt = new InitialContext(props);
> QueueConnectionFactory factory = (QueueConnectionFactory)
> ctxt.lookup("TestConnectionFactory");
> It is failing while doing the TestConnectionFactory lookup.
> Can anyone help me in this.
> Reagrds,
> Anshuk Pal Chaudhuri

View this message in context:
Sent from the Apache Geronimo - Users mailing list archive at

View raw message