cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r554413 [5/17] - in /cayenne/main/trunk/docs/doc/src/main/resources/doc: ./ Documentation/ Documentation/Cayenne Guide/ Documentation/Cayenne Guide/Ant Tasks/ Documentation/Cayenne Guide/Ant Tasks/cdataport/ Documentation/Cayenne Guide/Ant ...
Date Sun, 08 Jul 2007 19:11:53 GMT
Added: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/DataViews/index.html
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne%20Guide/DataViews/index.html?view=auto&rev=554413
==============================================================================
--- cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/DataViews/index.html (added)
+++ cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/DataViews/index.html Sun Jul  8 12:11:31 2007
@@ -0,0 +1,86 @@
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+ 
+     http://www.apache.org/licenses/LICENSE-2.0
+ 
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.
+-->
+<html>
+  <head>
+    <title>Apache Cayenne Documentation - DataViews</title>
+    <style type="text/css">@import "../../../style.css";</style>
+  </head>
+<body>
+  <div class="header">
+    <div style="float: left;"><a href="http://cayenne.apache.org/"><img src="../../../images/logo.gif" align="absmiddle" border="0"></a></div>
+    <span class="logoSpaceLink"><a href="../../../index.html">Cayenne User Documentation</a></span><br />
+    <span class="pagetitle">DataViews</span>
+  </div>
+<div id="cayenne_toc">
+<ul>
+<li><a href="../../../Documentation/Cayenne Guide/Introduction/index.html">Introduction</a></li>
+<li><a href="../../../Documentation/Cayenne Guide/Installation/index.html">Installation</a></li>
+<li><a href="../../../Documentation/Cayenne Guide/Quick Start/index.html">Quick Start</a></li>
+<li><a href="../../../Documentation/Cayenne Guide/Design/index.html">Design</a></li>
+<li><a href="../../../Documentation/Cayenne Guide/DataContext/index.html">DataContext</a></li>
+<li><a href="../../../Documentation/Cayenne Guide/Queries/index.html">Queries</a></li>
+<li><a href="../../../Documentation/Cayenne Guide/DataObjects/index.html">DataObjects</a></li>
+<li><a href="../../../Documentation/Cayenne Guide/Stored Procedures/index.html">Stored Procedures</a></li>
+<li><a href="../../../Documentation/Cayenne Guide/Expressions/index.html">Expressions</a></li>
+<li><a href="../../../Documentation/Cayenne Guide/Lifecycle Callbacks/index.html">Lifecycle Callbacks</a></li>
+<li><a href="../../../Documentation/Cayenne Guide/Performance Tuning/index.html">Performance Tuning</a></li>
+<li><a href="../../../Documentation/Cayenne Guide/Caching and Fresh Data/index.html">Caching and Fresh Data</a></li>
+<li><a href="../../../Documentation/Cayenne Guide/Deployment/index.html">Deployment</a></li>
+<li><a href="../../../Documentation/Cayenne Guide/Ant Tasks/index.html">Ant Tasks</a></li>
+<li><a href="../../../Documentation/Cayenne Guide/Maven2 Plugins/index.html">Maven2 Plugins</a></li>
+<li><a href="../../../Documentation/Cayenne Guide/Customization/index.html">Customization</a></li>
+<li><a href="../../../Documentation/Cayenne Guide/DataViews/index.html">DataViews</a><ul>
+<li><a href="../../../Documentation/Cayenne Guide/DataViews/Swing Applications/index.html">Swing Applications</a></li>
+<li><a href="../../../Documentation/Cayenne Guide/DataViews/DataView Concepts/index.html">DataView Concepts</a></li>
+<li><a href="../../../Documentation/Cayenne Guide/DataViews/DVModeler GUI Tool/index.html">DVModeler GUI Tool</a></li>
+<li><a href="../../../Documentation/Cayenne Guide/DataViews/DataViews in Action/index.html">DataViews in Action</a></li>
+</ul>
+</li>
+</ul>
+</div>
+<div id="ConfluenceContent"><h2><a name="DataViews-DataViews"></a>DataViews</h2>
+<table cellpadding='5' width='85%' cellspacing='8px' class='warningMacro' border="0" align='center'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="../../../images/emoticons/forbidden.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>In the future versions of Cayenne DataViews will be split in a standalone package. Unless we find volunteers, this package won't be supported very well.</td></tr></table>
+
+<p>Cayenne takes care of managing persistence layer for all types of applications - web, rich client, command line, etc. With DataViews Cayenne extends into the area of integrating such persistent layer with Swing GUI.</p>
+
+<p>DataViews define various presentation parameters of the DataObjects in an XML format. Just like DataMaps are edited using CayenneModeler, DataViews are edited with <a href="../../../Documentation/Cayenne Guide/DataViews/DVModeler GUI Tool/index.html" title="DVModeler GUI Tool">DVModeler GUI tool</a>. Runtime DataView classes are a part of the main Cayenne JAR file.</p>
+
+<p>For manual editing of the DataViews, DataView DTD is included in the distribution. It is pretty small and the names are self-explanatory once you become familiar with the Data View structure described in this chapter.</p>
+
+<table cellpadding='5' width='85%' cellspacing='8px' class='infoMacro' border="0" align='center'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="../../../images/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b class="strong">JDOM Note</b><br />DataViews use JDOM, so in addition to the jar files required by a regular Cayenne application, DataViews-based application must have access to JDOM jars. JDOM can be downloaded from <span class="nobr"><a href="http://www.jdom.org/" title="Visit page outside Confluence" rel="nofollow">http://www.jdom.org/<sup><img class="rendericon" src="../../../images/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span>.</td></tr></table>
+
+<h3><a name="DataViews-Sections"></a>Sections</h3>
+
+<ol>
+	<li><a href="../../../Documentation/Cayenne Guide/DataViews/Swing Applications/index.html" title="Swing Applications">Swing Applications</a></li>
+	<li><a href="../../../Documentation/Cayenne Guide/DataViews/DataView Concepts/index.html" title="DataView Concepts">DataView Concepts</a></li>
+	<li><a href="../../../Documentation/Cayenne Guide/DataViews/DVModeler GUI Tool/index.html" title="DVModeler GUI Tool">DVModeler GUI Tool</a></li>
+	<li><a href="../../../Documentation/Cayenne Guide/DataViews/DataViews in Action/index.html" title="DataViews in Action">DataViews in Action</a></li>
+</ol>
+</div>
+</div>
+  <div class="clearer">.</div>
+  <div style="height: 12px; background-image: url('../../../images/border_bottom.gif'); background-repeat: repeat-x;"></div>
+
+  <div class="smalltext copyright">
+    Copyright &copy;2001-2007 Apache Software Foundation
+  </div>
+
+</body>
+</html>

