CVS: jcontainer/loom/site/xdocs/reference assembly-xml-specification.xml,1.4,1.5 config-xml-specification.xml,1.2,1.3 environment-xml-specification.xml,1.2,1.3
Peter Donald <pdonald-yCVjj/[email protected]> Wed, 3 Dec 2003 04:44:54 -0600
| Newsgroups | gmane.comp.java.jcontainer.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/jcontainer/jcontainer/loom/site/xdocs/reference
In directory hogshead.codehaus.org:/tmp/cvs-serv21491/site/xdocs/reference
Modified Files:
assembly-xml-specification.xml config-xml-specification.xml
environment-xml-specification.xml
Log Message:
Styled codebase
Index: assembly-xml-specification.xml
===================================================================
RCS file: /cvsroot/jcontainer/jcontainer/loom/site/xdocs/reference/assembly-xml-specification.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- assembly-xml-specification.xml 17 Oct 2003 01:40:20 -0000 1.4
+++ assembly-xml-specification.xml 3 Dec 2003 10:44:51 -0000 1.5
@@ -1,13 +1,14 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<document>
- <properties>
- <title>Specification of assembly.xml </title>
+ <properties>
+ <title>Specification of assembly.xml </title>
<author email="peter at apache.org">Peter Donald</author>
</properties>
<body>
<section name="The Assembly File">
<p>
- The <code>assembly.xml</code> file defines how to assemble the
+ The
+ <code>assembly.xml</code> file defines how to assemble the
application. It defines the blocks that make up the application,
and how to connect them together. It also defines the
application listeners to include in the application.
@@ -31,7 +32,8 @@
<section name="The block Element">
<p>
- The <code><block></code> element defines a block, and
+ The
+ <code><block></code> element defines a block, and
how to provide services to the block. The
<code><block></code> element takes the following
attributes:
@@ -39,9 +41,9 @@
<table>
<tr>
- <th>Attribute</th>
- <th>Description</th>
- </tr>
+ <th>Attribute</th>
+ <th>Description</th>
+ </tr>
<tr>
<td>class</td>
<td>
@@ -64,13 +66,16 @@
<subsection name="The provide Element">
<p>
- The <code><provide></code> element defines how to
+ The
+ <code><provide></code> element defines how to
provide a particular service to the block. It connects
the block to another block that provides the required service.
- There must be at least one <code><provide></code>
+ There must be at least one
+ <code><provide></code>
element for each dependency listed in the block's
metadata descriptor. For array and mapped services,
- there may be more than one <code><provide></code>
+ there may be more than one
+ <code><provide></code>
element for each dependency. The
<code><provide></code> element takes the following
attributes:
@@ -78,14 +83,15 @@
<table>
<tr>
- <th>Attribute</th>
- <th>Description</th>
- </tr>
+ <th>Attribute</th>
+ <th>Description</th>
+ </tr>
<tr>
<td>alias</td>
<td>
The key to use for the service, for mapped services.
- Defaults to the value of the <code>name</code>
+ Defaults to the value of the
+ <code>name</code>
attribute.
</td>
</tr>
@@ -113,16 +119,18 @@
<subsection name="The proxy Element">
<p>
- The <code><proxy></code> element controls whether
+ The
+ <code><proxy></code> element controls whether
Loom will wrap the block with a proxy object before
- supplying it to other blocks. The <code><proxy></code>
+ supplying it to other blocks. The
+ <code><proxy></code>
element takes the following attributes:
</p>
<table>
<tr>
- <th>Attribute</th>
- <th>Description</th>
- </tr>
+ <th>Attribute</th>
+ <th>Description</th>
+ </tr>
<tr>
<td>disable</td>
<td>Disables the use of a proxy object. Default is false.</td>
@@ -133,15 +141,17 @@
<section name="The listener Element">
<p>
- The <code><listener></code> element defines an application
- listener. The <code><listener></code> element takes the
+ The
+ <code><listener></code> element defines an application
+ listener. The
+ <code><listener></code> element takes the
following attributes:
</p>
<table>
<tr>
- <th>Attribute</th>
- <th>Description</th>
- </tr>
+ <th>Attribute</th>
+ <th>Description</th>
+ </tr>
<tr>
<td>class</td>
<td>
@@ -165,10 +175,13 @@
<section name="The block-listener Element (Deprecated)">
<p>
- The <code><block-listener></code> element defines
+ The
+ <code><block-listener></code> element defines
a block listener. Note that the use of block listeners
- is deprecated. The <code><block-listener></code> element
- takes the same attributes as the <code><listener></code>
+ is deprecated. The
+ <code><block-listener></code> element
+ takes the same attributes as the
+ <code><listener></code>
element.
</p>
</section>
@@ -177,33 +190,35 @@
<p>
Below is an example assembly file. It defines 2 blocks, called
- <code>myAuthorizer</code> and <code>myBlock</code>, and a
- listener. Block <code>myBlock</code> uses the
+ <code>myAuthorizer</code> and
+ <code>myBlock</code>, and a
+ listener. Block
+ <code>myBlock</code> uses the
<code>Authorizer</code> service provided by block
<code>myAuthorizer</code>.
</p>
<source>
-<?xml version="1.0"?>
+ <?xml version="1.0"?>
-<assembly>
+ <assembly>
- <block name="myAuthorizer"
+ <block name="myAuthorizer"
class="com.biz.cornerstone.blocks.MyAuthorizer">
- </block>
+ </block>
- <block name="myBlock"
+ <block name="myBlock"
class="com.biz.cornerstone.blocks.MyBlock">
- <provide name="myAuthorizer"
+ <provide name="myAuthorizer"
role="com.biz.cornerstone.services.Authorizer"/>
- </block>
+ </block>
- <listener name="myListener"
+ <listener name="myListener"
class="com.biz.cornerstone.listeners.MyListener">
- </listener>
+ </listener>
-</assembly>
+ </assembly>
</source>
</section>
</body>
Index: config-xml-specification.xml
===================================================================
RCS file: /cvsroot/jcontainer/jcontainer/loom/site/xdocs/reference/config-xml-specification.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- config-xml-specification.xml 31 Jul 2003 20:29:40 -0000 1.2
+++ config-xml-specification.xml 3 Dec 2003 10:44:51 -0000 1.3
@@ -1,39 +1,40 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<document>
- <properties>
- <title>Specification of config.xml </title>
- <author email="peter at apache.org">Peter Donald</author>
- </properties>
- <body>
- <section name="Introduction">
- <p>
- The purpose of the <code>config.xml</code> file is to provide configuration data
+ <properties>
+ <title>Specification of config.xml </title>
+ <author email="peter at apache.org">Peter Donald</author>
+ </properties>
+ <body>
+ <section name="Introduction">
+ <p>
+ The purpose of the
+ <code>config.xml</code> file is to provide configuration data
to each of the blocks that require configuration data. The format of the
configuration data is block-specific, thus refer to documentation of Block
for relevant details. Each element below the root element has a name coresponding
to the name of a block specified in assembly.xml file. The contents of this
element is the configuration data for the block.
- </p>
- </section>
- <section name="Sample config.xml file">
- <source>
-<?xml version="1.0"?>
+ </p>
+ </section>
+ <section name="Sample config.xml file">
+ <source>
+ <?xml version="1.0"?>
-<config>
+ <config>
- <myAuthorizer>
- <!-- ...configuration data here... -->
- </myAuthorizer>
+ <myAuthorizer>
+ <!-- ...configuration data here... -->
+ </myAuthorizer>
- <myBlock>
- <param1>param1-value</param1>
- <an-integer>2</an-integer>
+ <myBlock>
+ <param1>param1-value</param1>
+ <an-integer>2</an-integer>
...
- </myBlock>
+ </myBlock>
-</config>
+ </config>
- </source>
- </section>
- </body>
+ </source>
+ </section>
+ </body>
</document>
Index: environment-xml-specification.xml
===================================================================
RCS file: /cvsroot/jcontainer/jcontainer/loom/site/xdocs/reference/environment-xml-specification.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- environment-xml-specification.xml 31 Jul 2003 20:29:40 -0000 1.2
+++ environment-xml-specification.xml 3 Dec 2003 10:44:51 -0000 1.3
@@ -1,115 +1,122 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<document>
- <properties>
- <title>Specification of environment.xml</title>
- <author email="peter at apache.org">Peter Donald</author>
- </properties>
- <body>
- <section name="Introduction">
- <p>
- The purpose of the <code>environment.xml</code> file is to configure environmental
+ <properties>
+ <title>Specification of environment.xml</title>
+ <author email="peter at apache.org">Peter Donald</author>
+ </properties>
+ <body>
+ <section name="Introduction">
+ <p>
+ The purpose of the
+ <code>environment.xml</code> 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 <code>environment.xml</code>
+ security policy and configure logging settings. A sample
+ <code>environment.xml</code>
follows. Previously thread pool settings were also configured in this
section but this has been deprecated. Note that previously the information stored in
- <code>environment.xml</code> was stored in a file named <code>server.xml</code>.
- </p>
- </section>
- <section name="Sample environment.xml file">
- <source>
-<?xml version="1.0"?>
+ <code>environment.xml</code> was stored in a file named
+ <code>server.xml</code>.
+ </p>
+ </section>
+ <section name="Sample environment.xml file">
+ <source>
+ <?xml version="1.0"?>
-<environment>
+ <environment>
- <logs>
- <category name="" target="default" priority="DEBUG" />
- <category name="myAuthorizer" target="myAuthorizer-target"
+ <logs>
+ <category name="" target="default" priority="DEBUG" />
+ <category name="myAuthorizer" target="myAuthorizer-target"
priority="DEBUG" />
- <log-target name="default"
+ <log-target name="default"
location="/logs/default.log" />
- <log-target name="myAuthorizer-target"
+ <log-target name="myAuthorizer-target"
location="/logs/authorizer.log" />
- </logs>
+ </logs>
- <policy>
- <keystore name="foo-keystore"
+ <policy>
+ <keystore name="foo-keystore"
location="sar:/conf/keystore"
type="JKS" />
- <grant code-base="file:${app.home}${/}some-dir${/}*"
+ <grant code-base="file:${app.home}${/}some-dir${/}*"
key-store="foo-keystore" >
- <permission class="java.io.FilePermission"
+ <permission class="java.io.FilePermission"
target="${/}tmp${/}*"
action="read,write" />
- </grant>
+ </grant>
- <grant signed-by="Bob"
+ <grant signed-by="Bob"
code-base="sar:/SAR-INF/lib/*"
key-store="foo-keystore" >
- <permission class="java.io.FilePermission"
+ <permission class="java.io.FilePermission"
target="${/}tmp${/}*"
action="read,write" />
- </grant>
- </policy>
+ </grant>
+ </policy>
-</environment>
+ </environment>
- </source>
- <p>
+ </source>
+ <p>
The format of the policy section should be largely self evident if the assembler
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
policy file property expansion. There are a number of extra properties that
- will be evaluated. These include; <code>app.home</code> and <code>app.name</code>.
- </p>
- <p>
+ will be evaluated. These include;
+ <code>app.home</code> and
+ <code>app.name</code>.
+ </p>
+ <p>
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
of current operating system.
- </p>
- <p>
- The logs section can currently have two types of elements; <em>log-target</em>s
- which represent destinations for logging and <em>category</em>s. There must be a
+ </p>
+ <p>
+ The logs section can currently have two types of elements;
+ <em>log-target</em>s
+ which represent destinations for logging and
+ <em>category</em>s. There must be a
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.
- </p>
- <p>
+ </p>
+ <p>
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.
- </p>
- <source>
-<?xml version="1.0"?>
-<environment>
- <logs version="1.1">
- <factories>
- <factory type="file" class="org.apache.avalon.excalibur.logger.factory.FileTargetFactory"/>
- </factories>
+ </p>
+ <source>
+ <?xml version="1.0"?>
+ <environment>
+ <logs version="1.1">
+ <factories>
+ <factory type="file" class="org.apache.avalon.excalibur.logger.factory.FileTargetFactory"/>
+ </factories>
- <categories>
- <category name="" log-level="INFO">
- <log-target id-ref="default"/>
- </category>
- </categories>
+ <categories>
+ <category name="" log-level="INFO">
+ <log-target id-ref="default"/>
+ </category>
+ </categories>
- <targets>
- <file id="default">
- <filename>${app.home}/logs/default-</filename>
- <append>true</append>
- <rotation type="unique" pattern="yyyyMMdd" suffix=".log">
- <date>yyyyMMdd</date>
- </rotation>
- </file>
- </targets>
- </logs>
-</environment>
- </source>
- </section>
- </body>
+ <targets>
+ <file id="default">
+ <filename>${app.home}/logs/default-</filename>
+ <append>true</append>
+ <rotation type="unique" pattern="yyyyMMdd" suffix=".log">
+ <date>yyyyMMdd</date>
+ </rotation>
+ </file>
+ </targets>
+ </logs>
+ </environment>
+ </source>
+ </section>
+ </body>
</document>