directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pste...@apache.org
Subject svn commit: r123532 - /incubator/directory/naming/trunk/config/src/java/org/apache/naming/config/XmlConfigurator.java
Date Tue, 28 Dec 2004 19:21:45 GMT
Author: psteitz
Date: Tue Dec 28 11:21:43 2004
New Revision: 123532

URL: http://svn.apache.org/viewcvs?view=rev&rev=123532
Log:
Javadoc.

Modified:
   incubator/directory/naming/trunk/config/src/java/org/apache/naming/config/XmlConfigurator.java

Modified: incubator/directory/naming/trunk/config/src/java/org/apache/naming/config/XmlConfigurator.java
Url: http://svn.apache.org/viewcvs/incubator/directory/naming/trunk/config/src/java/org/apache/naming/config/XmlConfigurator.java?view=diff&rev=123532&p1=incubator/directory/naming/trunk/config/src/java/org/apache/naming/config/XmlConfigurator.java&r1=123531&p2=incubator/directory/naming/trunk/config/src/java/org/apache/naming/config/XmlConfigurator.java&r2=123532
==============================================================================
--- incubator/directory/naming/trunk/config/src/java/org/apache/naming/config/XmlConfigurator.java
(original)
+++ incubator/directory/naming/trunk/config/src/java/org/apache/naming/config/XmlConfigurator.java
Tue Dec 28 11:21:43 2004
@@ -32,10 +32,11 @@
 import org.apache.commons.digester.Digester;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+
 import org.xml.sax.SAXException;
 
 /**
- * Configure an in memory JNDI implementation using an XML configuration file.
+ * Configure an in-memory JNDI implementation using an XML configuration file.
  * 
  * @author <a href="brett@apache.org">Brett Porter</a>
  * @version $Id: XmlConfigurator.java,v 1.2 2003/12/01 02:02:45 brett Exp $
@@ -53,6 +54,14 @@
 
     private static final Log LOG = LogFactory.getLog(XmlConfigurator.class);
 
+    /**
+     * Sets up initial context using 
+     * <code>org.apache.naming.java.javaURLContextFactory</code>.
+     * <p>
+     * Also creates "env" subcontext in "java:comp" namespace.
+     * 
+     * @throws NamingException if a NamingException occurs.
+     */
     public static synchronized void setupInitialContext() throws NamingException {
         System.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.apache.naming.java.javaURLContextFactory");
         System.setProperty(Context.URL_PKG_PREFIXES, "org.apache.naming");
@@ -61,6 +70,14 @@
         envContext = initialContext.createSubcontext(COMP_CONTEXT_NAME).createSubcontext(ENV_CONTEXT_NAME);
     }
 
+    /**
+     * Destroys initial context.
+     * <p>
+     * Invokes <code>Context.destroySubcontext(Name)</code> only on top-level
+     * subcontexts.
+     * 
+     * @throws NamingException if a NamingException occurs.
+     */
     public static synchronized void destroyInitialContext() throws NamingException {
         Context initialContext = new InitialContext();
         NamingEnumeration contexts = initialContext.list("");
@@ -71,6 +88,13 @@
         initialContext = null;
     }
 
+    /**
+     * Loads xml configuration data from <code>inputFile</code> into initial
context.
+     * 
+     * @param inputFile  input xml configuration file
+     * @throws NamingException if a NamingException occurs.
+     * @throws ParseException if an error occurs parsing the configuration file.
+     */
     public static synchronized void loadConfiguration(InputStream inputFile) throws NamingException,
ParseException {
         if (envContext == null)
         {

Mime
View raw message