Modified: websites/production/db/content/jdo/team-list.html ============================================================================== --- websites/production/db/content/jdo/team-list.html (original) +++ websites/production/db/content/jdo/team-list.html Mon Jan 21 04:23:17 2013 @@ -1,9 +1,9 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<!-- Generated by Apache Maven Doxia Site Renderer 1.3 at Jan 16, 2013 --> +<!-- Generated by Apache Maven Doxia Site Renderer 1.3 at Jan 20, 2013 --> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <title>Maven - + <title>JDO - Project Team</title> <style type="text/css" media="all"> @import url("./css/maven-base.css"); @@ -12,7 +12,7 @@ </style> <link rel="stylesheet" href="./css/print.css" type="text/css" media="print" /> <meta name="author" content="Apache JDO Development Team" /> - <meta name="Date-Revision-yyyymmdd" content="20130116" /> + <meta name="Date-Revision-yyyymmdd" content="20130120" /> <meta http-equiv="Content-Language" content="en" /> </head> @@ -31,7 +31,13 @@ <div id="breadcrumbs"> - <div class="xright"> <a href="http://wiki.apache.org/jdo" class="externalLink" title="Wiki">Wiki</a> + <div class="xright"> <a href="https://www.facebook.com/JavaDataObjects" class="externalLink" title="Facebook">Facebook</a> + | + <a href="https://twitter.com/JavaDataObjects" class="externalLink" title="Twitter">Twitter</a> + | + <a href="https://plus.google.com/106584233526334524963" class="externalLink" title="Google+">Google+</a> + | + <a href="http://wiki.apache.org/jdo" class="externalLink" title="Wiki">Wiki</a> | <a href="http://issues.apache.org/jira/secure/BrowseProject.jspa?id=10630" class="externalLink" title="Issue Tracker">Issue Tracker</a> | @@ -204,71 +210,71 @@ </div> <div id="bodyColumn"> <div id="contentBox"> - <!-- Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You under the Apache License, Version 2.0 -(the "License"); you may not use this file except in compliance with -the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. --> - - - -<div class="section"><h2>The Apache JDO Team<a name="The_Apache_JDO_Team"></a></h2> - -<p> - The people listed below have made significant contributions to JDO by - working long and hard to make quality software for the rest of the world to - use. -</p> - -<p> - If you would like to contribute to JDO, please see the - <a href="roadmap.html">roadmap</a> list to find areas where you - can contribute. - If there is nothing in there that suits your interest, but you still have - ideas, please feel free to suggest them on the mailing list. -</p> -<p> - If you would like to become a committer, please see - <a href="get-involved.html">Get Involved</a>. -</p> - -</div> -<div class="section"><h2>Apache JDO Committers<a name="Apache_JDO_Committers"></a></h2> -<table border="0" class="bodyTable"> -<tr class="a"><th>Name</th><th>Organization</th></tr> -<tr class="b"><td>Matthew Adams</td><td>SpringSource</td></tr> -<tr class="a"><td>Erik Bengtson</td><td>JPOX</td></tr> -<tr class="b"><td>Michael Bouschen</td><td>Tech@Spree</td></tr> -<tr class="a"><td>Michelle Caisse</td><td>Sun Microsystems, Inc.</td></tr> -<tr class="b"><td>Andy Jefferson</td><td>DataNucleus</td></tr> -<tr class="a"><td>Patrick Linskey</td><td>Oracle</td></tr> -<tr class="b"><td>Geir Magnusson Jr.</td><td>IBM</td></tr> -<tr class="a"><td>Brian McCallister</td><td></td></tr> -<tr class="b"><td>Craig Russell</td><td>Sun Microsystems, Inc.</td></tr> -<tr class="a"><td>Dain Sundstrom</td><td></td></tr> -<tr class="b"><td>Brian Topping</td><td></td></tr> -<tr class="a"><td>Michael Watzek</td><td>Tech@Spree</td></tr> -<tr class="b"><td>Martin Zaun</td><td>Sun Microsystems, Inc.</td></tr> -</table> -</div> - -<div class="section"><h2>Apache JDO Contributors<a name="Apache_JDO_Contributors"></a></h2> -<table border="0" class="bodyTable"> -<tr class="a"><th>Name</th><th>Organization</th></tr> -<tr class="b"><td>Chris Beams</td><td>SpringSource</td></tr> -<tr class="a"><td>Ilan Kirsch</td><td>ObjectDB</td></tr> -</table> -</div> - + <!-- Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. --> + + + +<div class="section"><h2>The Apache JDO Team<a name="The_Apache_JDO_Team"></a></h2> + +<p> + The people listed below have made significant contributions to JDO by + working long and hard to make quality software for the rest of the world to + use. +</p> + +<p> + If you would like to contribute to JDO, please see the + <a href="roadmap.html">roadmap</a> list to find areas where you + can contribute. + If there is nothing in there that suits your interest, but you still have + ideas, please feel free to suggest them on the mailing list. +</p> +<p> + If you would like to become a committer, please see + <a href="get-involved.html">Get Involved</a>. +</p> + +</div> +<div class="section"><h2>Apache JDO Committers<a name="Apache_JDO_Committers"></a></h2> +<table border="0" class="bodyTable"> +<tr class="a"><th>Name</th><th>Organization</th></tr> +<tr class="b"><td>Matthew Adams</td><td>SpringSource</td></tr> +<tr class="a"><td>Erik Bengtson</td><td>JPOX</td></tr> +<tr class="b"><td>Michael Bouschen</td><td>Tech@Spree</td></tr> +<tr class="a"><td>Michelle Caisse</td><td>Sun Microsystems, Inc.</td></tr> +<tr class="b"><td>Andy Jefferson</td><td>DataNucleus</td></tr> +<tr class="a"><td>Patrick Linskey</td><td>Oracle</td></tr> +<tr class="b"><td>Geir Magnusson Jr.</td><td>IBM</td></tr> +<tr class="a"><td>Brian McCallister</td><td></td></tr> +<tr class="b"><td>Craig Russell</td><td>Sun Microsystems, Inc.</td></tr> +<tr class="a"><td>Dain Sundstrom</td><td></td></tr> +<tr class="b"><td>Brian Topping</td><td></td></tr> +<tr class="a"><td>Michael Watzek</td><td>Tech@Spree</td></tr> +<tr class="b"><td>Martin Zaun</td><td>Sun Microsystems, Inc.</td></tr> +</table> +</div> + +<div class="section"><h2>Apache JDO Contributors<a name="Apache_JDO_Contributors"></a></h2> +<table border="0" class="bodyTable"> +<tr class="a"><th>Name</th><th>Organization</th></tr> +<tr class="b"><td>Chris Beams</td><td>SpringSource</td></tr> +<tr class="a"><td>Ilan Kirsch</td><td>ObjectDB</td></tr> +</table> +</div> + </div> </div>
Modified: websites/production/db/content/jdo/transactions.html ============================================================================== --- websites/production/db/content/jdo/transactions.html (original) +++ websites/production/db/content/jdo/transactions.html Mon Jan 21 04:23:17 2013 @@ -1,9 +1,9 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<!-- Generated by Apache Maven Doxia Site Renderer 1.3 at Jan 16, 2013 --> +<!-- Generated by Apache Maven Doxia Site Renderer 1.3 at Jan 20, 2013 --> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <title>Maven - + <title>JDO - Transactions</title> <style type="text/css" media="all"> @import url("./css/maven-base.css"); @@ -11,7 +11,7 @@ @import url("./css/site.css"); </style> <link rel="stylesheet" href="./css/print.css" type="text/css" media="print" /> - <meta name="Date-Revision-yyyymmdd" content="20130116" /> + <meta name="Date-Revision-yyyymmdd" content="20130120" /> <meta http-equiv="Content-Language" content="en" /> </head> @@ -30,7 +30,13 @@ <div id="breadcrumbs"> - <div class="xright"> <a href="http://wiki.apache.org/jdo" class="externalLink" title="Wiki">Wiki</a> + <div class="xright"> <a href="https://www.facebook.com/JavaDataObjects" class="externalLink" title="Facebook">Facebook</a> + | + <a href="https://twitter.com/JavaDataObjects" class="externalLink" title="Twitter">Twitter</a> + | + <a href="https://plus.google.com/106584233526334524963" class="externalLink" title="Google+">Google+</a> + | + <a href="http://wiki.apache.org/jdo" class="externalLink" title="Wiki">Wiki</a> | <a href="http://issues.apache.org/jira/secure/BrowseProject.jspa?id=10630" class="externalLink" title="Issue Tracker">Issue Tracker</a> | @@ -203,51 +209,51 @@ </div> <div id="bodyColumn"> <div id="contentBox"> - - - <div class="section"><h2>Transactions<a name="Transactions"></a></h2> - <p> - When managing the persistence of objects using a <a href="pm.html">PersistenceManager</a> - it is normal to handle all datastore operations in a transaction. For this reason each - <i>PersistenceManager</i> has its own transaction. Consequently a typical JDO persistence method - will look something like this - </p> - <div class="source"><pre> -PersistenceManager pm = pmf.getPersistenceManager(); -Transaction tx = pm.currentTransaction(); -try -{ - tx.begin(); // Start the PM transaction - - ... perform some persistence operations - - tx.commit(); // Commit the PM transaction -} -finally -{ - if (tx.isActive()) - { - tx.rollback(); // Error occurred so rollback the PM transaction - } -}</pre></div> - <p> - JDO supports the two main forms of transaction - </p> - <ul> - <li>Transactions can lock all records in a datastore and keep them locked until they are - ready to commit their changes. These are known as Pessimistic (or datastore) - Transactions</li> - <li>Transactions can simply assume that things in the datastore will not change until they - are ready to commit, not lock any records and then just before committing make a check - for changes. These are known as Optimistic Transactions.</li> - </ul> - <p> - You select the type of transaction to be used by a <i>PersistenceManager</i> (PM) either by - setting the PMF property <b>javax.jdo.option.Optimistic</b>, or on the transaction you call - </p> - <div class="source"><pre>pm.currentTransaction().setOptimistic(true);</pre></div> - </div> - + + + <div class="section"><h2>Transactions<a name="Transactions"></a></h2> + <p> + When managing the persistence of objects using a <a href="pm.html">PersistenceManager</a> + it is normal to handle all datastore operations in a transaction. For this reason each + <i>PersistenceManager</i> has its own transaction. Consequently a typical JDO persistence method + will look something like this + </p> + <div class="source"><pre> +PersistenceManager pm = pmf.getPersistenceManager(); +Transaction tx = pm.currentTransaction(); +try +{ + tx.begin(); // Start the PM transaction + + ... perform some persistence operations + + tx.commit(); // Commit the PM transaction +} +finally +{ + if (tx.isActive()) + { + tx.rollback(); // Error occurred so rollback the PM transaction + } +}</pre></div> + <p> + JDO supports the two main forms of transaction + </p> + <ul> + <li>Transactions can lock all records in a datastore and keep them locked until they are + ready to commit their changes. These are known as Pessimistic (or datastore) + Transactions</li> + <li>Transactions can simply assume that things in the datastore will not change until they + are ready to commit, not lock any records and then just before committing make a check + for changes. These are known as Optimistic Transactions.</li> + </ul> + <p> + You select the type of transaction to be used by a <i>PersistenceManager</i> (PM) either by + setting the PMF property <b>javax.jdo.option.Optimistic</b>, or on the transaction you call + </p> + <div class="source"><pre>pm.currentTransaction().setOptimistic(true);</pre></div> + </div> + </div> </div> Modified: websites/production/db/content/jdo/why_jdo.html ============================================================================== --- websites/production/db/content/jdo/why_jdo.html (original) +++ websites/production/db/content/jdo/why_jdo.html Mon Jan 21 04:23:17 2013 @@ -1,9 +1,9 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<!-- Generated by Apache Maven Doxia Site Renderer 1.3 at Jan 16, 2013 --> +<!-- Generated by Apache Maven Doxia Site Renderer 1.3 at Jan 20, 2013 --> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <title>Maven - + <title>JDO - Why JDO ?</title> <style type="text/css" media="all"> @import url("./css/maven-base.css"); @@ -11,7 +11,7 @@ @import url("./css/site.css"); </style> <link rel="stylesheet" href="./css/print.css" type="text/css" media="print" /> - <meta name="Date-Revision-yyyymmdd" content="20130116" /> + <meta name="Date-Revision-yyyymmdd" content="20130120" /> <meta http-equiv="Content-Language" content="en" /> </head> @@ -30,7 +30,13 @@ <div id="breadcrumbs"> - <div class="xright"> <a href="http://wiki.apache.org/jdo" class="externalLink" title="Wiki">Wiki</a> + <div class="xright"> <a href="https://www.facebook.com/JavaDataObjects" class="externalLink" title="Facebook">Facebook</a> + | + <a href="https://twitter.com/JavaDataObjects" class="externalLink" title="Twitter">Twitter</a> + | + <a href="https://plus.google.com/106584233526334524963" class="externalLink" title="Google+">Google+</a> + | + <a href="http://wiki.apache.org/jdo" class="externalLink" title="Wiki">Wiki</a> | <a href="http://issues.apache.org/jira/secure/BrowseProject.jspa?id=10630" class="externalLink" title="Issue Tracker">Issue Tracker</a> | @@ -203,164 +209,164 @@ </div> <div id="bodyColumn"> <div id="contentBox"> - - - <div class="section"><h2>Why JDO ?<a name="Why_JDO_"></a></h2> - <p> - The majority of applications need to persist (or store) data during their lifecycle. - There are many ways of doing this with an application written in Java. - </p> - <ul> - <li>If your datastore is RDBMS you can handle the persistence (and retrieval) of data yourself - using <b>JDBC</b>. Obviously with this route you have the burden of having to write the - persistence layer yourself. This gives much control, but also creates significant work, - both in writing the code but also in testing and maintenance.</li> - <li>You can use <b>JDO</b>, a standardised persistence API. With <b>JDO</b> you can develop - plain old java objects (POJOs) and persist them as they are transparently. This requires - very little work from the developer. It allows persistence to any type of datastore in - principle, being designed with flexibility and datastore agnositicity in mind. - This has been a standard since 2002 (JDO1), being upgraded in 2006 (JDO2) and - is in the process of being developed further (JDO2.1) by Apache JDO</li> - <li>You can use <b>JPA</b>, a standardised persistence API, and part of the EJB3 specification. This also allows you to - to develop plain old Java objects (POJOs) and persist them using a standardised API. It's specification - is not as mature or as feature rich as the JDO API, nor does it provide the flexibility - of using any type of datastore. This was released in 2006 (JPA1) to supercede EJB2. It really - only allows persistence to RDBMS datastores. If you want to persist to other datastores - you should consider JDO.</li> - <li><i>If you are stuck with using an EJB2.* architecture you could use Entity Beans. This - means that you hand off your objects to the EJB part of the J2EE server. This simplifies - things for the developer in some respect but places major restrictions in that your objects - have to be Entity Beans.</i></li> - <li>You can also use a proprietary persistence API (e.g Hibernates own API, TopLinks own API, iBatis, Castor etc). - The disadvantages of going this route are that you cannot easily swap to an alternative - implementation of the API if you hit problems with your software choice.</li> - </ul> - <p> - To give a <i>guide</i>, here are a few important consideration points when choosing a persistence layer for your application. - </p> - - <table border="0" class="bodyTable"> - <tr class="a"> - <th>Feature</th> - <th width="100">JDBC</th> - <th width="100">JDO</th> - <th width="100">JPA</th> - <th width="100">EJB2</th> - <th width="100">Custom ORM</th> - </tr> - <tr class="b"> - <td>Standards-Driven</td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_error_sml.gif" alt="" border="0" /></td> - </tr> - <tr class="a"> - <td>Choice of datastores</td> - <td><img src="images/icon_error_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_error_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_error_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - </tr> - <tr class="b"> - <td>Support POJOs</td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_error_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - </tr> - <tr class="a"> - <td>Usable in J2SE</td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_error_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - </tr> - <tr class="b"> - <td>Usable in J2EE</td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - </tr> - <tr class="a"> - <td>Out of box implementation (1)</td> - <td><img src="images/icon_error_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_error_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - </tr> - <tr class="b"> - <td>Simple to unit test</td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_error_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - </tr> - <tr class="a"> - <td>Dynamic queries</td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /> (2)</td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_error_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - </tr> - <tr class="b"> - <td>Comprehensive ORM</td> - <td><img src="images/icon_warning_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_warning_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_error_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - </tr> - <tr class="a"> - <td>Primary Key generation</td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /> (2)</td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - </tr> - <tr class="b"> - <td>Supports inherited objects</td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /> (2)</td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - </tr> - <tr class="a"> - <td>Schema Creation</td> - <td><img src="images/icon_error_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - </tr> - <tr class="b"> - <td>Existing schema</td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> - </tr> - </table> - <ol style="list-style-type: decimal"> - <li>refers to whether it is necessary to write the persistence yourself (e.g as with JDBC) or - whether you can just persist by simple calls.</li> - <li>requires the developer to write this layer.</li> - </ol> - </div> - - + + + <div class="section"><h2>Why JDO ?<a name="Why_JDO_"></a></h2> + <p> + The majority of applications need to persist (or store) data during their lifecycle. + There are many ways of doing this with an application written in Java. + </p> + <ul> + <li>If your datastore is RDBMS you can handle the persistence (and retrieval) of data yourself + using <b>JDBC</b>. Obviously with this route you have the burden of having to write the + persistence layer yourself. This gives much control, but also creates significant work, + both in writing the code but also in testing and maintenance.</li> + <li>You can use <b>JDO</b>, a standardised persistence API. With <b>JDO</b> you can develop + plain old java objects (POJOs) and persist them as they are transparently. This requires + very little work from the developer. It allows persistence to any type of datastore in + principle, being designed with flexibility and datastore agnositicity in mind. + This has been a standard since 2002 (JDO1), being upgraded in 2006 (JDO2) and + is in the process of being developed further (JDO2.1) by Apache JDO</li> + <li>You can use <b>JPA</b>, a standardised persistence API, and part of the EJB3 specification. This also allows you to + to develop plain old Java objects (POJOs) and persist them using a standardised API. It's specification + is not as mature or as feature rich as the JDO API, nor does it provide the flexibility + of using any type of datastore. This was released in 2006 (JPA1) to supercede EJB2. It really + only allows persistence to RDBMS datastores. If you want to persist to other datastores + you should consider JDO.</li> + <li><i>If you are stuck with using an EJB2.* architecture you could use Entity Beans. This + means that you hand off your objects to the EJB part of the J2EE server. This simplifies + things for the developer in some respect but places major restrictions in that your objects + have to be Entity Beans.</i></li> + <li>You can also use a proprietary persistence API (e.g Hibernates own API, TopLinks own API, iBatis, Castor etc). + The disadvantages of going this route are that you cannot easily swap to an alternative + implementation of the API if you hit problems with your software choice.</li> + </ul> + <p> + To give a <i>guide</i>, here are a few important consideration points when choosing a persistence layer for your application. + </p> + + <table border="0" class="bodyTable"> + <tr class="a"> + <th>Feature</th> + <th width="100">JDBC</th> + <th width="100">JDO</th> + <th width="100">JPA</th> + <th width="100">EJB2</th> + <th width="100">Custom ORM</th> + </tr> + <tr class="b"> + <td>Standards-Driven</td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_error_sml.gif" alt="" border="0" /></td> + </tr> + <tr class="a"> + <td>Choice of datastores</td> + <td><img src="images/icon_error_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_error_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_error_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + </tr> + <tr class="b"> + <td>Support POJOs</td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_error_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + </tr> + <tr class="a"> + <td>Usable in J2SE</td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_error_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + </tr> + <tr class="b"> + <td>Usable in J2EE</td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + </tr> + <tr class="a"> + <td>Out of box implementation (1)</td> + <td><img src="images/icon_error_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_error_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + </tr> + <tr class="b"> + <td>Simple to unit test</td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_error_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + </tr> + <tr class="a"> + <td>Dynamic queries</td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /> (2)</td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_error_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + </tr> + <tr class="b"> + <td>Comprehensive ORM</td> + <td><img src="images/icon_warning_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_warning_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_error_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + </tr> + <tr class="a"> + <td>Primary Key generation</td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /> (2)</td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + </tr> + <tr class="b"> + <td>Supports inherited objects</td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /> (2)</td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + </tr> + <tr class="a"> + <td>Schema Creation</td> + <td><img src="images/icon_error_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + </tr> + <tr class="b"> + <td>Existing schema</td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + <td><img src="images/icon_success_sml.gif" alt="" border="0" /></td> + </tr> + </table> + <ol style="list-style-type: decimal"> + <li>refers to whether it is necessary to write the persistence yourself (e.g as with JDBC) or + whether you can just persist by simple calls.</li> + <li>requires the developer to write this layer.</li> + </ol> + </div> + + </div> </div>