Modified: cayenne/site/cms/trunk/content/docs/3.1/cayenne-guide/starting-cayenne.html URL: http://svn.apache.org/viewvc/cayenne/site/cms/trunk/content/docs/3.1/cayenne-guide/starting-cayenne.html?rev=1449170&r1=1449169&r2=1449170&view=diff ============================================================================== --- cayenne/site/cms/trunk/content/docs/3.1/cayenne-guide/starting-cayenne.html (original) +++ cayenne/site/cms/trunk/content/docs/3.1/cayenne-guide/starting-cayenne.html Fri Feb 22 18:55:07 2013 @@ -1,6 +1,15 @@ <html><head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> - <title xmlns:d="http://docbook.org/ns/docbook">Chapter 5. Starting Cayenne</title><link rel="stylesheet" type="text/css" href="css/cayenne-doc.css"><meta xmlns:d="http://docbook.org/ns/docbook" name="keywords" content="Cayenne 3.1B3-SNAPSHOT documentation"><meta xmlns:d="http://docbook.org/ns/docbook" name="description" content="User documentation for Apache Cayenne version 3.1B3-SNAPSHOT"><link rel="home" href="index.html" title="Cayenne Guide"><link rel="up" href="cayenne-guide-part2.html" title="Part II. Cayenne Framework"><link rel="prev" href="including-cayenne-in-project.html" title="Chapter 4. Including Cayenne in a Project"><link rel="next" href="persistent-objects-objectcontext.html" title="Chapter 6. Persistent Objects and ObjectContext"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div xmlns:d="http://docbook.org/ns/docbook" class="navheader"><table width="100%" summary="Navigat ion header"><tr><th class="versioninfo">v.3.1B3-SNAPSHOT</th><th align="center">Chapter 5. Starting Cayenne</th><th></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="including-cayenne-in-project.html">Prev</a> </td><th width="60%" align="center"><a accesskey="u" href="cayenne-guide-part2.html">Part II. Cayenne Framework</a></th><td width="20%" align="right"> <a accesskey="n" href="persistent-objects-objectcontext.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 5. Starting Cayenne"><div class="titlepage"><div><div><h2 class="title"><a name="starting-cayenne"></a>Chapter 5. Starting Cayenne</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="starting-cayenne.html#starting-serverruntime">Starting and Stopping ServerRuntime</a></span></dt><dt><span class="section"><a href="starting-cayenne.html#d0e919">Merging Multiple Projects< /a></span></dt><dt><span class="section"><a href="starting-cayenne.html#webapps">Web Applications</a></span></dt></dl></div><div class="section" title="Starting and Stopping ServerRuntime"><div class="titlepage"><div><div><h2 class="title"><a name="starting-serverruntime"></a>Starting and Stopping ServerRuntime</h2></div></div></div><p>In runtime Cayenne is accessed via + <title xmlns:d="http://docbook.org/ns/docbook">Chapter 5. Starting Cayenne</title><link rel="stylesheet" type="text/css" href="css/cayenne-doc.css"><meta xmlns:d="http://docbook.org/ns/docbook" name="keywords" content="Cayenne 3.1B3-SNAPSHOT documentation"><meta xmlns:d="http://docbook.org/ns/docbook" name="description" content="User documentation for Apache Cayenne version 3.1B3-SNAPSHOT"><link rel="home" href="index.html" title="Cayenne Guide"><link rel="up" href="cayenne-guide-part2.html" title="Part II. Cayenne Framework"><link rel="prev" href="including-cayenne-in-project.html" title="Chapter 4. Including Cayenne in a Project"><link rel="next" href="persistent-objects-objectcontext.html" title="Chapter 6. Persistent Objects and ObjectContext"><script xmlns:d="http://docbook.org/ns/docbook" type="text/javascript"> + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-7036673-1']); + _gaq.push(['_trackPageview']); + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + </script></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div xmlns:d="http://docbook.org/ns/docbook" class="navheader"><table width="100%" summary="Navigation header"><tr><th class="versioninfo">v.3.1B3-SNAPSHOT</th><th align="center">Chapter 5. Starting Cayenne</th><th></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="including-cayenne-in-project.html">Prev</a> </td><th width="60%" align="center"><a accesskey="u" href="cayenne-guide-part2.html">Part II. Cayenne Framework</a></th><td width="20%" align="right"> <a accesskey="n" href="persistent-objects-objectcontext.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 5. Starting Cayenne"><div class="titlepage"><div><div><h2 class="title"><a name="starting-cayenne"></a>Chapter 5. Starting Cayenne</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="s ection"><a href="starting-cayenne.html#starting-serverruntime">Starting and Stopping ServerRuntime</a></span></dt><dt><span class="section"><a href="starting-cayenne.html#d0e919">Merging Multiple Projects</a></span></dt><dt><span class="section"><a href="starting-cayenne.html#webapps">Web Applications</a></span></dt></dl></div><div class="section" title="Starting and Stopping ServerRuntime"><div class="titlepage"><div><div><h2 class="title"><a name="starting-serverruntime"></a>Starting and Stopping ServerRuntime</h2></div></div></div><p>In runtime Cayenne is accessed via <code class="code">org.apache.cayenne.configuration.server.ServerRuntime</code>. ServerRuntime is created simply by calling a constructor:</p><pre class="programlisting">ServerRuntime runtime = <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">new</span> ServerRuntime(<span xmlns="http://www.w3.org/1999/xhtml" class="hl-string">"com/example/cayenne-project.xml"</span>);</pre><p>The parameter you pass to the constructor is a location of the main project file. Location
