cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1162526 - /cayenne/main/trunk/docs/docbook/cayenne-guide/src/docbkx/starting-cayenne.xml
Date Sun, 28 Aug 2011 14:04:32 GMT
Author: aadamchik
Date: Sun Aug 28 14:04:31 2011
New Revision: 1162526

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

edits

Modified:
    cayenne/main/trunk/docs/docbook/cayenne-guide/src/docbkx/starting-cayenne.xml

Modified: cayenne/main/trunk/docs/docbook/cayenne-guide/src/docbkx/starting-cayenne.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/docbook/cayenne-guide/src/docbkx/starting-cayenne.xml?rev=1162526&r1=1162525&r2=1162526&view=diff
==============================================================================
--- cayenne/main/trunk/docs/docbook/cayenne-guide/src/docbkx/starting-cayenne.xml (original)
+++ cayenne/main/trunk/docs/docbook/cayenne-guide/src/docbkx/starting-cayenne.xml Sun Aug
28 14:04:31 2011
@@ -9,18 +9,18 @@
 			created simply by calling a
 			constructor:<programlisting>ServerRuntime runtime = 
 	new ServerRuntime("com/example/cayenne-project.xml");</programlisting></para>
-		<para>The parameter you pass to the constructor is a location of the main project
file.
-			Location is a '/'-separated path (same path separator is used on UNIX and Windows) that
-			is resolved relative to the application classpath. The project file can be placed in the
-			root package or in a subpackage (e.g. in the example above it is in "com/example"
+		<para>The parameter you pass to the constructor is a location of the main project
file. Location
+			is a '/'-separated path (same path separator is used on UNIX and Windows) that is
+			resolved relative to the application classpath. The project file can be placed in the
+			root package or in a subpackage (e.g. in the code above it is in "com/example"
 			subpackage).</para>
 		<para>ServerRuntime encapsulates a single Cayenne stack. Most applications will just
have one
 			ServerRuntime using it to create as many ObjectContexts as needed, access the Dependency
 			Injection (DI) container and work with other Cayenne features. Internally ServerRuntime
-			is just a thin wrapper around the DI container. Detailed features of the DI container
-			are discussed in "Customizing Cayenne Runtime" chapter. Here we'll just show an example
-			of how an application might replace a default implementation of a certain internal
-			Cayenne service (in this case - QueryCache) with a different
+			is just a thin wrapper around the DI container. Detailed features of the container are
+			discussed in "Customizing Cayenne Runtime" chapter. Here we'll just show an example of
+			how an application might replace a default implementation of a built-in Cayenne service
+			(in this case - QueryCache) with a different
 			class:<programlisting>public class MyExtensionsModule implements Module {
 	public void configure(Binder binder) {
 		binder.bind(QueryCache.class).to(EhCacheQueryCache.class);
@@ -28,13 +28,12 @@
 }</programlisting><programlisting>Module extensions = new MyExtensionsModule();
 ServerRuntime runtime = 
 	new ServerRuntime("com/example/cayenne-project.xml", extensions);</programlisting></para>
-		<para>It is a good idea to shut down the runtime when it is no longer needed, usually
before
-			the application itself is shutdown:
-			<programlisting>runtime.shutdwon();</programlisting>When a runtime object
has the same
-			scope as the application, this may not be absolutely necessary, however in some cases
it
-			is essential, and is generally considered a good practice. E.g. web container hot
-			redeploy will cause resource leaks and eventual OutOfMemoryError if web applications
-			fail to shutdown CayenneRuntime.</para>
+		<para>It is a good idea to shut down the runtime when it is no longer needed, usually
before the
+			application itself is shutdown: <programlisting>runtime.shutdwon();</programlisting>When
+			a runtime object has the same scope as the application, this may not be always
+			necessary, however in some cases it is essential, and is generally considered a good
+			practice. E.g. in a web container hot redeploy of a webapp will cause resource leaks and
+			eventual OutOfMemoryError if the application fails to shutdown CayenneRuntime.</para>
 	</section>
 	<section>
 		<title>Merging Multiple Projects</title>



Mime
View raw message