You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by aa...@apache.org on 2011/08/28 15:26:12 UTC

svn commit: r1162519 - in /cayenne/main/trunk/docs/docbook/cayenne-guide/src/docbkx: appendix-a.xml customizing-cayenne-runtime.xml

Author: aadamchik
Date: Sun Aug 28 13:26:11 2011
New Revision: 1162519

URL: http://svn.apache.org/viewvc?rev=1162519&view=rev
Log:
docbook

customizing-cayenne-runtime - in progress
appendix-a - in progress

Modified:
    cayenne/main/trunk/docs/docbook/cayenne-guide/src/docbkx/appendix-a.xml
    cayenne/main/trunk/docs/docbook/cayenne-guide/src/docbkx/customizing-cayenne-runtime.xml

Modified: cayenne/main/trunk/docs/docbook/cayenne-guide/src/docbkx/appendix-a.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/docbook/cayenne-guide/src/docbkx/appendix-a.xml?rev=1162519&r1=1162518&r2=1162519&view=diff
==============================================================================
--- cayenne/main/trunk/docs/docbook/cayenne-guide/src/docbkx/appendix-a.xml (original)
+++ cayenne/main/trunk/docs/docbook/cayenne-guide/src/docbkx/appendix-a.xml Sun Aug 28 13:26:11 2011
@@ -34,16 +34,80 @@
 					<td>weak</td>
 				</tr>
 				<tr>
+					<td><code>cayenne.jdbc.driver[.domain_name.node_name]</code> - defines the JDBC driver to use
+						when creating a DataSource. If domain name and optionally - node name are
+						specified, the setting overrides DataSource info just for this domain/node.
+						Otherwise the override is applied to all domains/nodes in the system.</td>
 					<td/>
+					<td>none, project DataNode configuration is used</td>
+				</tr>
+				<tr>
+					<td><code>cayenne.jdbc.url[.domain_name.node_name] </code>- defines the DB URL
+						to use when creating a DataSource. If domain name and optionally - node name
+						are specified, the setting overrides DataSource info just for this
+						domain/node. Otherwise the override is applied to all domains/nodes in the
+						system.</td>
+					<td/>
+					<td>none, project DataNode configuration is used</td>
+				</tr>
+				<tr>
+					<td><code>cayenne.adapter[.domain_name.node_name]</code> - defines the class
+						name of the DbAdapter to use with the DataNodes. If domain name and
+						optionally - node name are specified, the setting overrides adapter info
+						just for this domain/node. Otherwise the override is applied to all
+						domains/nodes in the system.</td>
+					<td/>
+					<td>none, project DataNode configuration is used</td>
+				</tr>
+				<tr>
+					<td><code>cayenne.jdbc.username[.domain_name.node_name] </code>- defines the DB
+						user name to use when creating a DataSource. If domain name and optionally -
+						node name are specified, the setting overrides DataSource info just for this
+						domain/node. Otherwise the override is applied to all domains/nodes in the
+						system.</td>
+					<td/>
+					<td>none, project DataNode configuration is used</td>
+				</tr>
+				<tr>
+					<td><code>cayenne.jdbc.password[.domain_name.node_name]</code> - defines the DB
+						password to use when creating a DataSource. If domain name and optionally -
+						node name are specified, the setting overrides DataSource info just for this
+						domain/node. Otherwise the override is applied to all domains/nodes in the
+						system</td>
 					<td/>
+					<td>none, project DataNode configuration is used</td>
+				</tr>
+				<tr>
+					<td><code>cayenne.jdbc.min.connections[.domain_name.node_name]</code> - defines
+						the DB connection pool minimal size. If domain name and optionally - node
+						name are specified, the setting overrides DataSource info just for this
+						domain/node. Otherwise the override is applied to all domains/nodes in the
+						system</td>
 					<td/>
