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 16:00:57 UTC

svn commit: r1162524 - /cayenne/main/trunk/docs/docbook/cayenne-guide/src/docbkx/starting-cayenne.xml

Author: aadamchik
Date: Sun Aug 28 14:00:57 2011
New Revision: 1162524

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

in progress

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=1162524&r1=1162523&r2=1162524&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:00:57 2011
@@ -8,7 +8,7 @@
 				<code>org.apache.cayenne.configuration.server.ServerRuntime</code>. ServerRuntime is
 			created simply by calling a
 			constructor:<programlisting>ServerRuntime runtime = 
-	new ServerRuntime("com/example/cayenne-mydomain.xml");</programlisting></para>
+	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
@@ -27,7 +27,7 @@
 	}	
 }</programlisting><programlisting>Module extensions = new MyExtensionsModule();
 ServerRuntime runtime = 
-	new ServerRuntime("com/example/cayenne-mydomain.xml", extensions);</programlisting></para>
+	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
@@ -36,6 +36,20 @@ ServerRuntime runtime = 
 			redeploy will cause resource leaks and eventual OutOfMemoryError if web applications
 			fail to shutdown CayenneRuntime.</para>
 	</section>
+	<section>
+		<title>Merging Multiple Projects</title>
+		<para>ServerRuntime requires at least one mapping project to run. But it can also take multiple
+			projects and merge them together in a single configuration. This way different parts of
+			a database can be mapped independenlty from each other (even by different software
+			providers), and combined in runtime when assembling an application. Doing it is as easy
+			as passing multiple project locations to ServerRuntime constructor:</para><programlisting>ServerRuntime runtime = 
+	new ServerRuntime(new String[] {
+		"com/example/cayenne-project.xml",
+		"org/foo/cayenne-library1.xml",
+		"org/foo/cayenne-library2.xml"
+	}
+);</programlisting>
+	</section>
 	<section xml:id="webapps">
 		<title>Web Applications</title>
 	</section>