You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by as...@apache.org on 2007/09/08 22:17:47 UTC
svn commit: r573901 [1/44] - in /cocoon/site: site/ site/2.0/
site/2.0/developing/ site/2.0/faq/ site/2.0/howto/chaperon/
site/2.0/installing/ site/2.0/plan/ site/2.0/snippet/ site/2.0/tutorial/
site/2.0/userdocs/ site/2.0/userdocs/actions/ site/2.0/us...
Author: asavory
Date: Sat Sep 8 13:17:41 2007
New Revision: 573901
URL: http://svn.apache.org/viewvc?rev=573901&view=rev
Log:
Add Cocoon GT button
Modified:
cocoon/site/site/2.0/developing/avalon.html
cocoon/site/site/2.0/developing/datasources.html
cocoon/site/site/2.0/developing/deli.html
cocoon/site/site/2.0/developing/deliquick.html
cocoon/site/site/2.0/developing/httprequest.html
cocoon/site/site/2.0/developing/index.html
cocoon/site/site/2.0/developing/parent-component-manager.html
cocoon/site/site/2.0/doclist.html
cocoon/site/site/2.0/faq/faq-actions.html
cocoon/site/site/2.0/faq/faq-aggregators.html
cocoon/site/site/2.0/faq/faq-configure-c2.html
cocoon/site/site/2.0/faq/faq-configure-environment.html
cocoon/site/site/2.0/faq/faq-databases.html
cocoon/site/site/2.0/faq/faq-debugging.html
cocoon/site/site/2.0/faq/faq-generators.html
cocoon/site/site/2.0/faq/faq-matchers.html
cocoon/site/site/2.0/faq/faq-selectors.html
cocoon/site/site/2.0/faq/faq-serializers.html
cocoon/site/site/2.0/faq/faq-sitemap.html
cocoon/site/site/2.0/faq/faq-transformers.html
cocoon/site/site/2.0/faq/faq-xsp.html
cocoon/site/site/2.0/howto/chaperon/howto-chaperon-grm.html
cocoon/site/site/2.0/howto/chaperon/howto-chaperon-intro.html
cocoon/site/site/2.0/howto/chaperon/howto-chaperon-txtgrm.html
cocoon/site/site/2.0/installing/tests.html
cocoon/site/site/2.0/installing/updating.html
cocoon/site/site/2.0/plan/linkalarm-readme.txt
cocoon/site/site/2.0/snippet/index.html
cocoon/site/site/2.0/snippet/snippet-internal-pipeline.html
cocoon/site/site/2.0/tutorial/index.html
cocoon/site/site/2.0/tutorial/tutorial-develop-webapp.html
cocoon/site/site/2.0/tutorial/tutorial-shots.html
cocoon/site/site/2.0/userdocs/actions/actions.html
cocoon/site/site/2.0/userdocs/actions/database-actions.html
cocoon/site/site/2.0/userdocs/actions/session-action.html
cocoon/site/site/2.0/userdocs/concepts/actions.txt
cocoon/site/site/2.0/userdocs/generators/telnet.txt
cocoon/site/site/2.0/userdocs/index.html
cocoon/site/site/2.0/userdocs/matchers/matchers.html
cocoon/site/site/2.0/userdocs/matchers/wildcardheader-matcher.html
cocoon/site/site/2.0/userdocs/matchers/wildcarduri-matcher.html
cocoon/site/site/2.0/userdocs/readers/axisrpc-reader.html
cocoon/site/site/2.0/userdocs/readers/byterangeresource-reader.html
cocoon/site/site/2.0/userdocs/readers/database-reader.html
cocoon/site/site/2.0/userdocs/readers/directoryziparchiver-reader.html
cocoon/site/site/2.0/userdocs/readers/image-reader.html
cocoon/site/site/2.0/userdocs/readers/jsp-reader.html
cocoon/site/site/2.0/userdocs/readers/readers.html
cocoon/site/site/2.0/userdocs/readers/resource-reader.html
cocoon/site/site/2.0/userdocs/selectors/browser-selector.html
cocoon/site/site/2.0/userdocs/selectors/host-selector.html
cocoon/site/site/2.0/userdocs/selectors/parameter-selector.html
cocoon/site/site/2.0/userdocs/selectors/requestattribute-selector.html
cocoon/site/site/2.0/userdocs/selectors/requestparameter-selector.html
cocoon/site/site/2.0/userdocs/selectors/selectors.html
cocoon/site/site/2.0/userdocs/serializers/html-serializer.html
cocoon/site/site/2.0/userdocs/serializers/link-serializer.html
cocoon/site/site/2.0/userdocs/serializers/pcl-serializer.html
cocoon/site/site/2.0/userdocs/serializers/pdf-serializer.html
cocoon/site/site/2.0/userdocs/serializers/ps-serializer.html
cocoon/site/site/2.0/userdocs/serializers/serializers.html
cocoon/site/site/2.0/userdocs/serializers/svg-serializer.html
cocoon/site/site/2.0/userdocs/serializers/svgjpeg-serializer.html
cocoon/site/site/2.0/userdocs/serializers/svgpng-serializer.html
cocoon/site/site/2.0/userdocs/serializers/svgtiff-serializer.html
cocoon/site/site/2.0/userdocs/serializers/svgxml-serializer.html
cocoon/site/site/2.0/userdocs/serializers/text-serializer.html
cocoon/site/site/2.0/userdocs/serializers/vrml-serializer.html
cocoon/site/site/2.0/userdocs/serializers/wap-serializer.html
cocoon/site/site/2.0/userdocs/serializers/xhtml-serializer.html
cocoon/site/site/2.0/userdocs/serializers/xml-serializer.html
cocoon/site/site/2.0/userdocs/xsp/index.html
cocoon/site/site/2.0/userdocs/xsp/logicsheet.html
cocoon/site/site/2.0/userdocs/xsp/request.html
cocoon/site/site/2.0/userdocs/xsp/session.html
cocoon/site/site/2.0/userdocs/xsp/sessions.html
cocoon/site/site/2.0/userdocs/xsp/xsp-internals.html
cocoon/site/site/2.0/userdocs/xsp/xsp.html
cocoon/site/site/community/committer.html
cocoon/site/site/community/contrib.html
cocoon/site/site/community/incubation.html
cocoon/site/site/community/mail-archives.html
cocoon/site/site/community/mail-lists.html
cocoon/site/site/community/members.html
cocoon/site/site/devinfo/index.html
cocoon/site/site/devinfo/releasing.html
cocoon/site/site/fr/index.html
cocoon/site/site/fr/mail-lists.html
cocoon/site/site/history.html
cocoon/site/site/index.html
cocoon/site/site/link/books.html
cocoon/site/site/link/dtd-schema.html
cocoon/site/site/link/hosting.html
cocoon/site/site/link/in-the-press.html
cocoon/site/site/link/index.html
cocoon/site/site/link/livesites-1.x.html
cocoon/site/site/link/livesites-2.0.html
cocoon/site/site/link/livesites-2.1.html
cocoon/site/site/link/projects.html
cocoon/site/site/link/sites.html
cocoon/site/site/link/tips-guides.html
cocoon/site/site/link/training.html
cocoon/site/site/link/xml.html
cocoon/site/site/link/xsl.html
cocoon/site/site/linkmap.html
cocoon/site/site/linkmap.pdf
cocoon/site/site/news/archives.html
cocoon/site/site/news/archives.pdf
cocoon/site/site/news/index.html
cocoon/site/site/news/index.pdf
cocoon/site/site/skin/CommonMessages_es.xml
cocoon/site/site/skin/basic.css
cocoon/site/site/skin/images/rc-b-l-15-1body-2menu-3menu.png
cocoon/site/site/skin/images/rc-b-r-15-1body-2menu-3menu.png
cocoon/site/site/skin/images/rc-b-r-5-1header-2tab-selected-3tab-selected.png
cocoon/site/site/skin/images/rc-t-l-5-1header-2searchbox-3searchbox.png
cocoon/site/site/skin/images/rc-t-l-5-1header-2tab-selected-3tab-selected.png
cocoon/site/site/skin/images/rc-t-l-5-1header-2tab-unselected-3tab-unselected.png
cocoon/site/site/skin/images/rc-t-r-15-1body-2menu-3menu.png
cocoon/site/site/skin/images/rc-t-r-5-1header-2searchbox-3searchbox.png
cocoon/site/site/skin/images/rc-t-r-5-1header-2tab-selected-3tab-selected.png
cocoon/site/site/skin/images/rc-t-r-5-1header-2tab-unselected-3tab-unselected.png
cocoon/site/site/skin/profile.css
cocoon/site/site/skin/screen.css
cocoon/site/site/versioning.html
cocoon/site/site/whoweare.html
cocoon/site/src/documentation/content/xdocs/news/archives.xml
cocoon/site/src/documentation/content/xdocs/news/index.xml
cocoon/site/src/documentation/skinconf.xml
Modified: cocoon/site/site/2.0/developing/avalon.html
URL: http://svn.apache.org/viewvc/cocoon/site/site/2.0/developing/avalon.html?rev=573901&r1=573900&r2=573901&view=diff
==============================================================================
--- cocoon/site/site/2.0/developing/avalon.html (original)
+++ cocoon/site/site/2.0/developing/avalon.html Sat Sep 8 13:17:41 2007
@@ -1,371 +1,371 @@
-<html>
-<head>
-<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title>Avalon for Apache Cocoon</title>
-<STYLE type="text/css">
-a.menu {
- color: #FFFFFF;
- text-align:left;
- font-size:12px;
- font-family: Verdana, Arial, Helvetica, sans-serif;
- font-weight:plain;
- text-decoration:none;
- padding-left: 14px
-}
-
-A.menu:hover {
- color: #FFCC00
-}
-
-
-.menutitle {
- color: #000000;
- text-align:left;
- font-size:10px;
- font-family: Verdana, Arial, Helvetica, sans-serif;
- font-weight:bold;
- padding-left: 8px
-}
-.menuselected {
- color: #FFCC00;
- text-align:left;
- font-size:12px;
- font-family: Verdana, Arial, Helvetica, sans-serif;
- font-weight:bold;
- padding-left: 14px
-}
-</STYLE>
-</head>
-<body bgcolor="#ffffff" marginheight="4" marginwidth="4" leftmargin="4" topmargin="4" alink="#cc0000" vlink="#0086b2" link="#039acc" text="#000000">
-<table border="0" cellpadding="0" cellspacing="0" width="100%">
-<tr>
-<td align="left" valign="top" rowspan="3" height="60" width="135"><img border="0" vspace="0" hspace="0" src="images/logo.gif" height="60" width="135"></td><td background="images/line.gif" rowspan="1" colSpan="2" align="left" valign="top" height="0" width="100%"></td><td align="left" valign="top" rowspan="3" height="60" width="29"><img border="0" vspace="0" hspace="0" src="images/right.gif" height="60" width="29"></td>
-</tr>
-<tr>
-<td bgcolor="#0086b2" colspan="2" align="right" valign="top" height="35" width="100%"><font color="#ffffff" face="Verdana, Arial, Helvetica, sans-serif" size="5">Avalon for Apache Cocoon</font></td>
-</tr>
-<tr>
-<td background="images/bottom.gif" colspan="2" width="100%" valign="top" height="20" bgcolor="#0086b2" align="right">
-<table width="288" cellspacing="0" cellpadding="0" border="0">
-<tr>
-<td align="left" valign="top" height="20" width="96"><a target="new" href="http://xml.apache.org/"><img border="0" vspace="0" hspace="0" name="xml" src="images/button-xml-lo.gif" height="20" width="96" alt="http://xml.apache.org/"></a></td><td align="left" valign="top" height="20" width="96"><a target="new" href="http://www.apache.org/"><img border="0" vspace="0" hspace="0" name="asf" src="images/button-asf-lo.gif" height="20" width="96" alt="http://www.apache.org/"></a></td><td align="left" valign="top" height="20" width="96"><a target="new" href="http://www.w3.org/"><img border="0" vspace="0" hspace="0" name="w3c" src="images/button-w3c-lo.gif" height="20" width="96" alt="http://www.w3.org/"></a></td>
-</tr>
-</table>
-</td>
-</tr>
-</table>
-<table width="100%" cellspacing="0" cellpadding="0" border="0">
-<tr width="100%">
-<td align="left" valign="top" width="120">
-<table width="120" cellspacing="0" cellpadding="0" border="0" bgcolor="#a0a0a0">
-<tr>
-<td valign="top" align="left"><img width="120" vspace="0" src="images/join.gif" hspace="0" height="14" border="0"><br>
-</td>
-</tr>
-<tr>
-<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="../index.html">Main</a></td>
-</tr>
-<tr>
-<td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
-<span class="menutitle">Concepts</span></td>
-</tr>
-<tr>
-<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="httprequest.html">Internals</a></td>
-</tr>
-<tr>
-<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="extending.html">Extending</a></td>
-</tr>
-<tr>
-<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><span class="menuselected">Avalon</span></td>
-</tr>
-<tr>
-<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="datasources.html">Using Databases</a></td>
-</tr>
-<tr>
-<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="parent-component-manager.html">Parent CM</a></td>
-</tr>
-<tr>
-<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="deliquick.html">DELI Quick Start</a></td>
-</tr>
-<tr>
-<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="deli.html">DELI</a></td>
-</tr>
-<tr>
-<td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
-<span class="menutitle">Webapps</span></td>
-</tr>
-<tr>
-<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="webapps/index.html">Developing Webapps</a></td>
-</tr>
-<tr>
-<td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
-<span class="menutitle">Java</span></td>
-</tr>
-<tr>
-<td valign="top" background="images/label-background_a.gif" bgcolor="#959595"><a class="menu" target="new" href="../apidocs/index.html">API (Javadoc)</a></td>
-</tr>
-<tr>
-<td align="left" valign="top"><img width="120" vspace="0" src="images/close.gif" hspace="0" height="14" border="0"><br>
-</td>
-</tr>
-</table>
-</td><td>
-<table cellspacing="15" cellpadding="0" border="0">
-<tr>
-<td>
-
-
- <font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Goal</font>
-<hr style="color: #0086b2" size="1">
-
-<p>
-<font color="black" face="verdana,helvetica,sanserif">This document tries to give the basic knowledge of Avalon that is
- necessary to understand Cocoon.</font>
-</p>
-
-<p>
-<font color="black" face="verdana,helvetica,sanserif">People that are trying to understand Avalon in depth, will probably
- not be much helped by this document. But if you want to understand Cocoon,
- you have to have a basic grasp of Avalon. </font>
-</p>
-
-<p>
-<font color="black" face="verdana,helvetica,sanserif">The document also contains the basic configuration steps for
- configuring Avalon components within Cocoon.</font>
-</p>
-
-<p>
-<font color="black" face="verdana,helvetica,sanserif">Much of this document is copied and pasted from original Avalon
- documentation. However, I hope that the fact that all things relevant for
- Cocoon are put together in one place, will help you to understand Cocoon
- faster.</font>
-</p>
-
-<p>
-<font color="black" face="verdana,helvetica,sanserif">For people wishing to learn Avalon in-depth,
- <a href="http://jakarta.apache.org/avalon/developing/index.html">this is your starting
- point</a>.</font>
-</p>
-
-
-<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Overview</font>
-<hr style="color: #0086b2" size="1">
-
-<p>
-<font color="black" face="verdana,helvetica,sanserif">For a mission statement of Apache Avalon, please read
- <a href="http://jakarta.apache.org/avalon/index.html">the Avalon
- homepage</a>.</font>
-</p>
-
-<p>
-<font color="black" face="verdana,helvetica,sanserif">In short, Avalon tries to take design efforts away from server-side
- programmers by providing a framework that </font>
-</p>
-
-<blockquote>
-<ul>
-
-<li>
-<font face="verdana, helvetica, sans serif">provides basic working classes;</font>
-</li>
-
-<li>
-<font face="verdana, helvetica, sans serif">provides interfaces to allow different efforts to be integrated
- more easily.</font>
-</li>
-
-</ul>
-</blockquote>
-
-
-<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">The classes and interfaces</font>
-<hr style="color: #0086b2" size="1">
-
-<p>
-<font color="black" face="verdana,helvetica,sanserif">These classes and interfaces are extensively used by Cocoon:</font>
-</p>
-
-<font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>ComponentManager</b></font>
-
-<p>
-<font color="black" face="verdana,helvetica,sanserif"><code><font face="courier, monospaced">org.apache.avalon.framework.component.ComponentManager</font></code></font>
-</p>
-
-<p>
-<font color="black" face="verdana,helvetica,sanserif">A <code><font face="courier, monospaced">ComponentManager</font></code> selects <code><font face="courier, monospaced">Component</font></code>s
- based on a role. The contract is that all the <code><font face="courier, monospaced">Component</font></code>s implement
- the differing roles and there is one <code><font face="courier, monospaced">Component</font></code> per role. If you
- need to select on of many <code><font face="courier, monospaced">Component</font></code>s that implement the same role,
- then you need to use a <code><font face="courier, monospaced">ComponentSelector</font></code>. Roles are the full
- interface name.</font>
-</p>
-
-<p>
-<font color="black" face="verdana,helvetica,sanserif">A role is better understood by the analogy of a play. There are many
- different roles in a script. Any actor or actress can play any given part and
- you get the same results (phrases said, movements made, etc.), but the exact
- nuances of the performance is different.</font>
-</p>
-
-<p>
-<font color="black" face="verdana,helvetica,sanserif">The <code><font face="courier, monospaced">Cocoon</font></code> class implements e.g. the
- <code><font face="courier, monospaced">ComponentManager</font></code> interface.</font>
-</p>
-
-
-<font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>Composable</b></font>
-
-<p>
-<font color="black" face="verdana,helvetica,sanserif"><code><font face="courier, monospaced">org.apache.avalon.framework.component.Composable</font></code></font>
-</p>
-
-<p>
-<font color="black" face="verdana,helvetica,sanserif">A <code><font face="courier, monospaced">Composable</font></code> is a class that need to connect to software
- components using a "role" abstraction, thus not depending on particular
- implementations but on behavioral interfaces. </font>
-</p>
-
-
-<font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>Component</b></font>
-
-<p>
-<font color="black" face="verdana,helvetica,sanserif"><code><font face="courier, monospaced">org.apache.avalon.framework.component.Component</font></code></font>
-</p>
-
-<p>
-<font color="black" face="verdana,helvetica,sanserif">This interface identifies classes that can be used as
- <code><font face="courier, monospaced">Components</font></code> by a <code><font face="courier, monospaced">Composable</font></code>. </font>
-</p>
-
-<p>
-<font color="black" face="verdana,helvetica,sanserif">A <code><font face="courier, monospaced">Component</font></code> is the basic building block of Avalon. When
- a class implements this interface, it allows itself to be managed by a
- <code><font face="courier, monospaced">ComponentManager</font></code> and used by an outside element called a
- <code><font face="courier, monospaced">Composable</font></code>. The <code><font face="courier, monospaced">Composable</font></code> must know what type of
- <code><font face="courier, monospaced">Component</font></code> it is accessing, so it will re-cast the
- <code><font face="courier, monospaced">Component</font></code> into the type it needs. </font>
-</p>
-
-<p>
-<font color="black" face="verdana,helvetica,sanserif"><code><font face="courier, monospaced">Component</font></code>s in Cocoon are e.g. those defined in
- <code><font face="courier, monospaced">cocoon.xconf</font></code>.</font>
-</p>
-
-
-<font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>Configuration</b></font>
-
-<p>
-<font color="black" face="verdana,helvetica,sanserif"><code><font face="courier, monospaced">org.apache.avalon.framework.configuration.Configuration</font></code></font>
-</p>
-
-<p>
-<font color="black" face="verdana,helvetica,sanserif"><code><font face="courier, monospaced">Configuration</font></code> is a interface encapsulating a
- configuration node used to retrieve configuration values. This is a "read only"
- interface preventing applications from modifying their own configurations. The
- contract surrounding the <code><font face="courier, monospaced">Configuration</font></code> is that once it is created,
- information never changes. The <code><font face="courier, monospaced">Configuration</font></code> is built by the
- <code><font face="courier, monospaced">ConfigurationBuilder</font></code>.</font>
-</p>
-
-
-<font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>Configurable</b></font>
-
-<p>
-<font color="black" face="verdana,helvetica,sanserif"><code><font face="courier, monospaced">org.apache.avalon.framework.configuration.Configurable</font></code></font>
-</p>
-
-<p>
-<font color="black" face="verdana,helvetica,sanserif"><code><font face="courier, monospaced">Configurable</font></code> is a interface describing a component which
- can be configured. This component gets a <code><font face="courier, monospaced">Configuration</font></code>
- object as input.</font>
-</p>
-
-
-<font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>ConfigurationBuilder</b></font>
-
-<p>
-<font color="black" face="verdana,helvetica,sanserif"><code><font face="courier, monospaced">org.apache.avalon.ConfigurationBuilder</font></code></font>
-</p>
-
-<p>
-<font color="black" face="verdana,helvetica,sanserif">A <code><font face="courier, monospaced">ConfigurationBuilder</font></code> builds
- <code><font face="courier, monospaced">Configuration</font></code>s.</font>
-</p>
-
-
-
-<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Configuration</font>
-<hr style="color: #0086b2" size="1">
-
-<p>
-<font color="black" face="verdana,helvetica,sanserif">Most available Avalon components are configured in the cocoon.xconf.</font>
-</p>
-
-<font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>Pooling configuration</b></font>
-
-<p>
-<font color="black" face="verdana,helvetica,sanserif">Avalon now incorporates a couple of modifiers for a Component
- definition that allows you to control the number of Components
- in a pool, and how quickly it grows. This is especially helpful
- in Cocoon where the defaults don't always work well.</font>
-</p>
-
-<p>
-<font color="black" face="verdana,helvetica,sanserif">The magic attributes are "pool-min", "pool-max", and "pool-grow".
- The defaults are:</font>
-</p>
-
-<blockquote>
-<ol>
-
-<li>
-<font face="verdana, helvetica, sans serif">pool-max: 8</font>
-</li>
-
-<li>
-<font face="verdana, helvetica, sans serif">pool-min: 2</font>
-</li>
-
-<li>
-<font face="verdana, helvetica, sans serif">pool-grow: pool-min (2)</font>
-</li>
-
-</ol>
-</blockquote>
-
-<p>
-<font color="black" face="verdana,helvetica,sanserif">What this means is that the pool for the default component initially
- contains 2 instances, and if demand exceeds that the pool will increase
- by two components at a time up to 8 instances. Beyond that the pool
- turns into a factory in that new Component instances are created, but
- destroyed when they are returned. This is a performance issue--but
- it does manage the number of instances available at one time.</font>
-</p>
-
-<p>
-<font color="black" face="verdana,helvetica,sanserif">Please note that if
- not specified, "pool-grow" always matches "pool-min". If not specified
- "pool-min" always equals "2". If you specify the minimum being higher
- than the maximum, then the maximum will match the minimum, and the pool
- will be fully filled on initialization.</font>
-</p>
-
-
-
-
-</td>
-</tr>
-</table>
-</td>
-</tr>
-</table>
-<table width="100%" cellspacing="0" cellpadding="0" border="0">
-<tr>
-<td bgcolor="#0086b2"><img width="1" src="images/dot.gif" height="1"></td>
-</tr>
-<tr>
-<td align="center"><font size="-1" face="arial,helvetica,sanserif" color="#0086b2"><i>Copyright © 1999-2002 The Apache Software Foundation. All Rights Reserved.</i></font></td>
-</tr>
-</table>
-</body>
-</html>
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Avalon for Apache Cocoon</title>
+<STYLE type="text/css">
+a.menu {
+ color: #FFFFFF;
+ text-align:left;
+ font-size:12px;
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-weight:plain;
+ text-decoration:none;
+ padding-left: 14px
+}
+
+A.menu:hover {
+ color: #FFCC00
+}
+
+
+.menutitle {
+ color: #000000;
+ text-align:left;
+ font-size:10px;
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-weight:bold;
+ padding-left: 8px
+}
+.menuselected {
+ color: #FFCC00;
+ text-align:left;
+ font-size:12px;
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-weight:bold;
+ padding-left: 14px
+}
+</STYLE>
+</head>
+<body bgcolor="#ffffff" marginheight="4" marginwidth="4" leftmargin="4" topmargin="4" alink="#cc0000" vlink="#0086b2" link="#039acc" text="#000000">
+<table border="0" cellpadding="0" cellspacing="0" width="100%">
+<tr>
+<td align="left" valign="top" rowspan="3" height="60" width="135"><img border="0" vspace="0" hspace="0" src="images/logo.gif" height="60" width="135"></td><td background="images/line.gif" rowspan="1" colSpan="2" align="left" valign="top" height="0" width="100%"></td><td align="left" valign="top" rowspan="3" height="60" width="29"><img border="0" vspace="0" hspace="0" src="images/right.gif" height="60" width="29"></td>
+</tr>
+<tr>
+<td bgcolor="#0086b2" colspan="2" align="right" valign="top" height="35" width="100%"><font color="#ffffff" face="Verdana, Arial, Helvetica, sans-serif" size="5">Avalon for Apache Cocoon</font></td>
+</tr>
+<tr>
+<td background="images/bottom.gif" colspan="2" width="100%" valign="top" height="20" bgcolor="#0086b2" align="right">
+<table width="288" cellspacing="0" cellpadding="0" border="0">
+<tr>
+<td align="left" valign="top" height="20" width="96"><a target="new" href="http://xml.apache.org/"><img border="0" vspace="0" hspace="0" name="xml" src="images/button-xml-lo.gif" height="20" width="96" alt="http://xml.apache.org/"></a></td><td align="left" valign="top" height="20" width="96"><a target="new" href="http://www.apache.org/"><img border="0" vspace="0" hspace="0" name="asf" src="images/button-asf-lo.gif" height="20" width="96" alt="http://www.apache.org/"></a></td><td align="left" valign="top" height="20" width="96"><a target="new" href="http://www.w3.org/"><img border="0" vspace="0" hspace="0" name="w3c" src="images/button-w3c-lo.gif" height="20" width="96" alt="http://www.w3.org/"></a></td>
+</tr>
+</table>
+</td>
+</tr>
+</table>
+<table width="100%" cellspacing="0" cellpadding="0" border="0">
+<tr width="100%">
+<td align="left" valign="top" width="120">
+<table width="120" cellspacing="0" cellpadding="0" border="0" bgcolor="#a0a0a0">
+<tr>
+<td valign="top" align="left"><img width="120" vspace="0" src="images/join.gif" hspace="0" height="14" border="0"><br>
+</td>
+</tr>
+<tr>
+<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="../index.html">Main</a></td>
+</tr>
+<tr>
+<td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
+<span class="menutitle">Concepts</span></td>
+</tr>
+<tr>
+<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="httprequest.html">Internals</a></td>
+</tr>
+<tr>
+<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="extending.html">Extending</a></td>
+</tr>
+<tr>
+<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><span class="menuselected">Avalon</span></td>
+</tr>
+<tr>
+<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="datasources.html">Using Databases</a></td>
+</tr>
+<tr>
+<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="parent-component-manager.html">Parent CM</a></td>
+</tr>
+<tr>
+<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="deliquick.html">DELI Quick Start</a></td>
+</tr>
+<tr>
+<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="deli.html">DELI</a></td>
+</tr>
+<tr>
+<td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
+<span class="menutitle">Webapps</span></td>
+</tr>
+<tr>
+<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="webapps/index.html">Developing Webapps</a></td>
+</tr>
+<tr>
+<td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
+<span class="menutitle">Java</span></td>
+</tr>
+<tr>
+<td valign="top" background="images/label-background_a.gif" bgcolor="#959595"><a class="menu" target="new" href="../apidocs/index.html">API (Javadoc)</a></td>
+</tr>
+<tr>
+<td align="left" valign="top"><img width="120" vspace="0" src="images/close.gif" hspace="0" height="14" border="0"><br>
+</td>
+</tr>
+</table>
+</td><td>
+<table cellspacing="15" cellpadding="0" border="0">
+<tr>
+<td>
+
+
+ <font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Goal</font>
+<hr style="color: #0086b2" size="1">
+
+<p>
+<font color="black" face="verdana,helvetica,sanserif">This document tries to give the basic knowledge of Avalon that is
+ necessary to understand Cocoon.</font>
+</p>
+
+<p>
+<font color="black" face="verdana,helvetica,sanserif">People that are trying to understand Avalon in depth, will probably
+ not be much helped by this document. But if you want to understand Cocoon,
+ you have to have a basic grasp of Avalon. </font>
+</p>
+
+<p>
+<font color="black" face="verdana,helvetica,sanserif">The document also contains the basic configuration steps for
+ configuring Avalon components within Cocoon.</font>
+</p>
+
+<p>
+<font color="black" face="verdana,helvetica,sanserif">Much of this document is copied and pasted from original Avalon
+ documentation. However, I hope that the fact that all things relevant for
+ Cocoon are put together in one place, will help you to understand Cocoon
+ faster.</font>
+</p>
+
+<p>
+<font color="black" face="verdana,helvetica,sanserif">For people wishing to learn Avalon in-depth,
+ <a href="http://jakarta.apache.org/avalon/developing/index.html">this is your starting
+ point</a>.</font>
+</p>
+
+
+<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Overview</font>
+<hr style="color: #0086b2" size="1">
+
+<p>
+<font color="black" face="verdana,helvetica,sanserif">For a mission statement of Apache Avalon, please read
+ <a href="http://jakarta.apache.org/avalon/index.html">the Avalon
+ homepage</a>.</font>
+</p>
+
+<p>
+<font color="black" face="verdana,helvetica,sanserif">In short, Avalon tries to take design efforts away from server-side
+ programmers by providing a framework that </font>
+</p>
+
+<blockquote>
+<ul>
+
+<li>
+<font face="verdana, helvetica, sans serif">provides basic working classes;</font>
+</li>
+
+<li>
+<font face="verdana, helvetica, sans serif">provides interfaces to allow different efforts to be integrated
+ more easily.</font>
+</li>
+
+</ul>
+</blockquote>
+
+
+<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">The classes and interfaces</font>
+<hr style="color: #0086b2" size="1">
+
+<p>
+<font color="black" face="verdana,helvetica,sanserif">These classes and interfaces are extensively used by Cocoon:</font>
+</p>
+
+<font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>ComponentManager</b></font>
+
+<p>
+<font color="black" face="verdana,helvetica,sanserif"><code><font face="courier, monospaced">org.apache.avalon.framework.component.ComponentManager</font></code></font>
+</p>
+
+<p>
+<font color="black" face="verdana,helvetica,sanserif">A <code><font face="courier, monospaced">ComponentManager</font></code> selects <code><font face="courier, monospaced">Component</font></code>s
+ based on a role. The contract is that all the <code><font face="courier, monospaced">Component</font></code>s implement
+ the differing roles and there is one <code><font face="courier, monospaced">Component</font></code> per role. If you
+ need to select on of many <code><font face="courier, monospaced">Component</font></code>s that implement the same role,
+ then you need to use a <code><font face="courier, monospaced">ComponentSelector</font></code>. Roles are the full
+ interface name.</font>
+</p>
+
+<p>
+<font color="black" face="verdana,helvetica,sanserif">A role is better understood by the analogy of a play. There are many
+ different roles in a script. Any actor or actress can play any given part and
+ you get the same results (phrases said, movements made, etc.), but the exact
+ nuances of the performance is different.</font>
+</p>
+
+<p>
+<font color="black" face="verdana,helvetica,sanserif">The <code><font face="courier, monospaced">Cocoon</font></code> class implements e.g. the
+ <code><font face="courier, monospaced">ComponentManager</font></code> interface.</font>
+</p>
+
+
+<font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>Composable</b></font>
+
+<p>
+<font color="black" face="verdana,helvetica,sanserif"><code><font face="courier, monospaced">org.apache.avalon.framework.component.Composable</font></code></font>
+</p>
+
+<p>
+<font color="black" face="verdana,helvetica,sanserif">A <code><font face="courier, monospaced">Composable</font></code> is a class that need to connect to software
+ components using a "role" abstraction, thus not depending on particular
+ implementations but on behavioral interfaces. </font>
+</p>
+
+
+<font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>Component</b></font>
+
+<p>
+<font color="black" face="verdana,helvetica,sanserif"><code><font face="courier, monospaced">org.apache.avalon.framework.component.Component</font></code></font>
+</p>
+
+<p>
+<font color="black" face="verdana,helvetica,sanserif">This interface identifies classes that can be used as
+ <code><font face="courier, monospaced">Components</font></code> by a <code><font face="courier, monospaced">Composable</font></code>. </font>
+</p>
+
+<p>
+<font color="black" face="verdana,helvetica,sanserif">A <code><font face="courier, monospaced">Component</font></code> is the basic building block of Avalon. When
+ a class implements this interface, it allows itself to be managed by a
+ <code><font face="courier, monospaced">ComponentManager</font></code> and used by an outside element called a
+ <code><font face="courier, monospaced">Composable</font></code>. The <code><font face="courier, monospaced">Composable</font></code> must know what type of
+ <code><font face="courier, monospaced">Component</font></code> it is accessing, so it will re-cast the
+ <code><font face="courier, monospaced">Component</font></code> into the type it needs. </font>
+</p>
+
+<p>
+<font color="black" face="verdana,helvetica,sanserif"><code><font face="courier, monospaced">Component</font></code>s in Cocoon are e.g. those defined in
+ <code><font face="courier, monospaced">cocoon.xconf</font></code>.</font>
+</p>
+
+
+<font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>Configuration</b></font>
+
+<p>
+<font color="black" face="verdana,helvetica,sanserif"><code><font face="courier, monospaced">org.apache.avalon.framework.configuration.Configuration</font></code></font>
+</p>
+
+<p>
+<font color="black" face="verdana,helvetica,sanserif"><code><font face="courier, monospaced">Configuration</font></code> is a interface encapsulating a
+ configuration node used to retrieve configuration values. This is a "read only"
+ interface preventing applications from modifying their own configurations. The
+ contract surrounding the <code><font face="courier, monospaced">Configuration</font></code> is that once it is created,
+ information never changes. The <code><font face="courier, monospaced">Configuration</font></code> is built by the
+ <code><font face="courier, monospaced">ConfigurationBuilder</font></code>.</font>
+</p>
+
+
+<font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>Configurable</b></font>
+
+<p>
+<font color="black" face="verdana,helvetica,sanserif"><code><font face="courier, monospaced">org.apache.avalon.framework.configuration.Configurable</font></code></font>
+</p>
+
+<p>
+<font color="black" face="verdana,helvetica,sanserif"><code><font face="courier, monospaced">Configurable</font></code> is a interface describing a component which
+ can be configured. This component gets a <code><font face="courier, monospaced">Configuration</font></code>
+ object as input.</font>
+</p>
+
+
+<font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>ConfigurationBuilder</b></font>
+
+<p>
+<font color="black" face="verdana,helvetica,sanserif"><code><font face="courier, monospaced">org.apache.avalon.ConfigurationBuilder</font></code></font>
+</p>
+
+<p>
+<font color="black" face="verdana,helvetica,sanserif">A <code><font face="courier, monospaced">ConfigurationBuilder</font></code> builds
+ <code><font face="courier, monospaced">Configuration</font></code>s.</font>
+</p>
+
+
+
+<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Configuration</font>
+<hr style="color: #0086b2" size="1">
+
+<p>
+<font color="black" face="verdana,helvetica,sanserif">Most available Avalon components are configured in the cocoon.xconf.</font>
+</p>
+
+<font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>Pooling configuration</b></font>
+
+<p>
+<font color="black" face="verdana,helvetica,sanserif">Avalon now incorporates a couple of modifiers for a Component
+ definition that allows you to control the number of Components
+ in a pool, and how quickly it grows. This is especially helpful
+ in Cocoon where the defaults don't always work well.</font>
+</p>
+
+<p>
+<font color="black" face="verdana,helvetica,sanserif">The magic attributes are "pool-min", "pool-max", and "pool-grow".
+ The defaults are:</font>
+</p>
+
+<blockquote>
+<ol>
+
+<li>
+<font face="verdana, helvetica, sans serif">pool-max: 8</font>
+</li>
+
+<li>
+<font face="verdana, helvetica, sans serif">pool-min: 2</font>
+</li>
+
+<li>
+<font face="verdana, helvetica, sans serif">pool-grow: pool-min (2)</font>
+</li>
+
+</ol>
+</blockquote>
+
+<p>
+<font color="black" face="verdana,helvetica,sanserif">What this means is that the pool for the default component initially
+ contains 2 instances, and if demand exceeds that the pool will increase
+ by two components at a time up to 8 instances. Beyond that the pool
+ turns into a factory in that new Component instances are created, but
+ destroyed when they are returned. This is a performance issue--but
+ it does manage the number of instances available at one time.</font>
+</p>
+
+<p>
+<font color="black" face="verdana,helvetica,sanserif">Please note that if
+ not specified, "pool-grow" always matches "pool-min". If not specified
+ "pool-min" always equals "2". If you specify the minimum being higher
+ than the maximum, then the maximum will match the minimum, and the pool
+ will be fully filled on initialization.</font>
+</p>
+
+
+
+
+</td>
+</tr>
+</table>
+</td>
+</tr>
+</table>
+<table width="100%" cellspacing="0" cellpadding="0" border="0">
+<tr>
+<td bgcolor="#0086b2"><img width="1" src="images/dot.gif" height="1"></td>
+</tr>
+<tr>
+<td align="center"><font size="-1" face="arial,helvetica,sanserif" color="#0086b2"><i>Copyright © 1999-2002 The Apache Software Foundation. All Rights Reserved.</i></font></td>
+</tr>
+</table>
+</body>
+</html>
Modified: cocoon/site/site/2.0/developing/datasources.html
URL: http://svn.apache.org/viewvc/cocoon/site/site/2.0/developing/datasources.html?rev=573901&r1=573900&r2=573901&view=diff
==============================================================================
--- cocoon/site/site/2.0/developing/datasources.html (original)
+++ cocoon/site/site/2.0/developing/datasources.html Sat Sep 8 13:17:41 2007
@@ -1,413 +1,413 @@
-<html>
-<head>
-<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title>Using Databases in Apache Cocoon</title>
-<STYLE type="text/css">
-a.menu {
- color: #FFFFFF;
- text-align:left;
- font-size:12px;
- font-family: Verdana, Arial, Helvetica, sans-serif;
- font-weight:plain;
- text-decoration:none;
- padding-left: 14px
-}
-
-A.menu:hover {
- color: #FFCC00
-}
-
-
-.menutitle {
- color: #000000;
- text-align:left;
- font-size:10px;
- font-family: Verdana, Arial, Helvetica, sans-serif;
- font-weight:bold;
- padding-left: 8px
-}
-.menuselected {
- color: #FFCC00;
- text-align:left;
- font-size:12px;
- font-family: Verdana, Arial, Helvetica, sans-serif;
- font-weight:bold;
- padding-left: 14px
-}
-</STYLE>
-</head>
-<body bgcolor="#ffffff" marginheight="4" marginwidth="4" leftmargin="4" topmargin="4" alink="#cc0000" vlink="#0086b2" link="#039acc" text="#000000">
-<table border="0" cellpadding="0" cellspacing="0" width="100%">
-<tr>
-<td align="left" valign="top" rowspan="3" height="60" width="135"><img border="0" vspace="0" hspace="0" src="images/logo.gif" height="60" width="135"></td><td background="images/line.gif" rowspan="1" colSpan="2" align="left" valign="top" height="0" width="100%"></td><td align="left" valign="top" rowspan="3" height="60" width="29"><img border="0" vspace="0" hspace="0" src="images/right.gif" height="60" width="29"></td>
-</tr>
-<tr>
-<td bgcolor="#0086b2" colspan="2" align="right" valign="top" height="35" width="100%"><font color="#ffffff" face="Verdana, Arial, Helvetica, sans-serif" size="5">Using Databases in Apache Cocoon</font></td>
-</tr>
-<tr>
-<td background="images/bottom.gif" colspan="2" width="100%" valign="top" height="20" bgcolor="#0086b2" align="right">
-<table width="288" cellspacing="0" cellpadding="0" border="0">
-<tr>
-<td align="left" valign="top" height="20" width="96"><a target="new" href="http://xml.apache.org/"><img border="0" vspace="0" hspace="0" name="xml" src="images/button-xml-lo.gif" height="20" width="96" alt="http://xml.apache.org/"></a></td><td align="left" valign="top" height="20" width="96"><a target="new" href="http://www.apache.org/"><img border="0" vspace="0" hspace="0" name="asf" src="images/button-asf-lo.gif" height="20" width="96" alt="http://www.apache.org/"></a></td><td align="left" valign="top" height="20" width="96"><a target="new" href="http://www.w3.org/"><img border="0" vspace="0" hspace="0" name="w3c" src="images/button-w3c-lo.gif" height="20" width="96" alt="http://www.w3.org/"></a></td>
-</tr>
-</table>
-</td>
-</tr>
-</table>
-<table width="100%" cellspacing="0" cellpadding="0" border="0">
-<tr width="100%">
-<td align="left" valign="top" width="120">
-<table width="120" cellspacing="0" cellpadding="0" border="0" bgcolor="#a0a0a0">
-<tr>
-<td valign="top" align="left"><img width="120" vspace="0" src="images/join.gif" hspace="0" height="14" border="0"><br>
-</td>
-</tr>
-<tr>
-<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="../index.html">Main</a></td>
-</tr>
-<tr>
-<td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
-<span class="menutitle">Concepts</span></td>
-</tr>
-<tr>
-<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="httprequest.html">Internals</a></td>
-</tr>
-<tr>
-<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="extending.html">Extending</a></td>
-</tr>
-<tr>
-<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="avalon.html">Avalon</a></td>
-</tr>
-<tr>
-<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><span class="menuselected">Using Databases</span></td>
-</tr>
-<tr>
-<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="parent-component-manager.html">Parent CM</a></td>
-</tr>
-<tr>
-<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="deliquick.html">DELI Quick Start</a></td>
-</tr>
-<tr>
-<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="deli.html">DELI</a></td>
-</tr>
-<tr>
-<td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
-<span class="menutitle">Webapps</span></td>
-</tr>
-<tr>
-<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="webapps/index.html">Developing Webapps</a></td>
-</tr>
-<tr>
-<td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
-<span class="menutitle">Java</span></td>
-</tr>
-<tr>
-<td valign="top" background="images/label-background_a.gif" bgcolor="#959595"><a class="menu" target="new" href="../apidocs/index.html">API (Javadoc)</a></td>
-</tr>
-<tr>
-<td align="left" valign="top"><img width="120" vspace="0" src="images/close.gif" hspace="0" height="14" border="0"><br>
-</td>
-</tr>
-</table>
-</td><td>
-<table cellspacing="15" cellpadding="0" border="0">
-<tr>
-<td>
-
-
- <font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">How do I choose my database?</font>
-<hr style="color: #0086b2" size="1">
-
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
- Apache Cocoon is flexible in the way it allows you to make connections to
- a database. There are basically two ways: by redefining all the connection
- parameters in each page you use a database, or using a pooled connection.
- The first method is slow and doesn't scale well. The second method is more
- scalable, and depending on your database will realize true improvements.
- </font>
-</p>
-
-<font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>Installing the Driver</b></font>
-
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
- Independent of how you choose to get and maintain your JDBC connections,
- you have to load the driver so Cocoon can use it (unless you are using
- a J2EE container--more on that later). This is an init parameter in
- your web.xml file. The following snippet will show you how:
- </font>
-</p>
-
-<div align="center">
-<table border="0" cellpadding="0" cellspacing="4">
-<tr>
-<td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
-</tr>
-<tr>
-<td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td bgcolor="#ffffff">
-<pre>
-
-<init-param>
- <param-name>load-class</param-name>
- <param-value>
- <!-- For PostgeSQL Database: -->
- postgresql.Driver
-
- <!-- For Oracle Database: -->
- oracle.jdbc.driver.OracleDriver
- </param-value>
-</init-param>
-
- </pre>
-</td><td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
-</tr>
-<tr>
-<td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
-</tr>
-</table>
-</div>
-
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
- You can place as many Driver classes in this parameter you want. They
- are separated by white space or commas.
- </font>
-</p>
-
-
-<font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>Defining a Data Source</b></font>
-
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
- Cocoon allows you to specify a pooled data source that you can use
- for throughout the Cocoon system. There are two different types of
- data sources: JDBC and J2EE. The difference is in who controls the
- connection. The JDBC data source lets Cocoon handle all the pooling
- logic. The J2EE data source tells Cocoon how to pull the DataSource
- object from a J2EE container (thats Java 2 Enterprise Edition)--the
- major caveat is that Cocoon must be installed as part of a Enterprise
- Application.
- </font>
-</p>
-
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
- The following snippet of cocoon.xconf shows the section where the
- DataSourceComponent is specified. You can have more than one in
- this location. The code will have one connection for the JDBC data
- source, and one connection for the J2EE data source.
- </font>
-</p>
-
-<div align="center">
-<table border="0" cellpadding="0" cellspacing="4">
-<tr>
-<td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
-</tr>
-<tr>
-<td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td bgcolor="#ffffff">
-<pre>
-
- <datasources>
- <jdbc name="MyConnectionName">
-
- <pool-controller min="5" max="10"/>
- <dburl>jdbc:oracle:thin:@localhost:1521:mydatabase</dburl>
- <user>mylogin</user>
- <password>myPassword</password>
- </jdbc>
- <j2ee name="MyJ2eeConnection">
- <dbname>cocoonDB</dbname>
- </j2ee>
- </datasources>
-
- </pre>
-</td><td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
-</tr>
-<tr>
-<td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
-</tr>
-</table>
-</div>
-
-
-<font face="verdana, helvetica, sans serif" size="+1" color="#0086b2">The JDBC Connection Properties</font>
-
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
- The JDBC connection has up to five different properties--but only one
- is absolutely required.
- </font>
-</p>
-
-<blockquote>
-<ul>
-
-<li>
-<font face="verdana, helvetica, sans serif">
- dburl: This is absolutely required. Without it JDBC can't connect
- to the database.
- </font>
-</li>
-
-<li>
-<font face="verdana, helvetica, sans serif">
- user: This is only required if the database admin requires you to
- log in to the database.
- </font>
-</li>
-
-<li>
-<font face="verdana, helvetica, sans serif">
- password: This is only required if the database admin requires a
- password to connect to the database.
- </font>
-</li>
-
-<li>
-<font face="verdana, helvetica, sans serif">
- pool-controller: This has two parameters with defaults. If it is
- not specified, the defaults are used.
- <blockquote>
-<ul>
-
-<li>
-<font face="verdana, helvetica, sans serif">
- min: The minimum number of connections the pool will keep
- available at one time. Defaults to zero (0).
- </font>
-</li>
-
-<li>
-<font face="verdana, helvetica, sans serif">
- max: The maximum number of connections the pool will have
- created at the same time. Defaults to three (3).
- </font>
-</li>
-
-<li>
-<font face="verdana, helvetica, sans serif">
- oradb: If you have an Oracle database, you should add the attribute
- "oradb" and set it to true.
- </font>
-</li>
-
-</ul>
-</blockquote>
-
-</font>
-</li>
-
-<li>
-<font face="verdana, helvetica, sans serif">
- auto-commit: If you need to ensure an autocommit is set to true or
- false, then create the "auto-commit" element.
- </font>
-</li>
-
-</ul>
-</blockquote>
-
-
-<font face="verdana, helvetica, sans serif" size="+1" color="#0086b2">The J2EE Connection Property</font>
-
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
- The J2EE connection has only one property and it is absolutely
- required. Cocoon uses JNDI to look up the DataSource with the
- name you specified in "dbname".
- </font>
-</p>
-
-
-
-<font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>Using the Data Source Component</b></font>
-
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
- No matter how you defined your DataSourceComponent, you access
- it the same way. Because The DataSourceComponent is a Component,
- your class needs to implement the Avalon Composable interface. The
- Avalon Framework will give your class a ComponentManager. At that
- point, it is up to you how and when you pull the DataSourceComponent
- out of the ComponentManager.
- </font>
-</p>
-
-<div align="center">
-<table border="0" cellpadding="0" cellspacing="4">
-<tr>
-<td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
-</tr>
-<tr>
-<td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td bgcolor="#ffffff">
-<pre>
-
-import org.apache.avalon.framework.component.ComponentManager;
-import org.apache.avalon.framework.component.ComponentSelector;
-import org.apache.cocoon.Roles;
-import org.apache.avalon.excalibur.datasource.DataSourceComponent;
-
-import java.sql.Connection;
-
-// .... Skip a lot of lines until we are in the method you use
-// to initialize the DataSourceComponent ....
-
-private DataSourceComponent datasource;
-
-public void compose(ComponentManager manager) {
- ComponentSelector selector =
- (ComponentSelector) manager.lookup(Roles.DB_CONNECTION);
- this.datasource = (DataSourceComponent) selector.select("MyConnectionName");
-}
-
-// .... Skip more lines until we actually need to use the datasource
-
-private void meMethod() {
- Connection myConnection = this.datasource.getConnection();
-
- // .... perform SQL code here
-
- myConnection.close();
-}
-
- </pre>
-</td><td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
-</tr>
-<tr>
-<td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
-</tr>
-</table>
-</div>
-
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
- Notice that once you obtained your connection, you did nothing out of the
- ordinary to return the connection to the pool? This is by design, and a
- result of the JDBC specification. Basically the JDBC specification states
- that if a driver implements pooled connections, then it should not alter
- the way those connections are used. This maintains the portability of
- your code.
- </font>
-</p>
-
-
-
-
-</td>
-</tr>
-</table>
-</td>
-</tr>
-</table>
-<table width="100%" cellspacing="0" cellpadding="0" border="0">
-<tr>
-<td bgcolor="#0086b2"><img width="1" src="images/dot.gif" height="1"></td>
-</tr>
-<tr>
-<td align="center"><font size="-1" face="arial,helvetica,sanserif" color="#0086b2"><i>Copyright © 1999-2002 The Apache Software Foundation. All Rights Reserved.</i></font></td>
-</tr>
-</table>
-</body>
-</html>
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Using Databases in Apache Cocoon</title>
+<STYLE type="text/css">
+a.menu {
+ color: #FFFFFF;
+ text-align:left;
+ font-size:12px;
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-weight:plain;
+ text-decoration:none;
+ padding-left: 14px
+}
+
+A.menu:hover {
+ color: #FFCC00
+}
+
+
+.menutitle {
+ color: #000000;
+ text-align:left;
+ font-size:10px;
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-weight:bold;
+ padding-left: 8px
+}
+.menuselected {
+ color: #FFCC00;
+ text-align:left;
+ font-size:12px;
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-weight:bold;
+ padding-left: 14px
+}
+</STYLE>
+</head>
+<body bgcolor="#ffffff" marginheight="4" marginwidth="4" leftmargin="4" topmargin="4" alink="#cc0000" vlink="#0086b2" link="#039acc" text="#000000">
+<table border="0" cellpadding="0" cellspacing="0" width="100%">
+<tr>
+<td align="left" valign="top" rowspan="3" height="60" width="135"><img border="0" vspace="0" hspace="0" src="images/logo.gif" height="60" width="135"></td><td background="images/line.gif" rowspan="1" colSpan="2" align="left" valign="top" height="0" width="100%"></td><td align="left" valign="top" rowspan="3" height="60" width="29"><img border="0" vspace="0" hspace="0" src="images/right.gif" height="60" width="29"></td>
+</tr>
+<tr>
+<td bgcolor="#0086b2" colspan="2" align="right" valign="top" height="35" width="100%"><font color="#ffffff" face="Verdana, Arial, Helvetica, sans-serif" size="5">Using Databases in Apache Cocoon</font></td>
+</tr>
+<tr>
+<td background="images/bottom.gif" colspan="2" width="100%" valign="top" height="20" bgcolor="#0086b2" align="right">
+<table width="288" cellspacing="0" cellpadding="0" border="0">
+<tr>
+<td align="left" valign="top" height="20" width="96"><a target="new" href="http://xml.apache.org/"><img border="0" vspace="0" hspace="0" name="xml" src="images/button-xml-lo.gif" height="20" width="96" alt="http://xml.apache.org/"></a></td><td align="left" valign="top" height="20" width="96"><a target="new" href="http://www.apache.org/"><img border="0" vspace="0" hspace="0" name="asf" src="images/button-asf-lo.gif" height="20" width="96" alt="http://www.apache.org/"></a></td><td align="left" valign="top" height="20" width="96"><a target="new" href="http://www.w3.org/"><img border="0" vspace="0" hspace="0" name="w3c" src="images/button-w3c-lo.gif" height="20" width="96" alt="http://www.w3.org/"></a></td>
+</tr>
+</table>
+</td>
+</tr>
+</table>
+<table width="100%" cellspacing="0" cellpadding="0" border="0">
+<tr width="100%">
+<td align="left" valign="top" width="120">
+<table width="120" cellspacing="0" cellpadding="0" border="0" bgcolor="#a0a0a0">
+<tr>
+<td valign="top" align="left"><img width="120" vspace="0" src="images/join.gif" hspace="0" height="14" border="0"><br>
+</td>
+</tr>
+<tr>
+<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="../index.html">Main</a></td>
+</tr>
+<tr>
+<td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
+<span class="menutitle">Concepts</span></td>
+</tr>
+<tr>
+<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="httprequest.html">Internals</a></td>
+</tr>
+<tr>
+<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="extending.html">Extending</a></td>
+</tr>
+<tr>
+<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="avalon.html">Avalon</a></td>
+</tr>
+<tr>
+<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><span class="menuselected">Using Databases</span></td>
+</tr>
+<tr>
+<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="parent-component-manager.html">Parent CM</a></td>
+</tr>
+<tr>
+<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="deliquick.html">DELI Quick Start</a></td>
+</tr>
+<tr>
+<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="deli.html">DELI</a></td>
+</tr>
+<tr>
+<td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
+<span class="menutitle">Webapps</span></td>
+</tr>
+<tr>
+<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="webapps/index.html">Developing Webapps</a></td>
+</tr>
+<tr>
+<td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
+<span class="menutitle">Java</span></td>
+</tr>
+<tr>
+<td valign="top" background="images/label-background_a.gif" bgcolor="#959595"><a class="menu" target="new" href="../apidocs/index.html">API (Javadoc)</a></td>
+</tr>
+<tr>
+<td align="left" valign="top"><img width="120" vspace="0" src="images/close.gif" hspace="0" height="14" border="0"><br>
+</td>
+</tr>
+</table>
+</td><td>
+<table cellspacing="15" cellpadding="0" border="0">
+<tr>
+<td>
+
+
+ <font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">How do I choose my database?</font>
+<hr style="color: #0086b2" size="1">
+
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+ Apache Cocoon is flexible in the way it allows you to make connections to
+ a database. There are basically two ways: by redefining all the connection
+ parameters in each page you use a database, or using a pooled connection.
+ The first method is slow and doesn't scale well. The second method is more
+ scalable, and depending on your database will realize true improvements.
+ </font>
+</p>
+
+<font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>Installing the Driver</b></font>
+
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+ Independent of how you choose to get and maintain your JDBC connections,
+ you have to load the driver so Cocoon can use it (unless you are using
+ a J2EE container--more on that later). This is an init parameter in
+ your web.xml file. The following snippet will show you how:
+ </font>
+</p>
+
+<div align="center">
+<table border="0" cellpadding="0" cellspacing="4">
+<tr>
+<td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
+</tr>
+<tr>
+<td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td bgcolor="#ffffff">
+<pre>
+
+<init-param>
+ <param-name>load-class</param-name>
+ <param-value>
+ <!-- For PostgeSQL Database: -->
+ postgresql.Driver
+
+ <!-- For Oracle Database: -->
+ oracle.jdbc.driver.OracleDriver
+ </param-value>
+</init-param>
+
+ </pre>
+</td><td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
+</tr>
+<tr>
+<td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
+</tr>
+</table>
+</div>
+
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+ You can place as many Driver classes in this parameter you want. They
+ are separated by white space or commas.
+ </font>
+</p>
+
+
+<font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>Defining a Data Source</b></font>
+
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+ Cocoon allows you to specify a pooled data source that you can use
+ for throughout the Cocoon system. There are two different types of
+ data sources: JDBC and J2EE. The difference is in who controls the
+ connection. The JDBC data source lets Cocoon handle all the pooling
+ logic. The J2EE data source tells Cocoon how to pull the DataSource
+ object from a J2EE container (thats Java 2 Enterprise Edition)--the
+ major caveat is that Cocoon must be installed as part of a Enterprise
+ Application.
+ </font>
+</p>
+
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+ The following snippet of cocoon.xconf shows the section where the
+ DataSourceComponent is specified. You can have more than one in
+ this location. The code will have one connection for the JDBC data
+ source, and one connection for the J2EE data source.
+ </font>
+</p>
+
+<div align="center">
+<table border="0" cellpadding="0" cellspacing="4">
+<tr>
+<td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
+</tr>
+<tr>
+<td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td bgcolor="#ffffff">
+<pre>
+
+ <datasources>
+ <jdbc name="MyConnectionName">
+
+ <pool-controller min="5" max="10"/>
+ <dburl>jdbc:oracle:thin:@localhost:1521:mydatabase</dburl>
+ <user>mylogin</user>
+ <password>myPassword</password>
+ </jdbc>
+ <j2ee name="MyJ2eeConnection">
+ <dbname>cocoonDB</dbname>
+ </j2ee>
+ </datasources>
+
+ </pre>
+</td><td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
+</tr>
+<tr>
+<td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
+</tr>
+</table>
+</div>
+
+
+<font face="verdana, helvetica, sans serif" size="+1" color="#0086b2">The JDBC Connection Properties</font>
+
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+ The JDBC connection has up to five different properties--but only one
+ is absolutely required.
+ </font>
+</p>
+
+<blockquote>
+<ul>
+
+<li>
+<font face="verdana, helvetica, sans serif">
+ dburl: This is absolutely required. Without it JDBC can't connect
+ to the database.
+ </font>
+</li>
+
+<li>
+<font face="verdana, helvetica, sans serif">
+ user: This is only required if the database admin requires you to
+ log in to the database.
+ </font>
+</li>
+
+<li>
+<font face="verdana, helvetica, sans serif">
+ password: This is only required if the database admin requires a
+ password to connect to the database.
+ </font>
+</li>
+
+<li>
+<font face="verdana, helvetica, sans serif">
+ pool-controller: This has two parameters with defaults. If it is
+ not specified, the defaults are used.
+ <blockquote>
+<ul>
+
+<li>
+<font face="verdana, helvetica, sans serif">
+ min: The minimum number of connections the pool will keep
+ available at one time. Defaults to zero (0).
+ </font>
+</li>
+
+<li>
+<font face="verdana, helvetica, sans serif">
+ max: The maximum number of connections the pool will have
+ created at the same time. Defaults to three (3).
+ </font>
+</li>
+
+<li>
+<font face="verdana, helvetica, sans serif">
+ oradb: If you have an Oracle database, you should add the attribute
+ "oradb" and set it to true.
+ </font>
+</li>
+
+</ul>
+</blockquote>
+
+</font>
+</li>
+
+<li>
+<font face="verdana, helvetica, sans serif">
+ auto-commit: If you need to ensure an autocommit is set to true or
+ false, then create the "auto-commit" element.
+ </font>
+</li>
+
+</ul>
+</blockquote>
+
+
+<font face="verdana, helvetica, sans serif" size="+1" color="#0086b2">The J2EE Connection Property</font>
+
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+ The J2EE connection has only one property and it is absolutely
+ required. Cocoon uses JNDI to look up the DataSource with the
+ name you specified in "dbname".
+ </font>
+</p>
+
+
+
+<font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>Using the Data Source Component</b></font>
+
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+ No matter how you defined your DataSourceComponent, you access
+ it the same way. Because The DataSourceComponent is a Component,
+ your class needs to implement the Avalon Composable interface. The
+ Avalon Framework will give your class a ComponentManager. At that
+ point, it is up to you how and when you pull the DataSourceComponent
+ out of the ComponentManager.
+ </font>
+</p>
+
+<div align="center">
+<table border="0" cellpadding="0" cellspacing="4">
+<tr>
+<td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
+</tr>
+<tr>
+<td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td bgcolor="#ffffff">
+<pre>
+
+import org.apache.avalon.framework.component.ComponentManager;
+import org.apache.avalon.framework.component.ComponentSelector;
+import org.apache.cocoon.Roles;
+import org.apache.avalon.excalibur.datasource.DataSourceComponent;
+
+import java.sql.Connection;
+
+// .... Skip a lot of lines until we are in the method you use
+// to initialize the DataSourceComponent ....
+
+private DataSourceComponent datasource;
+
+public void compose(ComponentManager manager) {
+ ComponentSelector selector =
+ (ComponentSelector) manager.lookup(Roles.DB_CONNECTION);
+ this.datasource = (DataSourceComponent) selector.select("MyConnectionName");
+}
+
+// .... Skip more lines until we actually need to use the datasource
+
+private void meMethod() {
+ Connection myConnection = this.datasource.getConnection();
+
+ // .... perform SQL code here
+
+ myConnection.close();
+}
+
+ </pre>
+</td><td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
+</tr>
+<tr>
+<td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
+</tr>
+</table>
+</div>
+
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+ Notice that once you obtained your connection, you did nothing out of the
+ ordinary to return the connection to the pool? This is by design, and a
+ result of the JDBC specification. Basically the JDBC specification states
+ that if a driver implements pooled connections, then it should not alter
+ the way those connections are used. This maintains the portability of
+ your code.
+ </font>
+</p>
+
+
+
+
+</td>
+</tr>
+</table>
+</td>
+</tr>
+</table>
+<table width="100%" cellspacing="0" cellpadding="0" border="0">
+<tr>
+<td bgcolor="#0086b2"><img width="1" src="images/dot.gif" height="1"></td>
+</tr>
+<tr>
+<td align="center"><font size="-1" face="arial,helvetica,sanserif" color="#0086b2"><i>Copyright © 1999-2002 The Apache Software Foundation. All Rights Reserved.</i></font></td>
+</tr>
+</table>
+</body>
+</html>