directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pste...@apache.org
Subject svn commit: r348989 - /directory/naming/trunk/naming-config/src/test/test-jndi.xml
Date Fri, 25 Nov 2005 17:57:09 GMT
Author: psteitz
Date: Fri Nov 25 09:57:06 2005
New Revision: 348989

URL: http://svn.apache.org/viewcvs?rev=348989&view=rev
Log:
Added comment describing file.

Modified:
    directory/naming/trunk/naming-config/src/test/test-jndi.xml

Modified: directory/naming/trunk/naming-config/src/test/test-jndi.xml
URL: http://svn.apache.org/viewcvs/directory/naming/trunk/naming-config/src/test/test-jndi.xml?rev=348989&r1=348988&r2=348989&view=diff
==============================================================================
--- directory/naming/trunk/naming-config/src/test/test-jndi.xml (original)
+++ directory/naming/trunk/naming-config/src/test/test-jndi.xml Fri Nov 25 09:57:06 2005
@@ -1,3 +1,18 @@
+<!-- 
+       Example showing basic configuration using default context root
+       (java:comp/env) and default internal context name
+       (NamingContextFactory.DEFAULT_NAME).
+       
+       To load and use this context:
+       
+        XmlConfigurator.loadConfiguration
+        	(getClass().getResourceAsStream("/test-jndi.xml"));
+        InitialContext ctx = new InitialContext();
+        Context env = (Context) ctx.lookup("java:comp/env");
+        String host = (String) env.lookup("config/host");
+        Integer port = (Integer) env.lookup("config/port");
+-->
+
 <naming>
   <context>
     <environment name="config/host" value="www.apache.org" type="java.lang.String" />



Mime
View raw message