cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject svn commit: rev 56243 - cocoon/whiteboard/kernel/src/org/apache/cocoon/kernel/startup
Date Mon, 01 Nov 2004 15:25:00 GMT
Author: pier
Date: Mon Nov  1 07:24:59 2004
New Revision: 56243

Modified:
   cocoon/whiteboard/kernel/src/org/apache/cocoon/kernel/startup/Main.java
Log:
More clarification on how static factories work

Modified: cocoon/whiteboard/kernel/src/org/apache/cocoon/kernel/startup/Main.java
==============================================================================
--- cocoon/whiteboard/kernel/src/org/apache/cocoon/kernel/startup/Main.java	(original)
+++ cocoon/whiteboard/kernel/src/org/apache/cocoon/kernel/startup/Main.java	Mon Nov  1 07:24:59
2004
@@ -19,6 +19,17 @@
 
 /**
  * <p>A simple class initializing a {@link Kernel} from a the command line.</p>

+ * 
+ * <p>Note, to properly allow static factories distributed with the {@link Kernel}
+ * to be instantiated and returned to the individual blocks, it is <b>strongly
+ * suggested</b> that this {@link Main} class and its enclosing JAR archive are
+ * loaded as an <i>endorsed class</i>.</p>
+ * 
+ * <p>The <i>system property</i> <code>java.endorsed.dirs</code>
controls what code
+ * is loaded as an endorsed class. To specify this on the command line, use the
+ * following syntax:</p>
+ * 
+ * <p><code>java&nbsp;-Djava.endorsed.dirs=<i>directory</i>&nbsp;...</code></p>
  *
  * @author <a href="mailto:pier@apache.org">Pier Fumagalli</a>
  * @author Copyright &copy; 2000-2004 <a href="http://www.apache.org/">The Apache
@@ -71,9 +82,10 @@
                 ConfigurationBuilder.parse(args[0]));
         
         /* Create and initialize a new deployer */
+        Thread.currentThread().setContextClassLoader(Main.class.getClassLoader());
         Deployer deployer = new Deployer();
         deployer.initialize(descriptors, instances);
-        
+
         /* Add the shutdown hook */
         Runtime.getRuntime().addShutdownHook(new Thread(new Main(deployer)));
 

Mime
View raw message