cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [CONF] Apache Cayenne Documentation > Deployment
Date Tue, 22 Dec 2009 11:29:00 GMT
    <base href="">
            <link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=CAYDOC&amp;forWysiwyg=true"
<body style="background-color: white" bgcolor="white">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
     <h2><a href="">Deployment</a></h2>
     <h4>Page <b>edited</b> by             <a href="">Andrus
     <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=""
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();
<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>

	<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
	<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
	<li><a href="/confluence/display/CAYDOC/Configuring+Logging" title="Configuring
Logging">Configuring Logging</a></li>

     <div id="commentsSection" class="wiki-content pageSection">
       <div style="float: right;">
            <a href=""
class="grey">Change Notification Preferences</a>

       <a href="">View Online</a>
       <a href="">View
       <a href=";showCommentArea=true#addcomment">Add

View raw message