[CVS jcontainer] Clarify some docs

Peter Donald <pdonald-yCVjj/[email protected]> Wed, 31 Mar 2004 00:44:24 -0600
Newsgroups gmane.comp.java.jcontainer.cvs
Message-ID <[email protected]>
<html>
<head>
<style><!--
  body {background-color:#ffffff;}
  .file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
  .pathname {font-family:monospace; float:right;}
  .fileheader {margin-bottom:.5em;}
  .diff {margin:0;}
  .tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
  .tasklist ul {margin-top:0;margin-bottom:0;}
  tr.alt {background-color:#eeeeee}
  #added {background-color:#ddffdd;}
  #addedchars {background-color:#99ff99;font-weight:bolder;}
  tr.alt #added {background-color:#ccf7cc;}
  #removed {background-color:#ffdddd;}
  #removedchars {background-color:#ff9999;font-weight:bolder;}
  tr.alt #removed {background-color:#f7cccc;}
  #info {color:#888888;}
  #context {background-color:#eeeeee;}
  td {padding-left:.3em;padding-right:.3em;}
  tr.head {border-bottom-width:1px;border-bottom-style:solid;}
  tr.head td {padding:0;padding-top:.2em;}
  .task {background-color:#ffff00;}
  .comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
  .error {color:red;}
  hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>jcontainer/loom/site/xdocs/reference</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt><a href="#file1">environment-xml-specification.xml</a></tt></td><td align="right" id="added">+92</td><td align="right" id="removed">-81</td><td nowrap="nowrap" align="center"><a href="http://xstream.cvs.codehaus.org/jcontainer/loom/site/xdocs/reference/environment-xml-specification.xml?rev=1.4&amp;content-type=text/vnd.viewcvs-markup">1.4</a> <a href="http://xstream.cvs.codehaus.org/jcontainer/loom/site/xdocs/reference/environment-xml-specification.xml.diff?r1=1.4&amp;r2=1.5">-&gt;</a> <a href="http://xstream.cvs.codehaus.org/jcontainer/loom/site/xdocs/reference/environment-xml-specification.xml?rev=1.5&amp;content-type=text/vnd.viewcvs-markup">1.5</a></td></tr>
</table>
<pre class="comment">
Clarify some docs
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname"><a href="http://xstream.cvs.codehaus.org/jcontainer">jcontainer</a>/<a href="http://xstream.cvs.codehaus.org/jcontainer/loom">loom</a>/<a href="http://xstream.cvs.codehaus.org/jcontainer/loom/site">site</a>/<a href="http://xstream.cvs.codehaus.org/jcontainer/loom/site/xdocs">xdocs</a>/<a href="http://xstream.cvs.codehaus.org/jcontainer/loom/site/xdocs/reference">reference</a><br /></span>
<div class="fileheader"><big><b>environment-xml-specification.xml</b></big> <small id="info"><a href="http://xstream.cvs.codehaus.org/jcontainer/loom/site/xdocs/reference/environment-xml-specification.xml?rev=1.4&amp;content-type=text/vnd.viewcvs-markup">1.4</a> <a href="http://xstream.cvs.codehaus.org/jcontainer/loom/site/xdocs/reference/environment-xml-specification.xml.diff?r1=1.4&amp;r2=1.5">-&gt;</a> <a href="http://xstream.cvs.codehaus.org/jcontainer/loom/site/xdocs/reference/environment-xml-specification.xml?rev=1.5&amp;content-type=text/vnd.viewcvs-markup">1.5</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.4 -r1.5
--- environment-xml-specification.xml	28 Feb 2004 19:46:07 -0000	1.4
+++ environment-xml-specification.xml	31 Mar 2004 06:44:24 -0000	1.5
@@ -8,113 +8,124 @@
</small></pre><pre class="diff" id="context">         &lt;section name="Introduction"&gt;
             &lt;p&gt;
         The purpose of the
</pre><pre class="diff" id="removed">-                &lt;code&gt;environment.xml&lt;/code&gt; file is to configure environmental
-        or Server Application wide settings. Currently this means being able to set the
-        security policy and configure logging settings. A sample
-                &lt;code&gt;environment.xml&lt;/code&gt;
-        follows. Previously thread pool settings were also configured in this
-        section but this has been deprecated. 
</pre><pre class="diff" id="added">+                &lt;code&gt;environment.xml&lt;/code&gt; file is to configure
+        environmental or Server Application wide settings. Currently this means
+        being able to set the security policy and configure logging settings.
+        A sample
+                &lt;code&gt;environment.xml&lt;/code&gt; follows.
</pre><pre class="diff" id="context">             &lt;/p&gt;
         &lt;/section&gt;
         &lt;section name="Sample environment.xml file"&gt;
             &lt;source&gt;
</pre><pre class="diff" id="removed">-&amp;lt;?xml version="1.0"?&gt;
</pre><pre class="diff" id="added">+                &lt;![CDATA[
+&lt;?xml version="1.0"?&gt;
</pre><pre class="diff" id="context"> 
</pre><pre class="diff" id="removed">-<span id="removedchars">&amp;lt;</span>environment&gt;
</pre><pre class="diff" id="added">+<span id="addedchars">&lt;</span>environment&gt;
</pre><pre class="diff" id="context"> 
</pre><pre class="diff" id="removed">-    &amp;lt;logs&gt;
-		&amp;lt;category name="" target="default" priority="DEBUG" /&gt;
-		&amp;lt;category name="myAuthorizer" target="myAuthorizer-target"
</pre><pre class="diff" id="added">+    &lt;logs&gt;
+		&lt;category name="" target="default" priority="DEBUG" /&gt;
+		&lt;category name="myAuthorizer" target="myAuthorizer-target"
</pre><pre class="diff" id="context">     				priority="DEBUG" /&gt;
</pre><pre class="diff" id="removed">-    	
-		&amp;lt;log-target name="default"
</pre><pre class="diff" id="added">+
+		&lt;log-target name="default"
</pre><pre class="diff" id="context">     	  	location="/logs/default.log" /&gt;
</pre><pre class="diff" id="removed">-		<span id="removedchars">&amp;lt;</span>log-target name="myAuthorizer-target"
</pre><pre class="diff" id="added">+		<span id="addedchars">&lt;</span>log-target name="myAuthorizer-target"
</pre><pre class="diff" id="context">       		location="/logs/authorizer.log" /&gt;
</pre><pre class="diff" id="removed">-    &amp;lt;/logs&gt;
-
-    &amp;lt;policy&gt;
-	    &amp;lt;keystore name="foo-keystore"
-    		location="sar:/conf/keystore"
-    		type="JKS" /&gt;
-
-	    &amp;lt;grant code-base="file:${app.home}${/}some-dir${/}*"
-			key-store="foo-keystore" &gt;
-			&amp;lt;permission class="java.io.FilePermission"
-		    	target="${/}tmp${/}*"
-				action="read,write" /&gt;
-	    &amp;lt;/grant&gt;
-
-    	&amp;lt;grant signed-by="Bob"
-			code-base="sar:/SAR-INF/lib/*"
-			key-store="foo-keystore" &gt;
-		    &amp;lt;permission class="java.io.FilePermission"
-		        target="${/}tmp${/}*"
-				action="read,write" /&gt;
- 	   &amp;lt;/grant&gt;
-    &amp;lt;/policy&gt;
</pre><pre class="diff" id="added">+    &lt;/logs&gt;
</pre><pre class="diff" id="context"> 
</pre><pre class="diff" id="removed">-&amp;lt;/environment&gt;
-
-            &lt;/source&gt;
-            &lt;p&gt;
</pre><pre class="diff" id="added">+    &lt;policy&gt;
+      &lt;!-- define the keystore that is used to load signers from --&gt;
+      &lt;keystore name="myKeystore"
+                location="sar:/conf/keystore"
+                type="JKS"/&gt;
+
+      &lt;!-- grant the java classes defined in
+           /SAR-INF/classes/ directory the permission
+           to read and write files to temp directory. --&gt;
+      &lt;grant code-base="sar:/SAR-INF/classes/"&gt;
+        &lt;permission class="java.io.FilePermission"
+                    target="${/}tmp${/}*"
+                    action="read,write"/&gt;
+      &lt;/grant&gt;
+
+      &lt;!-- grant the secure.jar the permission to connect
+           a socket to localhost ports 1024 and above,
+           as long as code has been signed by "Fred". --&gt;
+      &lt;grant code-base="sar:/SAR-INF/lib/secure.jar"
+             signed-by="Fred"
+             key-store="myKeystore" &gt;
+        &lt;permission class="java.io.FilePermission"
+                    target="localhost:1024-"
+                    action="accept,connect,listen"/&gt;
+      &lt;/grant&gt;
+    &lt;/policy&gt;
+
+&lt;/environment&gt;
+
+                ]]&gt;&lt;/source&gt;
+            &lt;subsection name="Policy Descriptor Section"&gt;
+                &lt;p&gt;
</pre><pre class="diff" id="context">         The format of the policy section should be largely self evident if the assembler
</pre><pre class="diff" id="removed">-        has experience with standard policy files. It should be noted that if no
-        policy section is given then the Server Application runs at full permissions.
-        The evaluation of properties occurs in a similar manner to standard
</pre><pre class="diff" id="added">+        has experience with standard policy files. If no policy section is
+        specified then the Server Application runs with full access. The
+        evaluation of properties occurs in a similar manner to standard
</pre><pre class="diff" id="context">         policy file property expansion. There are a number of extra properties that
         will be evaluated. These include;
</pre><pre class="diff" id="removed">-                &lt;code&gt;app.home&lt;/code&gt; and
-                &lt;code&gt;app.name&lt;/code&gt;.
-            &lt;/p&gt;
-            &lt;p&gt;
</pre><pre class="diff" id="added">+                    &lt;code&gt;app.home&lt;/code&gt; and
+                    &lt;code&gt;app.name&lt;/code&gt;.
+                &lt;/p&gt;
+                &lt;p&gt;
</pre><pre class="diff" id="context">         One special thing to not is that the user can use URLs of the form,
         "sar:/SAR-INF/lib/*". This will apply the permissions to the jars
         contained in the .SAR file. Note that these urls must start with
         "sar:/" and must use the "/" character as file separator, regardless
</pre><pre class="diff" id="removed">-        of current operating system.
-            &lt;/p&gt;
-            &lt;p&gt;
</pre><pre class="diff" id="added">+        of the host operating system.
+                &lt;/p&gt;
+            &lt;/subsection&gt;
+            &lt;subsection name="Log Descriptor Section"&gt;
+                &lt;p&gt;
</pre><pre class="diff" id="context">         The logs section can currently have two types of elements;
</pre><pre class="diff" id="removed">-                &lt;em&gt;log-target&lt;/em&gt;s
</pre><pre class="diff" id="added">+                <span id="addedchars">&nbsp;&nbsp;&nbsp;&nbsp;</span>&lt;em&gt;log-target&lt;/em&gt;s
</pre><pre class="diff" id="context">         which represent destinations for logging and
</pre><pre class="diff" id="removed">-                &lt;em&gt;category&lt;/em&gt;s. There must be a
</pre><pre class="diff" id="added">+                <span id="addedchars">&nbsp;&nbsp;&nbsp;&nbsp;</span>&lt;em&gt;category&lt;/em&gt;s. There must be a
</pre><pre class="diff" id="context">         log-target with the name "default". Categories are hierarchial in nature, have a
         priority and are associated with one or more log-targets. See the logging
         documentation for a further description of this section.
</pre><pre class="diff" id="removed">-            &lt;/p&gt;
-            &lt;p&gt;
</pre><pre class="diff" id="added">+                &lt;/p&gt;
+                &lt;p&gt;
</pre><pre class="diff" id="context">         There is another type of log configuration. It is more configurable.
         Specify version attribute with logs elements. See javadoc of
         org.apache.avalon.excalibur.logger package for detailed description.
         Below is example configuration.
</pre><pre class="diff" id="removed">-            &lt;/p&gt;
-            &lt;source&gt;
-&amp;lt;?xml version="1.0"?&gt;
-&amp;lt;environment&gt;
-    &amp;lt;logs version="1.1"&gt;
-	    &amp;lt;factories&gt;
-    		&amp;lt;factory type="file" class="org.apache.avalon.excalibur.logger.factory.FileTargetFactory"/&gt;
-   		&amp;lt;/factories&gt;
-
-	    &amp;lt;categories&gt;
-    		&amp;lt;category name="" log-level="INFO"&gt;
-    			&amp;lt;log-target id-ref="default"/&gt;
-    		&amp;lt;/category&gt;
-    	&amp;lt;/categories&gt;
-
-	    &amp;lt;targets&gt;
-		    &amp;lt;file id="default"&gt;
-	    		&amp;lt;filename&gt;${app.home}/logs/default-&amp;lt;/filename&gt;
-	    		&amp;lt;append&gt;true&amp;lt;/append&gt;
-	   			&amp;lt;rotation type="unique" pattern="yyyyMMdd" suffix=".log"&gt;
-	    			&amp;lt;date&gt;yyyyMMdd&amp;lt;/date&gt;
-	    		&amp;lt;/rotation&gt;
-		    &amp;lt;/file&gt;
-	    &amp;lt;/targets&gt;
-    &amp;lt;/logs&gt;
-&amp;lt;/environment&gt;
-            &lt;/source&gt;
</pre><pre class="diff" id="added">+                &lt;/p&gt;
+                &lt;source&gt;
+                    &lt;![CDATA[
+&lt;?xml version="1.0"?&gt;
+&lt;environment&gt;
+    &lt;logs version="1.1"&gt;
+	    &lt;factories&gt;
+    		&lt;factory type="file" class="org.apache.avalon.excalibur.logger.factory.FileTargetFactory"/&gt;
+   		&lt;/factories&gt;
+
+	    &lt;categories&gt;
+    		&lt;category name="" log-level="INFO"&gt;
+    			&lt;log-target id-ref="default"/&gt;
+    		&lt;/category&gt;
+    	&lt;/categories&gt;
+
+	    &lt;targets&gt;
+		    &lt;file id="default"&gt;
+	    		&lt;filename&gt;${app.home}/logs/default-&lt;/filename&gt;
+	    		&lt;append&gt;true&lt;/append&gt;
+	   			&lt;rotation type="unique" pattern="yyyyMMdd" suffix=".log"&gt;
+	    			&lt;date&gt;yyyyMMdd&lt;/date&gt;
+	    		&lt;/rotation&gt;
+		    &lt;/file&gt;
+	    &lt;/targets&gt;
+    &lt;/logs&gt;
+&lt;/environment&gt;
+    ]]&gt;&lt;/source&gt;
+            &lt;/subsection&gt;
</pre><pre class="diff" id="context">         &lt;/section&gt;
     &lt;/body&gt;
 &lt;/document&gt;
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -&gt; email">CVSspam</a> 0.2.8</small></center>
</body></html>