You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Marcus Better <ma...@better.se> on 2008/11/04 21:53:09 UTC

Re: How may I access ConnectionFactory/Queues etc. with JNDI-lookup?

Hi,

David Jencks wrote:
> You should be putting the jndi.properties file in the of
> your non-ee client application.  I would not advise trying to use the
> amq properties based jndi inside geronimo.

I have a slightly different scenario: I have a Spring application with a
little GBean wrapper that I want to deploy. How can I get hold of the
connection factory etc with JNDI from inside Geronimo? What is the
appropriate InitialContext class?

The connection factory and queue are configured in the server using the
ActiveMQ RA.

Cheers,

Marcus



Re: How may I access ConnectionFactory/Queues etc. with JNDI-lookup?

Posted by David Jencks <da...@yahoo.com>.
On Nov 4, 2008, at 2:53 PM, Marcus Better wrote:

> Hi,
>
> David Jencks wrote:
>> You should be putting the jndi.properties file in the of
>> your non-ee client application.  I would not advise trying to use the
>> amq properties based jndi inside geronimo.
>
> I have a slightly different scenario: I have a Spring application  
> with a
> little GBean wrapper that I want to deploy. How can I get hold of the
> connection factory etc with JNDI from inside Geronimo? What is the
> appropriate InitialContext class?
>
> The connection factory and queue are configured in the server using  
> the
> ActiveMQ RA.

IIUC you have a geronimo plan for the amq ra that you have deployed....

in 2.1.3 (I think) and trunk all the connection factores and  
destinations are bound into jca:/<groupId>/<artifactId>/<type>/name.   
Look in var/log/geronimo.log for the exact names used to bind.  As  
long as you don't have any jndi.properties files or reset the jndi  
properties anywhere you should be able to look up with plain new  
InitialContext().lookup(...)

hope this works :-)
david jencks

>
>
> Cheers,
>
> Marcus
>
>