Propchange: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/DataViews/index.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/Configuring Logging/index.html
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne%20Guide/Deployment/Configuring%20Logging/index.html?view=auto&rev=554413
==============================================================================
--- cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/Configuring Logging/index.html (added)
+++ cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/Configuring Logging/index.html Sun Jul  8 12:11:31 2007
@@ -0,0 +1,89 @@
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+ 
+     http://www.apache.org/licenses/LICENSE-2.0
+ 
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.
+-->
+<html>
+  <head>
+    <title>Apache Cayenne Documentation - Configuring Logging</title>
+    <style type="text/css">@import "../../../../style.css";</style>
+  </head>
+<body>
+  <div class="header">
+    <div style="float: left;"><a href="http://cayenne.apache.org/"><img src="../../../../images/logo.gif" align="absmiddle" border="0"></a></div>
+    <span class="logoSpaceLink"><a href="../../../../index.html">Cayenne User Documentation</a></span><br />
+    <span class="pagetitle">Configuring Logging</span>
+  </div>
+<div id="cayenne_toc">
+<ul>
+<li><a href="../../../../Documentation/Cayenne Guide/Introduction/index.html">Introduction</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Installation/index.html">Installation</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Quick Start/index.html">Quick Start</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Design/index.html">Design</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/DataContext/index.html">DataContext</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Queries/index.html">Queries</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/DataObjects/index.html">DataObjects</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Stored Procedures/index.html">Stored Procedures</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Expressions/index.html">Expressions</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Lifecycle Callbacks/index.html">Lifecycle Callbacks</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Performance Tuning/index.html">Performance Tuning</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Caching and Fresh Data/index.html">Caching and Fresh Data</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/index.html">Deployment</a><ul>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/Standalone Applications/index.html">Standalone Applications</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/Web Applications/index.html">Web Applications</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/Customizing Configuration/index.html">Customizing Configuration</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/DBCPDataSourceFactory/index.html">DBCPDataSourceFactory</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/Using JNDI/index.html">Using JNDI</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/Deployment with Ant/index.html">Deployment with Ant</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/Configuring Logging/index.html">Configuring Logging</a><ul>
+</ul>
+</li>
+</ul>
+</li>
+<li><a href="../../../../Documentation/Cayenne Guide/Ant Tasks/index.html">Ant Tasks</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Maven2 Plugins/index.html">Maven2 Plugins</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Customization/index.html">Customization</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/DataViews/index.html">DataViews</a></li>
+</ul>
+</div>
+<div id="ConfluenceContent"><p>Cayenne logging is based on Jakarta Apache <span class="nobr"><a href="http://jakarta.apache.org/commons/logging/" title="Visit page outside Confluence" rel="nofollow">commons-logging package<sup><img class="rendericon" src="../../../../images/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span>. Commons-logging allows users to choose their own logging provider, such as Log4J or <tt>java.util.logging</tt>. Below is an example of a <span class="nobr"><a href="http://logging.apache.org/log4j/docs/" title="Visit page outside Confluence" rel="nofollow">Log4J-based<sup><img class="rendericon" src="../../../../images/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span> configuration of the most important Cayenne logger that turns on and off SQL tracing:</p>
+
+<div class="preformatted"><div class="preformattedContent">
+<pre># Turn SQL tracing on
+log4j.logger.org.apache.cayenne.access.QueryLogger = INFO
+
+# Turn SQL tracing off, e.g. to increase performance
+log4j.logger.org.apache.cayenne.access.QueryLogger = WARN
+</pre>
+</div></div>
+
+<p>Another example shows how to trace Cayenne configuration loading. Cayenne XML files may contain errors, or maybe missing or inaccessible by the application; there maybe lots of other reasons why Cayenne fails to startup, from missing JDBC drivers to misspelled database URLs. This logger helps you to debug it:</p>
+
+<div class="preformatted"><div class="preformattedContent">
+<pre>log4j.logger.org.apache.cayenne.conf = DEBUG
+log4j.logger.org.apache.cayenne.util = DEBUG
+</pre>
+</div></div></div>
+</div>
+  <div class="clearer">.</div>
+  <div style="height: 12px; background-image: url('../../../../images/border_bottom.gif'); background-repeat: repeat-x;"></div>
+
+  <div class="smalltext copyright">
+    Copyright &copy;2001-2007 Apache Software Foundation
+  </div>
+
+</body>
+</html>

Propchange: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/Configuring Logging/index.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/Customizing Configuration/index.html
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne%20Guide/Deployment/Customizing%20Configuration/index.html?view=auto&rev=554413
==============================================================================
--- cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/Customizing Configuration/index.html (added)
+++ cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/Customizing Configuration/index.html Sun Jul  8 12:11:31 2007
@@ -0,0 +1,122 @@
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+ 
+     http://www.apache.org/licenses/LICENSE-2.0
+ 
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.
+-->
+<html>
+  <head>
+    <title>Apache Cayenne Documentation - Customizing Configuration</title>
+    <style type="text/css">@import "../../../../style.css";</style>
+  </head>
+<body>
+  <div class="header">
+    <div style="float: left;"><a href="http://cayenne.apache.org/"><img src="../../../../images/logo.gif" align="absmiddle" border="0"></a></div>
+    <span class="logoSpaceLink"><a href="../../../../index.html">Cayenne User Documentation</a></span><br />
+    <span class="pagetitle">Customizing Configuration</span>
+  </div>
+<div id="cayenne_toc">
+<ul>
+<li><a href="../../../../Documentation/Cayenne Guide/Introduction/index.html">Introduction</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Installation/index.html">Installation</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Quick Start/index.html">Quick Start</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Design/index.html">Design</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/DataContext/index.html">DataContext</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Queries/index.html">Queries</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/DataObjects/index.html">DataObjects</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Stored Procedures/index.html">Stored Procedures</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Expressions/index.html">Expressions</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Lifecycle Callbacks/index.html">Lifecycle Callbacks</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Performance Tuning/index.html">Performance Tuning</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Caching and Fresh Data/index.html">Caching and Fresh Data</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/index.html">Deployment</a><ul>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/Standalone Applications/index.html">Standalone Applications</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/Web Applications/index.html">Web Applications</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/Customizing Configuration/index.html">Customizing Configuration</a><ul>
+</ul>
+</li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/DBCPDataSourceFactory/index.html">DBCPDataSourceFactory</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/Using JNDI/index.html">Using JNDI</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/Deployment with Ant/index.html">Deployment with Ant</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/Configuring Logging/index.html">Configuring Logging</a></li>
+</ul>
+</li>
+<li><a href="../../../../Documentation/Cayenne Guide/Ant Tasks/index.html">Ant Tasks</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Maven2 Plugins/index.html">Maven2 Plugins</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Customization/index.html">Customization</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/DataViews/index.html">DataViews</a></li>
+</ul>
+</div>
+<div id="ConfluenceContent"><p>A user can create her own subclass of Configuration and use it instead of the classes provided by Cayenne. Custom subclasses are usually created to load configuration files from non-standard locations, to automatically configure Cayenne during certain events that happen in deployment containers, etc. Cayenne provides a few implementations of Configuration discussed later in this chapter.</p>
+
+<p>To ensure that Cayenne uses the correct Configuration class, it must be initialized properly before any calls to Configuration are made:</p>
+<div class="code"><div class="codeContent">
+<pre class="code-java"><span class="code-keyword">import</span> org.apache.cayenne.conf.Configuration
+...
+<span class="code-object">Class</span> myConfigSubclass = my.<span class="code-keyword">package</span>.ConfigSubclass.class;
+Configuration.initializeSharedConfiguration(myConfigSubclass);</pre>
+</div></div>
+<p>After this code is executed, any subsequent calls to <tt>Configuration.getSharedConfiguration()</tt> will return an instance of the custom class instead of <tt>DefaultConfiguration</tt>.</p>
+
+<p>Another useful feature is the customization of the resource lookup strategy implemented by the existing classes. Currently, both <tt>DefaultConfiguration</tt> and <tt>FileConfiguration</tt> offer the possibility to add additional paths which will be searched for resources.</p>
+
+<h3><a name="CustomizingConfiguration-DefaultConfiguration"></a>DefaultConfiguration</h3>
+
+<p><tt>DefaultConfiguration</tt> uses the application's class path for locating configuration files; this works for both "expanded" class paths and JAR files. "Out of the box" only resources on the top level of the class path are found; very often it is convenient to have a subdirectory ('package') with configuration files. There are two ways to make Configuration find these files:</p>
+<div class="code"><div class="codeContent">
+<pre class="code-java"><span class="code-keyword">import</span> org.apache.cayenne.conf.DefaultConfiguration;
+...
+DefaultConfiguration conf = <span class="code-keyword">new</span> DefaultConfiguration();			
+conf.addClassPath(<span class="code-quote">"my/<span class="code-keyword">package</span>/conf"</span>);
+Configuration.initializeSharedConfiguration(conf);</pre>
+</div></div>
+<p>Alternatively you can place an empty subclass of DefaultConfiguration into your package and use that class directly:</p>
+<div class="code"><div class="codeContent">
+<pre class="code-java"><span class="code-keyword">import</span> my.<span class="code-keyword">package</span>.conf.MyPackageConfiguration;
+...
+Configuration.initializeSharedConfiguration(<span class="code-keyword">new</span> MyPackageConfiguration());</pre>
+</div></div>
+
+<h3><a name="CustomizingConfiguration-FileConfiguration"></a>FileConfiguration</h3>
+
+<p><tt>FileConfiguration</tt> uses the regular file system to load its files, and works very silimar to <tt>DefaultConfiguration</tt>:</p>
+<div class="code"><div class="codeContent">
+<pre class="code-java"><span class="code-keyword">import</span> org.apache.cayenne.conf.FileConfiguration;
+...
+<span class="code-object">String</span> fileName = <span class="code-quote">"/some/path/to/my-cayenne.xml"</span>;
+FileConfiguration conf = <span class="code-keyword">new</span> FileConfiguration(<span class="code-keyword">new</span> File(fileName));
+Configuration.initializeSharedConfiguration(conf);</pre>
+</div></div>
+<p>The fileName argument can be absolute or relative to the application's working directory, and is checked for accessibility. A more flexible lookup can be done by using the name without any path and adding search paths:</p>
+<div class="code"><div class="codeContent">
+<pre class="code-java"><span class="code-keyword">import</span> org.apache.cayenne.conf.FileConfiguration;
+...
+FileConfiguration conf = <span class="code-keyword">new</span> FileConfiguration(<span class="code-quote">"my-cayenne.xml"</span>);
+conf.addFilesystemPath(<span class="code-quote">"a/relative/path"</span>);
+conf.addFilesystemPath(<span class="code-quote">"/another/absolute/path"</span>);
+conf.addFilesystemPath(<span class="code-keyword">new</span> File(<span class="code-quote">"/some/path/that/must/exist/"</span>));
+Configuration.initializeSharedConfiguration(conf);</pre>
+</div></div>
+<p>The difference between the String and File arguments is that the latter are checked for existence. Both variants can be absolute or relative, and are evaluated in the order in which they are added to the Configuration.</p></div>
+</div>
+  <div class="clearer">.</div>
+  <div style="height: 12px; background-image: url('../../../../images/border_bottom.gif'); background-repeat: repeat-x;"></div>
+
+  <div class="smalltext copyright">
+    Copyright &copy;2001-2007 Apache Software Foundation
+  </div>
+
+</body>
+</html>

