Hi,
The attached patch is for Berin's docs, which I've spent the day working
through. It's mostly to fix bugs in the example code and config files,
which I encountered while trying to get it to compile.
--Jeff
Index: src/documentation/xdocs//developing/implementing.xml
===================================================================
RCS file:
/home/cvspublic/jakarta-avalon/src/documentation/xdocs/developing/implementing.xml,v
retrieving revision 1.2
diff -u -r1.2 implementing.xml
--- src/documentation/xdocs//developing/implementing.xml 2001/07/20 16:26:22
1.2
+++ src/documentation/xdocs//developing/implementing.xml 2001/07/22 09:56:00
@@ -121,7 +121,7 @@
}
if (null == this.dbResource) {
- this.dbResource = conf.getChild("dbpool");
+ this.dbResource = conf.getChild("dbpool").getValue();
getLogger().debug("Using database pool: " + this.dbResource);
// Notice the getLogger()? This is from AbstractLoggable
// which I extend for just about all my components.
@@ -145,11 +145,11 @@
}
public final void initialize() throws Exception {
- if (null == this.manager) throw IllegalStateException("Not Composed");
+ if (null == this.manager) throw new IllegalStateException("Not Composed");
if (null == this.dbResource)
- throw IllegalStateException("Not Configured");
+ throw new IllegalStateException("Not Configured");
- if (disposed) throw IllegalStateException("Already disposed");
+ if (disposed) throw new IllegalStateException("Already disposed");
this.initialized = true;
}
@@ -286,7 +286,7 @@
<para>
Since there are varying levels of integration you want to achieve
with Excalibur's Component Architecture, we will start with the
- lowest level. Excalibur has a group of ComponentHolder objects that
+ lowest level. Excalibur has a group of ComponentHandler objects that
act as individual Containers for one type of Component. They manage
the complete life of your Component. Let me introduce the concept of
lifestyle interfaces. A lifestyle interface describes how the system
@@ -339,7 +339,7 @@
</listitem>
<listitem>
<para>
- Creation and initialization is done when ComponentHolder is
+ Creation and initialization is done when ComponentHandler is
created.
</para>
</listitem>
@@ -361,7 +361,7 @@
</listitem>
<listitem>
<para>
- Creation and initialization is done when ComponentHolder is
+ Creation and initialization is done when ComponentHandler is
created.
</para>
</listitem>
@@ -369,7 +369,7 @@
</listitem>
</itemizedlist>
<para>
- The ComponentHolder interface is very simple to deal with. You
+ The ComponentHandler interface is very simple to deal with. You
initialize the Constructor with the Java class, the Configuration
object, the ConfigurationManager, a Context object, and a
RoleManager. If you know that your Component will not need any of
@@ -382,8 +382,8 @@
<programlisting>
<![CDATA[
class ContainerComponent implements Component, Initializable, Disposable {
- ComponentHolder docs = null;
- ComponentHolder guard = null;
+ ComponentHandler docs = null;
+ ComponentHandler guard = null;
DefaultComponentManager manager = new DefaultComponentManager();
public void initialize() throws Exception {
@@ -393,10 +393,10 @@
conf.addChild(pool);
this.docs.configure(conf);
- this.docs = ComponentHolder.getComponentHandler(
+ this.docs = ComponentHandler.getComponentHandler(
DatabaseDocumentRepository.class,
conf, this.manager, null, null);
- this.guard = ComponentHolder.getComponentHandler(
+ this.guard = ComponentHandler.getComponentHandler(
DocumentGuardianComponent.class,
null, this.manager, null, null);
@@ -421,7 +421,7 @@
At this point, we only saved ourselves a few lines of code. We still
manually created our Configuration object, we still had to set the
Logger, and we still had to initialize and dispose of the
- ComponentHolder objects. What we did at this point is simply protect
+ ComponentHandler objects. What we did at this point is simply protect
ourselves from changing interfaces. You may find it better for your
code to use this approach. Excalibur went further though. Most
complex systems have configuration files, and they allow an
@@ -435,7 +435,7 @@
<component
role="org.apache.avalon.excalibur.datasource.DataSourceComponentSelector"
class="org.apache.avalon.excalibur.component.ExcaliburComponentSelector">
- <component-instance hint="documents"
+ <component-instance name="documents"
class="org.apache.avalon.excalibur.datasource.JdbcDataSourceComponent">
<pool-controller min="5" max="10"/>
<auto-commit>false</auto-commit>
@@ -444,7 +444,8 @@
<user>test</user>
<password>test</password>
</component-instance>
- <component-instance hint="security">
+ <component-instance name="security"
+ class="org.apache.avalon.excalibur.datasource.JdbcDataSourceComponent">
<pool-controller min="5" max="10"/>
<auto-commit>false</auto-commit>
<driver>org.mysql.MySqlDriver</driver>
@@ -501,7 +502,7 @@
new DefaultConfigurationBuilder();
Configuration sysConfig = builder.buildFromFile("./conf/system.xconf");
- this.manager.setLogger(Hierarchy.getLoggerFor("document"));
+
+this.manager.setLogger(Hierarchy.getDefaultHierarchy().getLoggerFor("document"));
this.manager.contextualize(new DefaultContext());
this.manager.configure(sysConfig);
this.manager.initialize();
@@ -523,7 +524,7 @@
<para>
There is a lot of activity happening under the hood of the
ExcaliburComponentManager. For each "component" element in the
- configuration file, Excalibur creates a ComponentHolder for each
+ configuration file, Excalibur creates a ComponentHandler for each
class entry and maps it to the role entry. The "component" element
and all it's child elements are used for the Configuration of the
Component. When the Component is an ExcaliburComponentSelector, the
@@ -576,7 +577,7 @@
<role
name="org.apache.avalon.excalibur.datasource.DataSourceComponentSelector"
shorthand="datasources" default-class=
- "org.apache.avalon.excalibur.component.DefaultComponentSelector">
+ "org.apache.avalon.excalibur.component.ExcaliburComponentSelector">
<hint shorthand="jdbc"
class="org.apache.avalon.excalibur.datasource.JdbcDataSourceComponent"/>
<hint shorthand="j2ee"
@@ -613,10 +614,10 @@
.getResourceAsStream("/org/apache/bizserver/docs/document.roles"));
RoleManager roles = new DefaultRoleManager();
-roles.setLogger(Hierarchy.getLoggerFor("document.roles"));
+roles.setLogger(Hierarchy.getDefaultHierarchy().getLoggerFor("document.roles"));
roles.configure(roleConfig);
-this.manager.setLogger(Hierarchy.getLoggerFor("document"));
+this.manager.setLogger(Hierarchy.getDefaultHierarchy().getLoggerFor("document"));
this.manager.contextualize(new DefaultContext());
this.manager.setRoleManager(roles);
this.manager.configure(sysConfig);
@@ -701,7 +702,7 @@
<title>Initialization and Disposal Approach</title>
<programlisting>
<![CDATA[
-class MyClass implements Composable, Disposable {
+class MyClass implements Component, Composable, Disposable {
ComponentManager manager;
Guardian myGuard;
Index: src/documentation/xdocs//developing/index.xml
===================================================================
RCS file: /home/cvspublic/jakarta-avalon/src/documentation/xdocs/developing/index.xml,v
retrieving revision 1.1
diff -u -r1.1 index.xml
--- src/documentation/xdocs//developing/index.xml 2001/07/18 14:35:41 1.1
+++ src/documentation/xdocs//developing/index.xml 2001/07/22 09:56:01
@@ -104,7 +104,7 @@
<para>
This developer's guide is dedicated to the three people who's vision
started the Avalon project: Federico Barbieri, Stefano Mazzocchi, and
- Pierpaolo Fumageli. Their concept for the Avalon project has stood
+ Pierpaolo Fumagalli. Their concept for the Avalon project has stood
the test of time.
</para>
</dedication>
Index: src/documentation/xdocs//developing/introduction.xml
===================================================================
RCS file:
/home/cvspublic/jakarta-avalon/src/documentation/xdocs/developing/introduction.xml,v
retrieving revision 1.1
diff -u -r1.1 introduction.xml
--- src/documentation/xdocs//developing/introduction.xml 2001/07/18 14:35:41
1.1
+++ src/documentation/xdocs//developing/introduction.xml 2001/07/22 09:56:15
@@ -27,7 +27,7 @@
number of projects.
</para>
<para>
- Stefano Mazzocchi, Federico Barbieri, and Pierpaolo Fumagelli
+ Stefano Mazzocchi, Federico Barbieri, and Pierpaolo Fumagalli
created the initial version. Later in 2000, Berin Loritsch and
Peter Donald joined the project. By that time, Pierpaolo and
Stefano had moved on to other projects and Java Apache Server
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]