directory-commits mailing list archives

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

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

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

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



Mime
View raw message