geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject Re: How may I access ConnectionFactory/Queues etc. with JNDI-lookup?
Date Fri, 31 Oct 2008 15:44:35 GMT
I'm confused about which vm you are trying to use the amq jndi in.   
You should be putting the jndi.properties file in the classpath of  
your non-ee client application.  I would not advise trying to use the  
amq properties based jndi inside geronimo.

java.naming.provider.url = vm://localhost

means that you are trying to connect to a broker in the same vm (in-vm  
transport)

For a broker running in geronimo you want something like
java.naming.provider.url = tcp://hostname:61616

hope this helps
david jencks

On Oct 31, 2008, at 3:30 AM, jsmch wrote:

>
> Hi and thank you for the reply again.
>
> Due to your answer i tried to getting familiar in using  
> jdni.properties in
> the geronimo-environment.
> I´ve given 2 Topics to be accessed from the NON-EE-Application. They  
> are
> already installed as JMS Resources in resourcesgroup
> console.jms/MyResourceGroup/1.0/rar (checked from geronimo console).  
> The
> Topics are named UpdateTopic and ChatTopic.
>
> The jndi.properties looks like this:
> ==============================================
> java.naming.factory.initial =
> org.apache.activemq.jndi.ActiveMQInitialContextFactory
>
> java.naming.provider.url = vm://localhost
>
> topic.ChatTopic = ChatTopic
> topic.UpdateTopic = UpdateTopic
> ==============================================
>
> I tried it by push the properties-file to the META-INF-directory but  
> this
> didn´t work.
> The result of available jndi-entries is just what i always get (even  
> when
> server is NOT running):
> dynamicQueues,
> dynamicTopics,
> TopicConnectionFactory,
> ConnectionFactory,
> QueueConnectionFactory
>
> Ok - i didn´t wondered that putting to META-INF didn´t work because  
> the
> (very short) tutorial tells me to put the properties-file to my  
> classpath.
> Geronimo Console (Java System Info) tells me the following about  
> classpath:
>
> java.class.path  	
> C:\FH\Dev4\Geronimo\geronimo-tomcat6-javaee5-2.1.3\bin\server.jar
>
> C:/FH/Dev4/Geronimo/geronimo-tomcat6-javaee5-2.1.3/bin/jpa.jar
>
> ==> there are more than those 2 jars in that directory. How may i add
> jndi.properties to the classpath now - or am i thinking wrong in any  
> way?.
>
> At least I´m not really sure that my Context will really contact the
> server-side (because - as i already told - the jndi-entries where also
> available when geronimo was NOT running):
> ========================
> Properties p2;
> p2.put(Context.INITIAL_CONTEXT_FACTORY,
> "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
> p2.put("brokerURL", "tcp://localhost:61616");
> InitialContext ctx = new InitialContext(p2);
>
>
>
> djencks wrote:
>>
>> Hi jsmch,
>>
>> As I mentioned in a reply to Doug Reeder I think you have to use the
>> activemq jndi context documented here:
>> http://activemq.apache.org/jndi-support.html
>>  for non ee clients.
>>
>> Hope this helps
>> david jencks
>>
>> On Oct 30, 2008, at 10:01 AM, jsmch wrote:
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/How-may-I-access-ConnectionFactory-Queues-etc.-with-JNDI-lookup--tp20209014s134p20263300.html
> Sent from the Apache Geronimo - Users mailing list archive at  
> Nabble.com.
>


Mime
View raw message