cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Cayenne Documentation > Deployment
Date Tue, 22 Dec 2009 11:29:00 GMT
<html>
<head>
    <base href="http://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=CAYDOC&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background-color: white" bgcolor="white">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
     <h2><a href="http://cwiki.apache.org/confluence/display/CAYDOC/Deployment">Deployment</a></h2>
     <h4>Page <b>edited</b> by             <a href="http://cwiki.apache.org/confluence/display/~andrus">Andrus
Adamchik</a>
    </h4>
     
          <br/>
     <div class="notificationGreySide">
         <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 <a href="http://incubator.apache.org/cayenne/2_0/api/cayenne/org/apache/cayenne/conf/Configuration.html"
rel="nofollow">Configuration</a> 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 panel" style="border-width: 1px;"><div class="codeContent panelContent">
<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="/confluence/display/CAYDOC/Standalone+Applications" title="Standalone
Applications">Standalone Applications</a></li>
	<li><a href="/confluence/display/CAYDOC/Web+Applications" title="Web Applications">Web
Applications</a></li>
	<li><a href="/confluence/display/CAYDOC/Customizing+Configuration" title="Customizing
Configuration">Customizing Configuration</a></li>
	<li><a href="/confluence/display/CAYDOC/DBCPDataSourceFactory" title="DBCPDataSourceFactory">DBCPDataSourceFactory</a></li>
	<li><a href="/confluence/display/CAYDOC/Using+JNDI" title="Using JNDI">Using
JNDI</a></li>
	<li><a href="/confluence/display/CAYDOC/Configuring+Logging" title="Configuring
Logging">Configuring Logging</a></li>
</ol>


     </div>
     <div id="commentsSection" class="wiki-content pageSection">
       <div style="float: right;">
            <a href="http://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
       </div>

       <a href="http://cwiki.apache.org/confluence/display/CAYDOC/Deployment">View Online</a>
       |
       <a href="http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=10560&revisedVersion=13&originalVersion=12">View
Change</a>
              |
       <a href="http://cwiki.apache.org/confluence/display/CAYDOC/Deployment?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message