ceki 01/10/18 16:12:09 Modified: src/docbook build.xml defaultInit.xml Log: Improvements to the doc. Changed build.xml to output to ../docs/manual/manual.html Revision Changes Path 1.2 +2 -1 jakarta-log4j/src/docbook/build.xml Index: build.xml =================================================================== RCS file: /home/cvs/jakarta-log4j/src/docbook/build.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- build.xml 2001/10/17 20:59:49 1.1 +++ build.xml 2001/10/18 23:12:08 1.2 @@ -4,11 +4,12 @@ <!-- ===================== Initialize Property Values =================== --> - <property name="doc.build" value="./build"/> + <property name="doc.build" value="../../docs"/> <property name="doc.name" value="manual"/> <!-- ================= BUILD: XML-HTML Generation ======================= --> <target name="build-main"> + <delete file="${doc.build}/${doc.name}/manual.html"/> <!-- Top Level Directory --> <style basedir="." destdir="${doc.build}/${doc.name}" 1.7 +56 -22 jakarta-log4j/src/docbook/defaultInit.xml Index: defaultInit.xml =================================================================== RCS file: /home/cvs/jakarta-log4j/src/docbook/defaultInit.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- defaultInit.xml 2001/10/17 20:59:49 1.6 +++ defaultInit.xml 2001/10/18 23:12:08 1.7 @@ -2,33 +2,67 @@ <title>Default Initialization Procedure</title> <para>The log4j library does not make any assumptions about its - environment which may be incorrect under some - circumstances. Logging to the console may not be always - appropriate and writing to files is forbidden in some J2EE - environments. Consequently, log4j does not define any default - appender. + environment which may be incorrect under certain cases. For + example, logging to the console may not be always appropriate + and writing to files from an EJB is forbidden according to the + J2EE specification. Consequently, log4j does not define any + default appender. </para> - <para>Under certain well-defined conditions, the static inializer of - the <classname>Logger</classname> class will attempt to - automatically configure log4j. The Java language guarantees that - the static initializer of a class is called once and only once - during the loading of a class into memory. It is important to - remember that different classloaders may load distinct copies of - the same class. These copies of the same class are considered as - totally unrelated by the JVM. - </para> - - <para>The default initialization is very useful in environments - where the exact entry point to the application depends on the - runtime environment. For example, the same application can be used - as a stand-alone application, as an applet, or as a servlet under - the control of a web-server. + <para>Nevertheless, under certain well-defined conditions, the + static inializer of the <classname>LogManager</classname> class + will attempt to automatically configure log4j. The Java language + guarantees that the static initializer of a class is called once + and only once during the loading of a class into memory. It is + important to remember that different classloaders may load + distinct copies of the same class. These copies of the same class + are considered as totally unrelated by the JVM. </para> + + <para>Classloading is central to a rather advanced Java topic. Some + familiarity with classloaders is necessary to the pursuit of our + discussion. There are several dozen tutorials on the subject of + which I recomment the following. + <itemizedlist> + <listitem> + <para> + <ulink url="http://www.javaworld.com/javaworld/jw-10-1996/jw-10-indepth.html"> + The basics of Java class loaders</ulink> + </para> + </listitem> + + <listitem> + <para><ulink url="http://www.javageeks.com/Papers/ClassForName/index.html"> + Understanding Class.forName()</ulink> + </para> + </listitem> + + <listitem> + <para> + <ulink url="http://www.onjava.com/pub/a/onjava/2001/07/25/ejb.html"> + EJB 2 and J2EE Packaging, Part II + </ulink> + </para> + </listitem> + </itemizedlist> </para> + <para>As just mentioned, the default initialization procedure will + be launched each time log4j classes are loaded into memory. Default + initialization is very useful in environments where the exact entry + point to the application depends on the runtime environment. For + example, when the same "package" is used as a stand-alone + application, as an applet, or as a servlet under the control of a + web-server. + </para> + <procedure> - <title>Default initialization algorithm</title> <para>The exact - default initialization algorithm is defined as follows:</para> + <title>Default log4j initialization algorithm</title> + + <para>The default initialization algorithm is invoked when the + <classname>LogManager</classname> class is loaded into + memory. This class is guaranteed to be loaded before any logger + can be used. The exact initialization algorithm is defined as + follows:</para> <step> <para>Skip default initialization if the system property
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]