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 > Guide to 3.1 Features
Date Sun, 14 Nov 2010 04:25:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/1810/9/1/_/styles/combined.css?spaceKey=CAYDOC&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://cwiki.apache.org/confluence/display/CAYDOC/Guide+to+3.1+Features">Guide
to 3.1 Features</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://cwiki.apache.org/confluence/display/~andrus">Andrus
Adamchik</a>
    </h4>
        <br/>
                         <h4>Changes (2)</h4>
                                 
    
<div id="page-diffs">
            <table class="diff" cellpadding="0" cellspacing="0">
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >Cayenne 3.1 provides a property-based
mechanism to override Modeler DataSource definitions, regardless of whether they are driver
configurations, JNDI, DBCP, etc. A quick configuration example is shown below: <br>
<br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">{noformat}-Dcayenne.jdbc.driver=com.mysql.jdbc.Driver
-Dcayenne.jdbc.url=jdbc:mysql://localhost/mydb -Dcayenne.jdbc.username=user -Dcayenne.jdbc.password=password{noformat}
<br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">{noformat}-Dcayenne.jdbc.driver=com.mysql.jdbc.Driver
-Dcayenne.jdbc.url=jdbc:mysql://localhost/mydb \ <br>-Dcayenne.jdbc.username=user -Dcayenne.jdbc.password=password{noformat}
<br></td></tr>
            <tr><td class="diff-unchanged" > <br>For more details and configuration
options see javadocs of {{org.apache.cayenne.configuration.server.PropertyDataSourceFactory}}.
 <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
        </table>
</div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <p>This page highlights the new features and changes introduced in 3.1 release.
It is a high-level overview and as such is by no means complete. Consult RELEASE-NOTES.txt
file included in each release for the full list of changes, and UPGRADE.txt for the upgrade
instructions.</p>

<ul>
	<li><a href="#Guideto3.1Features-DistributionContentsStructure">Distribution
Contents Structure</a></li>
	<li><a href="#Guideto3.1Features-CayenneConfigurationandDependencyInjectionContainer">Cayenne
Configuration and Dependency Injection Container</a></li>
</ul>


<h2><a name="Guideto3.1Features-DistributionContentsStructure"></a>Distribution
Contents Structure</h2>

<p>Cayenne distribution is made leaner and more modular:</p>

<ul>
	<li><tt>"cayenne-modeler.jar"</tt> is no longer included in the "lib" folder,
as it is no longer used for loading local JNDI overrides. Of course "CayenneModeler-the-app"
is still included.</li>
	<li>Ashwood library used for commit operation sorting is no longer a third-party dependency.
Instead a small subset of the relevant Ashwood classes got included in Cayenne core.</li>
	<li>The following helper modules are split away from Cayenne core: <tt>"cayenne-project"</tt>
and <tt>"cayenne-wocompat"</tt>. They are bundled in CayenneModeler, and are available
from the source distribution. They are not included as standalone jars in the binary distribution.</li>
</ul>


<h2><a name="Guideto3.1Features-CayenneConfigurationandDependencyInjectionContainer"></a>Cayenne
Configuration and Dependency Injection Container</h2>

<p>Cayenne 3.1 runtime stack is built around the ideas of Dependency Injection, making
it extremely flexible and easy to extend. This is also the main difference between Cayenne
3.1 and earlier releases. Read more on Cayenne DI container <a href="/confluence/display/CAYDOC/Dependency+Injection+Container"
title="Dependency Injection Container">here</a>.</p>

<h3><a name="Guideto3.1Features-ConfiguringLocalDataSources%2CRemovalofJNDIHack"></a>Configuring
Local DataSources, Removal of JNDI Hack</h3>

<p>Cayenne 3.1 provides a property-based mechanism to override Modeler DataSource definitions,
regardless of whether they are driver configurations, JNDI, DBCP, etc. A quick configuration
example is shown below:</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>-Dcayenne.jdbc.driver=com.mysql.jdbc.Driver -Dcayenne.jdbc.url=jdbc:mysql://localhost/mydb
\
-Dcayenne.jdbc.username=user -Dcayenne.jdbc.password=password</pre>
</div></div>

<p>For more details and configuration options see javadocs of <tt>org.apache.cayenne.configuration.server.PropertyDataSourceFactory</tt>.
</p>

<p>This feature supersedes what was formerly known as "JNDI hack", i.e. JNDI DataSource
failover load strategy based on CayenneModeler preferences database. The problem with JNDI
hack was unstable and frequently corrupted preferences database, and the need to include hsqldb
and cayenne-modeler jars in the runtime. </p>


    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href="https://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
        </div>
        <a href="https://cwiki.apache.org/confluence/display/CAYDOC/Guide+to+3.1+Features">View
Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=8552555&revisedVersion=5&originalVersion=4">View
Changes</a>
                |
        <a href="https://cwiki.apache.org/confluence/display/CAYDOC/Guide+to+3.1+Features?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message