You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Arun Venugopal <Ar...@cognizant.com> on 2005/10/03 16:43:10 UTC

EJB and Resource lookup

Hi,

What is the INITIAL_CONTEXT_FACTORY and PROVIDER_URL to specify to
lookup an EJB from another class within the same application ?
What is the INITIAL_CONTEXT_FACTORY and PROVIDER_URL to specify to
lookup a Datasource from the application ?

Also where is the EJB's and the Datasources located in the JNDI tree (by
default) ? 

I have been trying various combinations and these are working in some
cases and not working in some other cases. Can somebody please clear
these doubts for me ?

Thanks and regards
Arun
-- 
Arun Venugopal <Ar...@cognizant.com>
Cognizant Technology Solutions India Pvt. Ltd.


This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. 
Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly 
prohibited and may be unlawful.

  Visit us at http://www.cognizant.com

Re: EJB and Resource lookup

Posted by David Jencks <da...@yahoo.com>.
On Oct 3, 2005, at 7:43 AM, Arun Venugopal wrote:

>  Hi,
>
>  What is the INITIAL_CONTEXT_FACTORY and PROVIDER_URL to specify to 
> lookup an EJB from another class within the same application ?
>  What is the INITIAL_CONTEXT_FACTORY and PROVIDER_URL to specify to 
> lookup a Datasource from the application ?
>
>  Also where is the EJB's and the Datasources located in the JNDI tree 
> (by default) ?

Geronimo does not have a global JNDI tree.   We follow the J2ee spec 
and only provide access to the java:comp environment within j2ee 
components.  You must configure this with your j2ee deployment 
descriptors (ejb-ref, resource-ref, etc etc) and if necessary 
additional target information in the geronimo plan.  Do not set  jndi 
properties or you will probably prevent your component from accessing 
anything useful.

Reference resolution is done at deploy time and is based on the jsr-77 
object names of the target component.  To simplify a bit, we start by 
looking in the current application for a match, and if not found look 
in modules deployed outside an application (such as a standalone rar).  
You can specify the entire target name or individual components of the 
name in the geronimo plan, but if the lookup name is the same as the 
name component of the target's object name you normally do not have to 
include any extra information in the geronimo plan.

thanks
david jencks

>
>  I have been trying various combinations and these are working in some 
> cases and not working in some other cases. Can somebody please clear 
> these doubts for me ?
>
>  Thanks and regards
>  Arun
> -- 
>  Arun Venugopal <Ar...@cognizant.com>
>  Cognizant Technology Solutions India Pvt. Ltd.
> This e-mail and any files transmitted with it are for the sole use of 
> the intended recipient(s) and may contain confidential and privileged 
> information.
>  If you are not the intended recipient, please contact the sender by 
> reply e-mail and destroy all copies of the original message.
>  Any unauthorized review, use, disclosure, dissemination, forwarding, 
> printing or copying of this email or any action taken in reliance on 
> this e-mail is strictly
>  prohibited and may be unlawful.
>
>  Visit us at http://www.cognizant.com