context & environment variables in jndi
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Friday, November 16, 2007 06:05 AM

what is a context in jndi ?can u explain me in clear,and what about environment properties role in that?

Re: context & environment variables in jndi

Posted By:   Christopher_Koenigsberg  
Posted On:   Sunday, December 16, 2007 12:18 AM

This has nothing to do with EJB. If you are unfortunate enough to have to use EJB's, then yes you probably need to look them up using JNDI. But JNDI is used to look up other things, even when an application fortunately has no EJB's involved. Like JDBC DataSources managed by the container, for instance; you usually look them up using JNDI.



When you look up something in JNDI, you have to search in a context (like "comp/env", or "jdbc", etc., depending on the vendor and the JNDI setup and the kind of thing you are looking up).



You start by connecting to a JNDI server and getting an "initialContext". In order for the API to know where and how to find this initialContext, you have to start off with some initial properties, and that's what the "environment properties" are -- like the location of the jar file containing the vendor-specific JNDI implementation classes you want to use, and the URL for the server and protocol you want to use, etc.

Re: context & environment variables in jndi

Posted By:   Anonymous  
Posted On:   Friday, December 14, 2007 10:07 AM

context in JNDI means what is the naming context associated with the EJB.They r of five types.Environment entries,EJB local reference,EJB remote references,resource reference,resource environment reference.
Environment resource are those properties that can change after the EJB is deployed.Like temperature whose value can change.Any modification to the old value will not require ane change in the EJB component.
About | Sitemap | Contact