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: 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: Tablet PC.  
Does your code think in ink? You could win a Tablet PC. 
Get a free Tablet PC hat just for playing. What are you waiting for? 
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to