+					<td>none, project DataNode configuration is used</td>
+				</tr>
+				<tr>
+					<td><code>cayenne.jdbc.max.conections[.domain_name.node_name]</code> - defines
+						the DB connection pool maximum size. If domain name and optionally - node
+						name are specified, the setting overrides DataSource info just for this
+						domain/node. Otherwise the override is applied to all domains/nodes in the
+						system</td>
+					<td/>
+					<td>none, project DataNode configuration is used</td>
+				</tr>
+				<tr>
+					<td><code>cayenne.MapQueryCacheFactory.cacheSize</code> - defines the max size
+						of the LRU query cache map. Ignored if the default MapQueryCacheFactory is
+						overridden and a different cache provider is used.</td>
+					<td>an int defininging max number of entries in the cache</td>
+					<td>2000</td>
 				</tr>
 			</tbody>
 		</table>
 	</para>
 	<para>
 		<table frame="void">
-			<caption>ServerRuntime Service Collections</caption>
+			<caption>Service Collections Recognized by ServerRuntime</caption>
 			<col width="56%"/>
 			<col width="16%"/>
 			<col width="28%"/>

Modified: cayenne/main/trunk/docs/docbook/cayenne-guide/src/docbkx/customizing-cayenne-runtime.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/docbook/cayenne-guide/src/docbkx/customizing-cayenne-runtime.xml?rev=1162519&r1=1162518&r2=1162519&view=diff
==============================================================================
--- cayenne/main/trunk/docs/docbook/cayenne-guide/src/docbkx/customizing-cayenne-runtime.xml (original)
+++ cayenne/main/trunk/docs/docbook/cayenne-guide/src/docbkx/customizing-cayenne-runtime.xml Sun Aug 28 13:26:11 2011
@@ -188,9 +188,13 @@ ServerRuntime runtime = 
 					<code>org.apache.cayenne.configuration.DefaultRuntimeProperties.properties
 				</code>map (see the next section on how to do that). This map contains the default
 				property values and can accept application-specific values, overrding the defaults. </para>
-			<para>If the same property is specified on the command line and in the properties map,
-				the command-line value takes precedence, and the map value will be used. This way
-				Cayenne runtime can be reconfigured during deployment.</para>
+			<para>Note that if a property value is a name of a Java class, when this Java class is
+				instantiated by Cayenne, the container performs injection of instance variables. So
+				even the dynamically specified Java classes can use @Inject annotation to get a hold
+				of other Cayenne services.</para>
+			<para>If the same property is specified both in the command line and in the properties
+				map, the command-line value takes precedence. The map value will be ignored. This
+				way Cayenne runtime can be reconfigured during deployment.</para>
 		</section>
 		<section xml:id="contributing-to-service-lists-maps">
 			<title>Contributing to Service Collections</title>
@@ -217,11 +221,23 @@ binder.bindList(DefaultDbAdapterFactory.
 		</section>
 		<section xml:id="alternative-service-implementations">
 			<title>Alternative Service Implementations</title>
-			<para/>
+			<para>As mentioned above, custom modules are loaded by ServerRuntime after the built-in
+				modules. So it is easy to redefine a built-in service in Cayenne by rebinding
+				desired implementations or providers. To do that, first we need to know what those
+				services to redefine are. While we describe some of them in the following sections,
+				the best way to get a full list is to check the source code of the Cayenne version
+				you are using and namely look in
+					<code>org.apache.cayenne.configuration.server.ServerModule</code> - the main
+				built-in module in Cayenne. </para>
+			<para>Now an example of overriding <code>QueryCache</code> service. The default
+				implementation of this service is provided by <code>MapQueryCacheProvider</code>.
+				But if we want to use <code>EhCacheQueryCache</code> (a Cayenne wrapper for the
+				EhCache framework), we can define it like
+				this:<programlisting>binder.bind(QueryCache.class).to(EhCacheQueryCache.class);</programlisting></para>
 		</section>
 	</section>
 	<section xml:id="noteworthy-runtime-components">
-		<title>Noteworthy Built In Services</title>
+		<title>Noteworthy Built-in Services</title>
 		<section>
 			<title>RuntimeProperties</title>
 		</section>