Propchange: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/Customizing Configuration/index.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/DBCPDataSourceFactory/dbcp-step1.jpg
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne%20Guide/Deployment/DBCPDataSourceFactory/dbcp-step1.jpg?view=auto&rev=554413
==============================================================================
Binary file - no diff available.

Propchange: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/DBCPDataSourceFactory/dbcp-step1.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/DBCPDataSourceFactory/dbcp-step2.jpg
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne%20Guide/Deployment/DBCPDataSourceFactory/dbcp-step2.jpg?view=auto&rev=554413
==============================================================================
Binary file - no diff available.

Propchange: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/DBCPDataSourceFactory/dbcp-step2.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/DBCPDataSourceFactory/index.html
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne%20Guide/Deployment/DBCPDataSourceFactory/index.html?view=auto&rev=554413
==============================================================================
--- cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/DBCPDataSourceFactory/index.html (added)
+++ cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/DBCPDataSourceFactory/index.html Sun Jul  8 12:11:31 2007
@@ -0,0 +1,254 @@
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+ 
+     http://www.apache.org/licenses/LICENSE-2.0
+ 
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.
+-->
+<html>
+  <head>
+    <title>Apache Cayenne Documentation - DBCPDataSourceFactory</title>
+    <style type="text/css">@import "../../../../style.css";</style>
+  </head>
+<body>
+  <div class="header">
+    <div style="float: left;"><a href="http://cayenne.apache.org/"><img src="../../../../images/logo.gif" align="absmiddle" border="0"></a></div>
+    <span class="logoSpaceLink"><a href="../../../../index.html">Cayenne User Documentation</a></span><br />
+    <span class="pagetitle">DBCPDataSourceFactory</span>
+  </div>
+<div id="cayenne_toc">
+<ul>
+<li><a href="../../../../Documentation/Cayenne Guide/Introduction/index.html">Introduction</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Installation/index.html">Installation</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Quick Start/index.html">Quick Start</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Design/index.html">Design</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/DataContext/index.html">DataContext</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Queries/index.html">Queries</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/DataObjects/index.html">DataObjects</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Stored Procedures/index.html">Stored Procedures</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Expressions/index.html">Expressions</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Lifecycle Callbacks/index.html">Lifecycle Callbacks</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Performance Tuning/index.html">Performance Tuning</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Caching and Fresh Data/index.html">Caching and Fresh Data</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/index.html">Deployment</a><ul>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/Standalone Applications/index.html">Standalone Applications</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/Web Applications/index.html">Web Applications</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/Customizing Configuration/index.html">Customizing Configuration</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/DBCPDataSourceFactory/index.html">DBCPDataSourceFactory</a><ul>
+</ul>
+</li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/Using JNDI/index.html">Using JNDI</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/Deployment with Ant/index.html">Deployment with Ant</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/Configuring Logging/index.html">Configuring Logging</a></li>
+</ul>
+</li>
+<li><a href="../../../../Documentation/Cayenne Guide/Ant Tasks/index.html">Ant Tasks</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Maven2 Plugins/index.html">Maven2 Plugins</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Customization/index.html">Customization</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/DataViews/index.html">DataViews</a></li>
+</ul>
+</div>
+<div id="ConfluenceContent"><p>As an alternative to a simple and easy-to-use DataSource bundled with Cayenne, it is possible to configure a more feature-rich DataSource based on Apache Jakarta <span class="nobr"><a href="http://jakarta.apache.org/commons/dbcp" title="Visit page outside Confluence" rel="nofollow">commons-dbcp<sup><img class="rendericon" src="../../../../images/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span>. To enable commons-dbcp pool, select <tt>DBCPDataSourceFactory</tt> in the Modeler for a DataNode:</p>
+
+<p><img src="dbcp-step1.jpg" align="absmiddle" border="0" /></p>
+
+<p>Configuration is done in a properties file that has to be edited in a text editor outside CayenneModeler. The name of this file is specified in the Modeler (with path relative to cayenne.xml location):</p>
+
+<p><img src="dbcp-step2.jpg" align="absmiddle" border="0" /></p>
+
+<p>Here is an example of such properties file contents:</p>
+
+<div class="code"><div class="codeHeader"><b>sample-dbcp.properties</b></div><div class="codeContent">
+<pre class="code-java">cayenne.dbcp.driverClassName=com.mysql.jdbc.Driver
+cayenne.dbcp.url=jdbc:mysql:<span class="code-comment">//localhost/cayenne
+</span>cayenne.dbcp.username=john
+cayenne.dbcp.password=secret
+cayenne.dbcp.maxActive=20
+cayenne.dbcp.minIdle=5
+cayenne.dbcp.maxIdle=8
+cayenne.dbcp.maxWait=10000</pre>
+</div></div>
+
+<h2><a name="DBCPDataSourceFactory-SupportedProperties"></a>Supported Properties</h2>
+
+<p>Below is a full list of supported properties, that fall into three categories - DataSource properties, connection pool properties and prepared statement pool properties. Only DataSource properties are required.</p>
+
+<h3><a name="DBCPDataSourceFactory-DataSourceProperties"></a>DataSource Properties</h3>
+
+<table class='confluenceTable'><tbody>
+<tr>
+<th class='confluenceTh'>Property</th>
+<th class='confluenceTh'>Description</th>
+</tr>
+<tr>
+<td class='confluenceTd'>cayenne.dbcp.driverClassName</td>
+<td class='confluenceTd'>JDBC driver class</td>
+</tr>
+<tr>
+<td class='confluenceTd'>cayenne.dbcp.url</td>
+<td class='confluenceTd'>Database JDBC URL</td>
+</tr>
+<tr>
+<td class='confluenceTd'>cayenne.dbcp.username</td>
+<td class='confluenceTd'>Database login user name</td>
+</tr>
+<tr>
+<td class='confluenceTd'>cayenne.dbcp.password</td>
+<td class='confluenceTd'>Database login password</td>
+</tr>
+</tbody></table>
+
+<h3><a name="DBCPDataSourceFactory-ConnectionPoolProperties"></a>Connection Pool Properties</h3>
+
+<table class='confluenceTable'><tbody>
+<tr>
+<th class='confluenceTh'>Property</th>
+<th class='confluenceTh'>Description</th>
+</tr>
+<tr>
+<td class='confluenceTd'>cayenne.dbcp.maxActive</td>
+<td class='confluenceTd'>Maximum number of active connections in the pool</td>
+</tr>
+<tr>
+<td class='confluenceTd'>cayenne.dbcp.minIdle</td>
+<td class='confluenceTd'>Minimum number of idle connections to keep in the pool</td>
+</tr>
+<tr>
+<td class='confluenceTd'>cayenne.dbcp.maxIdle</td>
+<td class='confluenceTd'>Maximum number of idle connections to keep in the pool</td>
+</tr>
+<tr>
+<td class='confluenceTd'>cayenne.dbcp.maxWait</td>
+<td class='confluenceTd'>A maximum time in milliseconds a caller should wait for a connection to be returned from the pool. -1 for indefinite.</td>
+</tr>
+<tr>
+<td class='confluenceTd'>cayenne.dbcp.validationQuery</td>
+<td class='confluenceTd'>A SQL query used to validate a connection, before returning it to the user. Must return at least one row. E.g. <tt>"select 1 from dual"</tt></td>
+</tr>
+<tr>
+<td class='confluenceTd'>cayenne.dbcp.testOnBorrow</td>
+<td class='confluenceTd'>A boolean specifying whether connection should be validated before being returned <b>from</b> the pool to the caller.</td>
+</tr>
+<tr>
+<td class='confluenceTd'>cayenne.dbcp.testOnReturn</td>
+<td class='confluenceTd'>A boolean specifying whether connection should be validated before being returned back <b>to</b> the pool.</td>
+</tr>
+<tr>
+<td class='confluenceTd'>cayenne.dbcp.testWhileIdle</td>
+<td class='confluenceTd'>A boolean specifying whether connection should be validated while it is idle.</td>
+</tr>
+<tr>
+<td class='confluenceTd'>cayenne.dbcp.timeBetweenEvictionRunsMillis</td>
+<td class='confluenceTd'>A number of milliseconds an eviction thread should sleep between the runs.</td>
+</tr>
+<tr>
+<td class='confluenceTd'>cayenne.dbcp.numTestsPerEvictionRun</td>
+<td class='confluenceTd'>A number of objects that an idle objects evictor should inspect on each run</td>
+</tr>
+<tr>
+<td class='confluenceTd'>cayenne.dbcp.minEvictableIdleTimeMillis</td>
+<td class='confluenceTd'>Minimum time an object should sit in the pool, before it can be considered for eviction.</td>
+</tr>
+<tr>
+<td class='confluenceTd'>cayenne.dbcp.whenExhaustedAction</td>
+<td class='confluenceTd'>Specifies a pool behavior when the pool is exhausted and more connections are requested. Possible values are strings that follow the constant names defined in <tt>org.apache.commons.pool.impl.GenericObjectPool}: {{WHEN_EXHAUSTED_BLOCK</tt>, <tt>WHEN_EXHAUSTED_GROW</tt>, <tt>WHEN_EXHAUSTED_FAIL</tt>. If ommitted, <tt>WHEN_EXHAUSTED_BLOCK</tt> is assumed.</td>
+</tr>
+<tr>
+<td class='confluenceTd'>caynne.dbcp.defaultAutoCommit</td>
+<td class='confluenceTd'>Auto-commit policy for connections returned from the pool</td>
+</tr>
+<tr>
+<td class='confluenceTd'>cayenne.dbcp.defaultReadOnly</td>
+<td class='confluenceTd'>Read-only policy for connections returned from the pool</td>
+</tr>
+<tr>
+<td class='confluenceTd'>cayenne.dbcp.defaultTransactionIsolation</td>
+<td class='confluenceTd'>Specifies transaction isolation for connections returned from the pool. Possible values are strings that follow the constant names defined in the <tt>java.sql.Connection</tt> interface: <tt>TRANSACTION_NONE</tt>, <tt>TRANSACTION_READ_COMMITTED</tt>, <tt>TRANSACTION_READ_UNCOMMITTED</tt>, <tt>TRANSACTION_REPEATABLE_READ</tt>, <tt>TRANSACTION_SERIALIZABLE</tt></td>
+</tr>
+<tr>
+<td class='confluenceTd'>cayenne.dbcp.accessToUnderlyingConnectionAllowed</td>
+<td class='confluenceTd'>If set to true the application will be able to get access to the actual connection object which is normally wrapped by a poolable connections</td>
+</tr>
+<tr>
+<td class='confluenceTd'>cayenne.dbcp.defaultCatalog</td>
+<td class='confluenceTd'>Default catalog of connections created by the pool</td>
+</tr>
+</tbody></table>
+
+<h3><a name="DBCPDataSourceFactory-PreparedStatementPoolProperties"></a>PreparedStatement Pool Properties</h3>
+
+<table class='confluenceTable'><tbody>
+<tr>
+<th class='confluenceTh'>Property</th>
+<th class='confluenceTh'>Description</th>
+</tr>
+<tr>
+<td class='confluenceTd'>cayenne.dbcp.poolPreparedStatements</td>
+<td class='confluenceTd'>Specifies whether PreparedStatements should be pooled</td>
+</tr>
+<tr>
+<td class='confluenceTd'>cayenne.dbcp.ps.maxActive</td>
+<td class='confluenceTd'>Specifies the maximum number of PreparedStatements that can be borrowed from the pool at one time</td>
+</tr>
+<tr>
+<td class='confluenceTd'>cayenne.dbcp.ps.maxIdle</td>
+<td class='confluenceTd'>Maximum number of idle PreparedStatements in the pool</td>
+</tr>
+<tr>
+<td class='confluenceTd'>cayenne.dbcp.ps.maxTotal</td>
+<td class='confluenceTd'>Maximum number of PreparedStatements that can exist in the pool at one time</td>
+</tr>
+<tr>
+<td class='confluenceTd'>cayenne.dbcp.ps.maxWait</td>
+<td class='confluenceTd'>A maximum time in milliseconds a caller should wait for a PreparedStatement to be returned from the pool. -1 for indefinite.</td>
+</tr>
+<tr>
+<td class='confluenceTd'>cayenne.dbcp.ps.minEvictableIdleTimeMillis</td>
+<td class='confluenceTd'>Number of milliseconds a PreparedStatement can sit idle in the pool before it is elegible for eviction</td>
+</tr>
+<tr>
+<td class='confluenceTd'>cayenne.dbcp.ps.numTestsPerEvictionRun</td>
+<td class='confluenceTd'>Number of idle PreparedStatements that should be examined per eviction run</td>
+</tr>
+<tr>
+<td class='confluenceTd'>cayenne.dbcp.ps.testOnBorrow</td>
+<td class='confluenceTd'>Specifies whether a PreparedStatement should be validated before being borrowed from this pool</td>
+</tr>
+<tr>
+<td class='confluenceTd'>cayenne.dbcp.ps.testOnReturn</td>
+<td class='confluenceTd'>Specifies whether a PreparedStatement should be validated before being returne to this pool</td>
+</tr>
+<tr>
+<td class='confluenceTd'>cayenne.dbcp.ps.testWhileIdle</td>
+<td class='confluenceTd'>Specifies whether PreparedStatements should be validated in the idle eviction thread</td>
+</tr>
+<tr>
+<td class='confluenceTd'>cayenne.dbcp.ps.timeBetweenEvictionRunsMillis</td>
+<td class='confluenceTd'>Specifies the time between the runs of the eviction thread</td>
+</tr>
+<tr>
+<td class='confluenceTd'> cayenne.dbcp.ps.whenExhaustedAction</td>
+<td class='confluenceTd'>Specifies a pool behavior when the pool is exhausted and more PreparedStatements are requested. Possible values are strings that follow the constant names defined in <tt>org.apache.commons.pool.impl.GenericObjectPool}: {{WHEN_EXHAUSTED_BLOCK</tt>, <tt>WHEN_EXHAUSTED_GROW</tt>, <tt>WHEN_EXHAUSTED_FAIL</tt>. If ommitted, <tt>WHEN_EXHAUSTED_BLOCK</tt> is assumed.</td>
+</tr>
+</tbody></table></div>
+</div>
+  <div class="clearer">.</div>
+  <div style="height: 12px; background-image: url('../../../../images/border_bottom.gif'); background-repeat: repeat-x;"></div>
+
+  <div class="smalltext copyright">
+    Copyright &copy;2001-2007 Apache Software Foundation
+  </div>
+
+</body>
+</html>

Propchange: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/DBCPDataSourceFactory/index.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/Deployment with Ant/index.html
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne%20Guide/Deployment/Deployment%20with%20Ant/index.html?view=auto&rev=554413
==============================================================================
--- cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/Deployment with Ant/index.html (added)
+++ cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/Deployment with Ant/index.html Sun Jul  8 12:11:31 2007
@@ -0,0 +1,81 @@
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+ 
+     http://www.apache.org/licenses/LICENSE-2.0
+ 
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.
+-->
+<html>
+  <head>
+    <title>Apache Cayenne Documentation - Deployment with Ant</title>
+    <style type="text/css">@import "../../../../style.css";</style>
+  </head>
+<body>
+  <div class="header">
+    <div style="float: left;"><a href="http://cayenne.apache.org/"><img src="../../../../images/logo.gif" align="absmiddle" border="0"></a></div>
+    <span class="logoSpaceLink"><a href="../../../../index.html">Cayenne User Documentation</a></span><br />
+    <span class="pagetitle">Deployment with Ant</span>
+  </div>
+<div id="cayenne_toc">
+<ul>
+<li><a href="../../../../Documentation/Cayenne Guide/Introduction/index.html">Introduction</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Installation/index.html">Installation</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Quick Start/index.html">Quick Start</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Design/index.html">Design</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/DataContext/index.html">DataContext</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Queries/index.html">Queries</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/DataObjects/index.html">DataObjects</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Stored Procedures/index.html">Stored Procedures</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Expressions/index.html">Expressions</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Lifecycle Callbacks/index.html">Lifecycle Callbacks</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Performance Tuning/index.html">Performance Tuning</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Caching and Fresh Data/index.html">Caching and Fresh Data</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/index.html">Deployment</a><ul>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/Standalone Applications/index.html">Standalone Applications</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/Web Applications/index.html">Web Applications</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/Customizing Configuration/index.html">Customizing Configuration</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/DBCPDataSourceFactory/index.html">DBCPDataSourceFactory</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/Using JNDI/index.html">Using JNDI</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/Deployment with Ant/index.html">Deployment with Ant</a><ul>
+</ul>
+</li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/Configuring Logging/index.html">Configuring Logging</a></li>
+</ul>
+</li>
+<li><a href="../../../../Documentation/Cayenne Guide/Ant Tasks/index.html">Ant Tasks</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Maven2 Plugins/index.html">Maven2 Plugins</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Customization/index.html">Customization</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/DataViews/index.html">DataViews</a></li>
+</ul>
+</div>
+<div id="ConfluenceContent">
+<p>There is a number of cases when it is highly desirable to automate changing of Cayenne configuration files, including cayenne.xml and driver information files:</p>
+
+<ul>
+	<li>Changing connection information when porting an application from one environment to another: Deployment environment uses different information for the database connections from what was used in development.</li>
+	<li>Deployment of Cayenne libraries: Third party Cayenne libraries may contain DataMaps and business classes, but they normally do not have cayenne.xml file, since ultimate deployment configuration is unknown when the library is created.</li>
+</ul>
+
+
+<p>Cayenne provides an Ant task called cdeploy that takes care of such things. More information on cdeploy is available <a href="../../../../Documentation/Cayenne Guide/Ant Tasks/cdeploy/index.html" title="cdeploy">here</a>.</p></div>
+</div>
+  <div class="clearer">.</div>
+  <div style="height: 12px; background-image: url('../../../../images/border_bottom.gif'); background-repeat: repeat-x;"></div>
+
+  <div class="smalltext copyright">
+    Copyright &copy;2001-2007 Apache Software Foundation
+  </div>
+
+</body>
+</html>

Propchange: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/Deployment with Ant/index.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/Standalone Applications/index.html
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne%20Guide/Deployment/Standalone%20Applications/index.html?view=auto&rev=554413
==============================================================================
--- cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/Standalone Applications/index.html (added)
+++ cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/Standalone Applications/index.html Sun Jul  8 12:11:31 2007
@@ -0,0 +1,103 @@
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+ 
+     http://www.apache.org/licenses/LICENSE-2.0
+ 
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.
+-->
+<html>
+  <head>
+    <title>Apache Cayenne Documentation - Standalone Applications</title>
+    <style type="text/css">@import "../../../../style.css";</style>
+  </head>
+<body>
+  <div class="header">
+    <div style="float: left;"><a href="http://cayenne.apache.org/"><img src="../../../../images/logo.gif" align="absmiddle" border="0"></a></div>
+    <span class="logoSpaceLink"><a href="../../../../index.html">Cayenne User Documentation</a></span><br />
+    <span class="pagetitle">Standalone Applications</span>
+  </div>
+<div id="cayenne_toc">
+<ul>
+<li><a href="../../../../Documentation/Cayenne Guide/Introduction/index.html">Introduction</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Installation/index.html">Installation</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Quick Start/index.html">Quick Start</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Design/index.html">Design</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/DataContext/index.html">DataContext</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Queries/index.html">Queries</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/DataObjects/index.html">DataObjects</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Stored Procedures/index.html">Stored Procedures</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Expressions/index.html">Expressions</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Lifecycle Callbacks/index.html">Lifecycle Callbacks</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Performance Tuning/index.html">Performance Tuning</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Caching and Fresh Data/index.html">Caching and Fresh Data</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/index.html">Deployment</a><ul>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/Standalone Applications/index.html">Standalone Applications</a><ul>
+</ul>
+</li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/Web Applications/index.html">Web Applications</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/Customizing Configuration/index.html">Customizing Configuration</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/DBCPDataSourceFactory/index.html">DBCPDataSourceFactory</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/Using JNDI/index.html">Using JNDI</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/Deployment with Ant/index.html">Deployment with Ant</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/Configuring Logging/index.html">Configuring Logging</a></li>
+</ul>
+</li>
+<li><a href="../../../../Documentation/Cayenne Guide/Ant Tasks/index.html">Ant Tasks</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Maven2 Plugins/index.html">Maven2 Plugins</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Customization/index.html">Customization</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/DataViews/index.html">DataViews</a></li>
+</ul>
+</div>
+<div id="ConfluenceContent"><h3><a name="StandaloneApplications-SharedConfigurationSingleton"></a>Shared Configuration Singleton</h3>
+
+<p>In a standalone Java application, DefaultConfiguration is used to locate and load configuration files. This approach does not require any additional setup. Shared configuration instance can simply be obtained by calling <tt>getSharedConfiguration()</tt>:</p>
+
+<div class="code"><div class="codeContent">
+<pre class="code-java"><span class="code-keyword">import</span> org.apache.cayenne.conf.Configuration;
+...           
+Configuration conf = Configuration.getSharedConfiguration();</pre>
+</div></div>
+
+<p>DefaultConfiguration will expect cayenne.xml file to be located in the CLASSPATH. The same is true for DataMaps referenced in cayenne.xml. Their location is resolved relative to CLASSPATH as well. To make these files available to Cayenne, you can simply include them in the root of your application jar file (read <a href="../../../../Documentation/Cayenne Guide/Deployment/Customizing Configuration/index.html" title="Customizing Configuration">Customizing Configuration</a> on how to change that).</p>
+
+<p>The location of the data source files referenced in cayenne.xml is interpreted by the factory that was assigned to each datasource in cayenne.xml. Default factory is DriverDataSourceFactory. It will rely on its parent configuration to find the data source file (i.e. locating data source files will be no different from the DataMap files). Depending on the application needs, programmers may implement custom factories that collect database information interactively by showing a login dialog, etc.</p>
+
+<h3><a name="StandaloneApplications-SharedConfigurationandDataContext"></a>Shared Configuration and DataContext</h3>
+
+<p>In a setup that relies on shared Configuration a DataContext can be created by calling <tt>DataContext.createDataContext()</tt> static method that internally uses shared configuration:</p>
+
+<div class="code"><div class="codeContent">
+<pre class="code-java"><span class="code-keyword">import</span> org.apache.cayenne.access.DataContext;
+...
+DataContext context = DataContext.createDataContext();</pre>
+</div></div>
+
+<p>Later a DataContext can be passed around in the code explicitly, or it can be bound to an execution thread, making it accessible to all code being run within this thread (e.g. this can be a Swing event thread):</p>
+
+<div class="code"><div class="codeContent">
+<pre class="code-java"><span class="code-keyword">import</span> org.apache.cayenne.access.DataContext;
+...
+DataContext context = DataContext.createDataContext();
+DataContext.bindThreadDataContext(context);</pre>
+</div></div></div>
+</div>
+  <div class="clearer">.</div>
+  <div style="height: 12px; background-image: url('../../../../images/border_bottom.gif'); background-repeat: repeat-x;"></div>
+
+  <div class="smalltext copyright">
+    Copyright &copy;2001-2007 Apache Software Foundation
+  </div>
+
+</body>
+</html>

Propchange: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/Standalone Applications/index.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/Using JNDI/index.html
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne%20Guide/Deployment/Using%20JNDI/index.html?view=auto&rev=554413
==============================================================================
--- cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/Using JNDI/index.html (added)
+++ cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/Using JNDI/index.html Sun Jul  8 12:11:31 2007
@@ -0,0 +1,164 @@
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+ 
+     http://www.apache.org/licenses/LICENSE-2.0
+ 
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.
+-->
+<html>
+  <head>
+    <title>Apache Cayenne Documentation - Using JNDI</title>
+    <style type="text/css">@import "../../../../style.css";</style>
+  </head>
+<body>
+  <div class="header">
+    <div style="float: left;"><a href="http://cayenne.apache.org/"><img src="../../../../images/logo.gif" align="absmiddle" border="0"></a></div>
+    <span class="logoSpaceLink"><a href="../../../../index.html">Cayenne User Documentation</a></span><br />
+    <span class="pagetitle">Using JNDI</span>
+  </div>
+<div id="cayenne_toc">
+<ul>
+<li><a href="../../../../Documentation/Cayenne Guide/Introduction/index.html">Introduction</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Installation/index.html">Installation</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Quick Start/index.html">Quick Start</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Design/index.html">Design</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/DataContext/index.html">DataContext</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Queries/index.html">Queries</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/DataObjects/index.html">DataObjects</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Stored Procedures/index.html">Stored Procedures</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Expressions/index.html">Expressions</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Lifecycle Callbacks/index.html">Lifecycle Callbacks</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Performance Tuning/index.html">Performance Tuning</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Caching and Fresh Data/index.html">Caching and Fresh Data</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/index.html">Deployment</a><ul>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/Standalone Applications/index.html">Standalone Applications</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/Web Applications/index.html">Web Applications</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/Customizing Configuration/index.html">Customizing Configuration</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/DBCPDataSourceFactory/index.html">DBCPDataSourceFactory</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/Using JNDI/index.html">Using JNDI</a><ul>
+</ul>
+</li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/Deployment with Ant/index.html">Deployment with Ant</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/Configuring Logging/index.html">Configuring Logging</a></li>
+</ul>
+</li>
+<li><a href="../../../../Documentation/Cayenne Guide/Ant Tasks/index.html">Ant Tasks</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Maven2 Plugins/index.html">Maven2 Plugins</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Customization/index.html">Customization</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/DataViews/index.html">DataViews</a></li>
+</ul>
+</div>
+<div id="ConfluenceContent">
+<p>Cayenne can be setup to obtain a DataSource via JNDI, instead of using its own connection pool. To do that Cayenne DataNodes must be configured to use <tt>JNDIDataSourceFactory</tt>. This can be done in the modeler as shown on the pictures below.</p>
+
+<p>1. Select JNDIDataSourceFactory:<br/>
+<img src="jndi-step1.jpg" align="absmiddle" border="0" /></p>
+
+
+<p>2. Enter DataSource JNDI Name:<br/>
+<img src="jndi-step2.jpg" align="absmiddle" border="0" /></p>
+
+
+<h3><a name="UsingJNDI-DevelopmentwithJNDIDataNodes"></a>Development with JNDI DataNodes</h3>
+
+<p>To be able to connect to the database from CayenneModeler when JNDIDataSourceFactory is specified (and thus no explicit connection information is associated with the DataNode), you may configure a "local DataSource" (see a corresponding <a href="../../../../Documentation/Modeler Guide/Preferences Panel/Local DataSources/index.html" title="Local DataSources">Modeler Guide chapter</a>).</p>
+
+<p>Cayenne also supports container-less runtime operation of the JNDI node. It works like this:</p>
+
+<ul>
+	<li>JNDIDataSourceFactory attempts to locate a DataSource via a default JNDI provider.</li>
+	<li>If the DataSource is not found, JNDIDataSourceFactory attempts to read local user preferences database, looking for a local DataSource matching the JNDI name.</li>
+	<li>If such DataSource is found, it is used in the application as if it was obtained via JNDI.</li>
+</ul>
+
+
+<p>This way Modeler preferences database works as a substitute of a JNDI provider, saving extra configuration steps in development mode, when an application may be run from the IDE. Requirements to use this feature:</p>
+
+<ul>
+	<li>The name of the local DataSource in the Modeler preferences must match the JNDI name of the DataNode.</li>
+	<li><tt>cayenne-modeler.jar</tt> and <tt>hsqldb-x.x.x.jar</tt> must be in the application runtime CLASSPATH.</li>
+</ul>
+
+
+
+<h3><a name="UsingJNDI-DeploymentinContainer"></a>Deployment in Container</h3>
+
+<p>Depending on how the DataSource is mapped in the container, you may optionally need to add a "resource-ref" entry to the <tt>web.xml</tt> file:</p>
+
+<div class="preformatted"><div class="preformattedContent">
+<pre>&lt;resource-ref&gt;
+   &lt;res-ref-name&gt;jdbc/myds&lt;/res-ref-name&gt;
+   &lt;res-type&gt;javax.sql.DataSource&lt;/res-type&gt;
+   &lt;res-auth&gt;Container&lt;/res-auth&gt;
+&lt;/resource-ref&gt;</pre>
+</div></div>
+
+<p>Below are sample DataSource configurations for Tomcat 5.5 and 5.0. The XML should be pasted into <tt>$CATALINA_HOME/conf/server.xml</tt> file between the <tt>&lt;Host&gt;...&lt;/Host&gt;</tt> tags. Of course the application name and database parameters should be replaced with the correct values for the target environment. </p>
+
+
+
+<h4><a name="UsingJNDI-Tomcat5.5Configuration"></a>Tomcat 5.5 Configuration</h4>
+
+<div class="preformatted"><div class="preformattedContent">
+<pre>&lt;Context path="/myapp" docBase="myapp"&gt;
+  &lt;Resource name="jdbc/myds" auth="Container"
+          type="javax.sql.DataSource" driverClassName="oracle.jdbc.driver.OracleDriver"
+          url="jdbc:oracle:thin:@127.0.0.1:1521:dbname"
+          username="userName" password="secret" maxActive="5" maxIdle="2"/&gt;
+&lt;/Context&gt;</pre>
+</div></div>
+
+<h4><a name="UsingJNDI-Tomcat5.0Configuration"></a>Tomcat 5.0 Configuration</h4>
+
+<div class="preformatted"><div class="preformattedContent">
+<pre>&lt;Context path="/myapp" docBase="myapp"&gt;
+   &lt;Resource name="jdbc/myds" auth="Container" type="javax.sql.DataSource"/&gt;
+   &lt;ResourceParams name="jdbc/myds"&gt;
+      &lt;parameter&gt;
+         &lt;name&gt;driverClassName&lt;/name&gt;
+         &lt;value&gt;oracle.jdbc.driver.OracleDriver&lt;/value&gt;
+      &lt;/parameter&gt;
+      &lt;parameter&gt;
+         &lt;name&gt;url&lt;/name&gt;
+         &lt;value&gt;jdbc:oracle:thin:@127.0.0.1:1521:dbname&lt;/value&gt;
+      &lt;/parameter&gt;
+      &lt;parameter&gt;
+         &lt;name&gt;username&lt;/name&gt;
+         &lt;value&gt;***&lt;/value&gt;
+      &lt;/parameter&gt;
+      &lt;parameter&gt;
+         &lt;name&gt;password&lt;/name&gt;
+         &lt;value&gt;****&lt;/value&gt;
+      &lt;/parameter&gt;
+      &lt;parameter&gt;
+         &lt;name&gt;maxActive&lt;/name&gt;
+         &lt;value&gt;20&lt;/value&gt;
+      &lt;/parameter&gt;
+      &lt;parameter&gt;
+         &lt;name&gt;maxIdle&lt;/name&gt;
+         &lt;value&gt;10&lt;/value&gt;
+      &lt;/parameter&gt;
+   &lt;/ResourceParams&gt;
+&lt;/Context&gt;</pre>
+</div></div></div>
+</div>
+  <div class="clearer">.</div>
+  <div style="height: 12px; background-image: url('../../../../images/border_bottom.gif'); background-repeat: repeat-x;"></div>
+
+  <div class="smalltext copyright">
+    Copyright &copy;2001-2007 Apache Software Foundation
+  </div>
+
+</body>
+</html>

Propchange: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/Using JNDI/index.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/Using JNDI/jndi-step1.jpg
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne%20Guide/Deployment/Using%20JNDI/jndi-step1.jpg?view=auto&rev=554413
==============================================================================
Binary file - no diff available.

Propchange: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/Using JNDI/jndi-step1.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/Using JNDI/jndi-step2.jpg
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne%20Guide/Deployment/Using%20JNDI/jndi-step2.jpg?view=auto&rev=554413
==============================================================================
Binary file - no diff available.

Propchange: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/Using JNDI/jndi-step2.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/Web Applications/index.html
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne%20Guide/Deployment/Web%20Applications/index.html?view=auto&rev=554413
==============================================================================
--- cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/Web Applications/index.html (added)
+++ cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/Web Applications/index.html Sun Jul  8 12:11:31 2007
@@ -0,0 +1,141 @@
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+ 
+     http://www.apache.org/licenses/LICENSE-2.0
+ 
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.
+-->
+<html>
+  <head>
+    <title>Apache Cayenne Documentation - Web Applications</title>
+    <style type="text/css">@import "../../../../style.css";</style>
+  </head>
+<body>
+  <div class="header">
+    <div style="float: left;"><a href="http://cayenne.apache.org/"><img src="../../../../images/logo.gif" align="absmiddle" border="0"></a></div>
+    <span class="logoSpaceLink"><a href="../../../../index.html">Cayenne User Documentation</a></span><br />
+    <span class="pagetitle">Web Applications</span>
+  </div>
+<div id="cayenne_toc">
+<ul>
+<li><a href="../../../../Documentation/Cayenne Guide/Introduction/index.html">Introduction</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Installation/index.html">Installation</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Quick Start/index.html">Quick Start</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Design/index.html">Design</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/DataContext/index.html">DataContext</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Queries/index.html">Queries</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/DataObjects/index.html">DataObjects</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Stored Procedures/index.html">Stored Procedures</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Expressions/index.html">Expressions</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Lifecycle Callbacks/index.html">Lifecycle Callbacks</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Performance Tuning/index.html">Performance Tuning</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Caching and Fresh Data/index.html">Caching and Fresh Data</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/index.html">Deployment</a><ul>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/Standalone Applications/index.html">Standalone Applications</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/Web Applications/index.html">Web Applications</a><ul>
+</ul>
+</li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/Customizing Configuration/index.html">Customizing Configuration</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/DBCPDataSourceFactory/index.html">DBCPDataSourceFactory</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/Using JNDI/index.html">Using JNDI</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/Deployment with Ant/index.html">Deployment with Ant</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Deployment/Configuring Logging/index.html">Configuring Logging</a></li>
+</ul>
+</li>
+<li><a href="../../../../Documentation/Cayenne Guide/Ant Tasks/index.html">Ant Tasks</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Maven2 Plugins/index.html">Maven2 Plugins</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/Customization/index.html">Customization</a></li>
+<li><a href="../../../../Documentation/Cayenne Guide/DataViews/index.html">DataViews</a></li>
+</ul>
+</div>
+<div id="ConfluenceContent"><h3><a name="WebApplications-PuttingCayenneFilesinWebApplicationCLASSPATH"></a>Putting Cayenne Files in Web Application CLASSPATH</h3>
+
+<p>When deploying an application in a web container it is possible to follow the procedure for the standalone applications, i.e. put all XML files in the application CLASSPATH (e.g. in "mywebapp/WEB-INF/classes/", but DON'T put it in container shared locations!). Session DataContext can be obtained via ServletUtil:</p>
+
+<div class="code"><div class="codeContent">
+<pre class="code-java">HttpSession session = ...;
+DataContext context = ServletUtil.getSessionContext(session);</pre>
+</div></div>
+
+<p>However you may consider a deployment procedure described below, as it provides more flexibility and a number of additional useful features.</p>
+
+<h3><a name="WebApplications-CayenneServletFilter"></a>Cayenne Servlet Filter</h3>
+
+<p>Adding the following filter to the <tt>web.xml</tt> would automate Cayenne setup in the web application:</p>
+
+<div class="preformatted"><div class="preformattedContent">
+<pre>&lt;filter&gt;
+    &lt;filter-name&gt;CayenneFilter&lt;/filter-name&gt;
+    &lt;filter-class&gt;org.apache.cayenne.conf.WebApplicationContextFilter&lt;/filter-class&gt;
+&lt;/filter&gt;
+&lt;filter-mapping&gt;
+    &lt;filter-name&gt;CayenneFilter&lt;/filter-name&gt;
+    &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
+&lt;/filter-mapping&gt;
+</pre>
+</div></div>
+
+<p>The filter will ensure that for each matching request a DataContext is bound to the request thread. So you can retrieve it anywhere in the application, even if you don't have a reference to the web environment:</p>
+
+<div class="code"><div class="codeContent">
+<pre class="code-java">DataContext context = DataContext.getThreadDataContext();</pre>
+</div></div>
+
+<p>Filter can match a specific URL as shown above, or a specific servlet:</p>
+
+<div class="preformatted"><div class="preformattedContent">
+<pre>&lt;servlet&gt;
+   &lt;servlet-name&gt;MyServlet&lt;/servlet-name&gt;
+   &lt;servlet-class&gt;org.example.MyServlet&lt;/servlet-class&gt;
+   &lt;load-on-startup&gt;0&lt;/load-on-startup&gt;
+&lt;/servlet&gt;
+		
+&lt;filter&gt;
+    &lt;filter-name&gt;CayenneFilter&lt;/filter-name&gt;
+    &lt;filter-class&gt;org.apache.cayenne.conf.WebApplicationContextFilter&lt;/filter-class&gt;
+&lt;/filter&gt;
+&lt;filter-mapping&gt;
+    &lt;filter-name&gt;CayenneFilter&lt;/filter-name&gt;
+    &lt;servlet-name&gt;MyServlet&lt;/servlet-name&gt;
+&lt;/filter-mapping&gt;</pre>
+</div></div>
+
+
+<p>Additionally the filter supports putting files in <tt>myapp/WEB-INF/</tt> directory instead of the CLASSPATH, so a .war file may look like this:</p>
+
+<div class="preformatted"><div class="preformattedContent">
+<pre>index.jsp
+WEB-INF/cayenne.xml
+WEB-INF/xyz.map.xml
+WEB-INF/lib/...</pre>
+</div></div>
+
+<p>Actually, Cayenne files can be stored in any subdirectory of <tt>myapp/WEB-INF/</tt>. To specify a subdirectory, you'll need to add <tt>&lt;context-param&gt;</tt> named <tt>cayenne.configuration.path</tt> to your application descriptor:</p>
+
+<div class="preformatted"><div class="preformattedContent">
+<pre>&lt;context-param&gt;
+    &lt;param-name&gt;cayenne.configuration.path&lt;/param-name&gt;
+    &lt;param-value&gt;/WEB-INF/config/cayenne-files&lt;/param-value&gt;
+&lt;/context-param&gt;</pre>
+</div></div></div>
+</div>
+  <div class="clearer">.</div>
+  <div style="height: 12px; background-image: url('../../../../images/border_bottom.gif'); background-repeat: repeat-x;"></div>
+
+  <div class="smalltext copyright">
+    Copyright &copy;2001-2007 Apache Software Foundation
+  </div>
+
+</body>
+</html>

Propchange: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/Web Applications/index.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/index.html
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne%20Guide/Deployment/index.html?view=auto&rev=554413
==============================================================================
--- cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/index.html (added)
+++ cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/index.html Sun Jul  8 12:11:31 2007
@@ -0,0 +1,96 @@
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+ 
+     http://www.apache.org/licenses/LICENSE-2.0
+ 
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.
+-->
+<html>
+  <head>
+    <title>Apache Cayenne Documentation - Deployment</title>
+    <style type="text/css">@import "../../../style.css";</style>
+  </head>
+<body>
+  <div class="header">
+    <div style="float: left;"><a href="http://cayenne.apache.org/"><img src="../../../images/logo.gif" align="absmiddle" border="0"></a></div>
+    <span class="logoSpaceLink"><a href="../../../index.html">Cayenne User Documentation</a></span><br />
+    <span class="pagetitle">Deployment</span>
+  </div>
+<div id="cayenne_toc">
+<ul>
+<li><a href="../../../Documentation/Cayenne Guide/Introduction/index.html">Introduction</a></li>
+<li><a href="../../../Documentation/Cayenne Guide/Installation/index.html">Installation</a></li>
+<li><a href="../../../Documentation/Cayenne Guide/Quick Start/index.html">Quick Start</a></li>
+<li><a href="../../../Documentation/Cayenne Guide/Design/index.html">Design</a></li>
+<li><a href="../../../Documentation/Cayenne Guide/DataContext/index.html">DataContext</a></li>
+<li><a href="../../../Documentation/Cayenne Guide/Queries/index.html">Queries</a></li>
+<li><a href="../../../Documentation/Cayenne Guide/DataObjects/index.html">DataObjects</a></li>
+<li><a href="../../../Documentation/Cayenne Guide/Stored Procedures/index.html">Stored Procedures</a></li>
+<li><a href="../../../Documentation/Cayenne Guide/Expressions/index.html">Expressions</a></li>
+<li><a href="../../../Documentation/Cayenne Guide/Lifecycle Callbacks/index.html">Lifecycle Callbacks</a></li>
+<li><a href="../../../Documentation/Cayenne Guide/Performance Tuning/index.html">Performance Tuning</a></li>
+<li><a href="../../../Documentation/Cayenne Guide/Caching and Fresh Data/index.html">Caching and Fresh Data</a></li>
+<li><a href="../../../Documentation/Cayenne Guide/Deployment/index.html">Deployment</a><ul>
+<li><a href="../../../Documentation/Cayenne Guide/Deployment/Standalone Applications/index.html">Standalone Applications</a></li>
+<li><a href="../../../Documentation/Cayenne Guide/Deployment/Web Applications/index.html">Web Applications</a></li>
+<li><a href="../../../Documentation/Cayenne Guide/Deployment/Customizing Configuration/index.html">Customizing Configuration</a></li>
+<li><a href="../../../Documentation/Cayenne Guide/Deployment/DBCPDataSourceFactory/index.html">DBCPDataSourceFactory</a></li>
+<li><a href="../../../Documentation/Cayenne Guide/Deployment/Using JNDI/index.html">Using JNDI</a></li>
+<li><a href="../../../Documentation/Cayenne Guide/Deployment/Deployment with Ant/index.html">Deployment with Ant</a></li>
+<li><a href="../../../Documentation/Cayenne Guide/Deployment/Configuring Logging/index.html">Configuring Logging</a></li>
+</ul>
+</li>
+<li><a href="../../../Documentation/Cayenne Guide/Ant Tasks/index.html">Ant Tasks</a></li>
+<li><a href="../../../Documentation/Cayenne Guide/Maven2 Plugins/index.html">Maven2 Plugins</a></li>
+<li><a href="../../../Documentation/Cayenne Guide/Customization/index.html">Customization</a></li>
+<li><a href="../../../Documentation/Cayenne Guide/DataViews/index.html">DataViews</a></li>
+</ul>
+</div>
+<div id="ConfluenceContent"><h2><a name="Deployment-Deployment"></a>Deployment</h2>
+
+<p>Cayenne application deployment is about configuring the application so that at runtime it can find a main project file (cayenne.xml) and associated resources, such as DataMap and DataNode XML files.</p>
+
+<p>The central point in Cayenne deployment is the <span class="nobr"><a href="http://incubator.apache.org/cayenne/2_0/api/cayenne/org/apache/cayenne/conf/Configuration.html" title="Visit page outside Confluence" rel="nofollow">Configuration<sup><img class="rendericon" src="../../../images/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span> class. It locates and loads all the mapping and configuration information required for Cayenne at runtime. By default Configuration uses a singleton model, i.e. normally there is only one instance of Configuration (or a subclass) that exists in the application. This shared instance can be accessed in the following way:</p>
+<div class="code"><div class="codeContent">
+<pre class="code-java"><span class="code-keyword">import</span> org.apache.cayenne.conf.Configuration;
+<span class="code-keyword">import</span> org.apache.cayenne.access.DataDomain;
+...
+Configuration conf = Configuration.getSharedConfiguration();
+DataDomain domain = conf.getDomain();</pre>
+</div></div>
+<p>As discussed in the following chapters Configuration works behind the scenes and users rarely care about it. Application code is normally only concerned with obtaining a DataContext.</p>
+
+<h3><a name="Deployment-Sections"></a>Sections</h3>
+
+<ol>
+	<li><a href="../../../Documentation/Cayenne Guide/Deployment/Standalone Applications/index.html" title="Standalone Applications">Standalone Applications</a></li>
+	<li><a href="../../../Documentation/Cayenne Guide/Deployment/Web Applications/index.html" title="Web Applications">Web Applications</a></li>
+	<li><a href="../../../Documentation/Cayenne Guide/Deployment/Customizing Configuration/index.html" title="Customizing Configuration">Customizing Configuration</a></li>
+	<li><a href="../../../Documentation/Cayenne Guide/Deployment/DBCPDataSourceFactory/index.html" title="DBCPDataSourceFactory">DBCPDataSourceFactory</a></li>
+	<li><a href="../../../Documentation/Cayenne Guide/Deployment/Using JNDI/index.html" title="Using JNDI">Using JNDI</a></li>
+	<li><a href="../../../Documentation/Cayenne Guide/Deployment/Deployment with Ant/index.html" title="Deployment with Ant">Deployment with Ant</a></li>
+	<li><a href="../../../Documentation/Cayenne Guide/Deployment/Configuring Logging/index.html" title="Configuring Logging">Configuring Logging</a></li>
+</ol>
+
+</div>
+</div>
+  <div class="clearer">.</div>
+  <div style="height: 12px; background-image: url('../../../images/border_bottom.gif'); background-repeat: repeat-x;"></div>
+
+  <div class="smalltext copyright">
+    Copyright &copy;2001-2007 Apache Software Foundation
+  </div>
+
+</body>
+</html>

Propchange: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/index.html
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message