Well, it depends on what context the code inside the JBoss JVM is executing in and on what the 'something' is. If it's in a J2EE component (servlet, JSP, EJB) JBoss will give it an Environment Naming Context (ENC) which contains JNDI entries that are mapped into the components environment by way of a deployment descriptor. These will be things like 'env-entry' entries and resource-ref entries from the deployment descriptors. These will all be accessed within the JNDI context whose name begins with 'java:comp/env'. These aren't accessable at all outside of the JBoss process, or by other components (unless they've been mapped identically for both components).
Additionally (and here we leave the comfy confines of specdom, for the daredevil rush of implementation dependence), any name beginning with 'java:' is also available only within the JBoss process. Lastly, this also depends on how you create the InitialContext within and without JBoss. Within JBoss (or any other app. server), you should always use the empty constructor ('new InitialContext()') This will always give you the proper naming context for whatever application server you're running in. Within J2EE components you should never pass overriding properties to the InitialContext constructor (unless you're using something like LDAP for data storage). Outside of an application server, you can either specify a jndi.properties file to set up the default JNDI settings (suggested), or you can build a Properties object containing the right settings and pass that it (not suggested). Depending on how you've got things set up, your external code (outside the JBoss JVM) might be connecting to another JBoss instance than you think it is, or it might be connecting to another JNDI implementation. That's probably more information than you really needed, but ask a vague question and you'll get either a vague answer or a page from a textbook 8^}). hth, danch Starsinic, Frank wrote: > why does ctx.lookup("something") give me one result from within the > JBoss JVM and a different result outside the JBoss JMV. > > thanks, > > frank > _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user