Bugs item #706494, was opened at 2003-03-19 12:07 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=706494&group_id=22866
Category: JBossServer Group: v3.0 Rabbit Hole Status: Closed Resolution: Works For Me Priority: 5 Submitted By: Dan Ciarniello (dciarnie) Assigned to: Scott M Stark (starksm) Summary: InitialContext missing jndi.properties entries Initial Comment: OS: Win2K JDK: 1.3.1 The only entries in conf/jndi.properties that are loaded into an InitialContext are javax.naming.factory.initial, java.naming.provider.url and java.naming.factory.url.pkgs. Any other entries are ignored. To test: 1. Add some extra entries to jndi.properties. 2. In an entity bean or a message bean, create an InitialContext and print out its environment. The only entries that are printed out are the ones named above; the extras are not. Note: Using the jmx console to list the system properties shows that all entries in the jndi.properties are loaded into the system property space; they are simply not loaded into the InitialContext. ---------------------------------------------------------------------- >Comment By: Scott M Stark (starksm) Date: 2003-04-03 13:52 Message: Logged In: YES user_id=175228 This example works fine for me with the current 3.0 branch: 13:35:43,803 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.3.1_06-b01,Sun Microsystems In c. 13:35:43,803 INFO [ServerInfo] OS-System: Windows XP 5.1,x86 ... 13:35:55,670 INFO [Server] JBoss (MX MicroKernel) [3.0.7RC1 (CVSTag=Branch_3_0 Date=200303180733)] Started in 0m:12s:167ms 13:36:26,735 INFO [STDOUT] **************************************************** 13:36:26,735 INFO [STDOUT] java.naming.factory.initial : org.jnp.interfaces.NamingContextFactory 13:36:26,735 INFO [STDOUT] key2 : b 13:36:26,735 INFO [STDOUT] key1 : a 13:36:26,735 INFO [STDOUT] java.naming.factory.url.pkgs : org.jboss.naming:org.jnp.interfaces:org.j boss.naming:org.jnp.interfaces 13:36:26,735 INFO [STDOUT] **************************************************** ---------------------------------------------------------------------- Comment By: Dan Ciarniello (dciarnie) Date: 2003-03-20 15:46 Message: Logged In: YES user_id=529841 Sorry, forgot to check the box for the file upload... ---------------------------------------------------------------------- Comment By: Dan Ciarniello (dciarnie) Date: 2003-03-20 15:45 Message: Logged In: YES user_id=529841 Ok. The attached zip file contains a jar, source code and a sample jndi.properties. 1. Place the jar file in <JBOSS_DIR>/server/default/deploy 2. Place the jndi.properies in <JBOSS_DIR>/server/default/conf 3. Start JBoss 4. Run JNDITester.main() The following should appear in the JBoss output: 15:27:06,181 INFO [STDOUT] **************************************************** 15:27:06,181 INFO [STDOUT] java.naming.factory.initial : org.jnp.interfaces.NamingContextFactory 15:27:06,181 INFO [STDOUT] java.naming.factory.url.pkgs : org.jboss.naming:org.jnp.interfaces 15:27:06,181 INFO [STDOUT] **************************************************** The two added entries, key1 and key2, are not displayed. Note: I used JBoss-3.0.6 as shipped; nothing else deployed. ---------------------------------------------------------------------- Comment By: Scott M Stark (starksm) Date: 2003-03-19 15:55 Message: Logged In: YES user_id=175228 Alright, so I just threw in two properties and dumped out the InitialContext.env as seen by the ENCServlet unit test case and it sees these properties just fine: 2003-03-19 15:39:58,512 INFO [org.jboss.test.web.servlets.ENCServlet] InitialContext.env: 2003-03-19 15:39:58,512 INFO [org.jboss.test.web.servlets.ENCServlet] Key: myprop.b, value: b 2003-03-19 15:39:58,512 INFO [org.jboss.test.web.servlets.ENCServlet] Key: myprop.a, value: a 2003-03-19 15:39:58,512 INFO [org.jboss.test.web.servlets.ENCServlet] Key: java.naming.factory.initial, value: org.jnp.interfaces.NamingContextFactory 2003-03-19 15:39:58,512 INFO [org.jboss.test.web.servlets.ENCServlet] Key: java .naming.factory.url.pkgs, value: org.jboss.naming:org.jnp.interfaces:org.jboss.naming:org.jnp.interfaces So provide a testcase that demonstrates the problem as it works for me. ---------------------------------------------------------------------- Comment By: Dan Ciarniello (dciarnie) Date: 2003-03-19 14:55 Message: Logged In: YES user_id=529841 But the javadocs also state that all entries in all application resource files (i.e. all files named jndi.properties in the classpath) are also loaded into the Context's environment which is then inherited by other contexts. Does conf/jndi.properties not qualify as an application resource? ---------------------------------------------------------------------- Comment By: Scott M Stark (starksm) Date: 2003-03-19 14:39 Message: Logged In: YES user_id=175228 The only properites loaded into the InitialContext env from a jndi.properties file are the standard properties listed in the Context and LdapContext interface javadocs. For some legacy reason which is no longer valid, the jndi.properties are loaded into the system properties map by our naming service. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=706494&group_id=22866 ------------------------------------------------------- This SF.net email is sponsored by: ValueWeb: Dedicated Hosting for just $79/mo with 500 GB of bandwidth! No other company gives more support or power for your dedicated server http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development