Author: allee8285
Date: Wed Nov 28 17:55:42 2012
New Revision: 1414843
URL: http://svn.apache.org/viewvc?rev=1414843&view=rev
Log:
CMS migration updates.
Added:
openjpa/site/trunk/content/artifacts/OpenJPAWebAppTutorial.zip (with props)
openjpa/site/trunk/content/images/image001.jpg (with props)
openjpa/site/trunk/content/images/image002.jpg (with props)
openjpa/site/trunk/content/images/image003.jpg (with props)
openjpa/site/trunk/content/images/image004.jpg (with props)
openjpa/site/trunk/content/images/image005.jpg (with props)
openjpa/site/trunk/content/images/image006.jpg (with props)
openjpa/site/trunk/content/images/image007.jpg (with props)
openjpa/site/trunk/content/images/image008.jpg (with props)
openjpa/site/trunk/content/images/image009.jpg (with props)
openjpa/site/trunk/content/images/image010.jpg (with props)
openjpa/site/trunk/content/images/image011.jpg (with props)
openjpa/site/trunk/content/images/image012.jpg (with props)
openjpa/site/trunk/content/images/image013.jpg (with props)
openjpa/site/trunk/content/images/image014.jpg (with props)
openjpa/site/trunk/content/images/image015.jpg (with props)
openjpa/site/trunk/content/images/image016.jpg (with props)
openjpa/site/trunk/content/images/image017.jpg (with props)
openjpa/site/trunk/content/images/image018.jpg (with props)
openjpa/site/trunk/content/images/image019.jpg (with props)
openjpa/site/trunk/content/images/image020.jpg (with props)
openjpa/site/trunk/content/images/image021.jpg (with props)
openjpa/site/trunk/content/images/image022.jpg (with props)
openjpa/site/trunk/content/images/image023.jpg (with props)
openjpa/site/trunk/content/images/image024.jpg (with props)
openjpa/site/trunk/content/images/image025.jpg (with props)
openjpa/site/trunk/content/images/image026.jpg (with props)
openjpa/site/trunk/content/images/image027.jpg (with props)
Modified:
openjpa/site/trunk/WhoIsWorkingOnWhat.txt
openjpa/site/trunk/content/begin-using-openjpa---the-basics.mdtext
openjpa/site/trunk/content/samples.mdtext
Modified: openjpa/site/trunk/WhoIsWorkingOnWhat.txt
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/WhoIsWorkingOnWhat.txt?rev=1414843&r1=1414842&r2=1414843&view=diff
==============================================================================
--- openjpa/site/trunk/WhoIsWorkingOnWhat.txt (original)
+++ openjpa/site/trunk/WhoIsWorkingOnWhat.txt Wed Nov 28 17:55:42 2012
@@ -10,7 +10,7 @@ done automated-builds.mdtext
done banner.mdtext
done bean-validation-primer.mdtext
done beginners-performance-guide.mdtext
- begin-using-openjpa---the-basics.mdtext
+done begin-using-openjpa---the-basics.mdtext
done build-and-runtime-dependencies.mdtext
done building-and-running-openbooks.mdtext
done building.mdtext
Added: openjpa/site/trunk/content/artifacts/OpenJPAWebAppTutorial.zip
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/artifacts/OpenJPAWebAppTutorial.zip?rev=1414843&view=auto
==============================================================================
Binary file - no diff available.
Propchange: openjpa/site/trunk/content/artifacts/OpenJPAWebAppTutorial.zip
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Modified: openjpa/site/trunk/content/begin-using-openjpa---the-basics.mdtext
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/begin-using-openjpa---the-basics.mdtext?rev=1414843&r1=1414842&r2=1414843&view=diff
==============================================================================
--- openjpa/site/trunk/content/begin-using-openjpa---the-basics.mdtext (original)
+++ openjpa/site/trunk/content/begin-using-openjpa---the-basics.mdtext Wed Nov 28 17:55:42 2012
@@ -1,5 +1,6 @@
Title: Begin using OpenJPA - The Basics
<a name="BeginusingOpenJPA-TheBasics-Introduction"></a>
+
# Introduction
OpenJPA is an open source implementation of the Java JPA (Java Persistence
@@ -10,7 +11,7 @@ that blends with the programming methods
tailor database queries for a particular database. However, JPA also
supports native SQL which can be used for quick ports with a known backend
database. This tutorial is designed to walk you through the steps of
-setting up a simple {color:black}web application{color} to use OpenJPA
+setting up a simple web application to use OpenJPA
Geronimo and to transact the derby database that comes with Geronimo. The
tutorial code uses a simple Java Server Page (JSP), backed up by some basic
classes. It displays a table of inventory items and categories. In this
@@ -25,27 +26,27 @@ the IDE and Microsoft Windows as the ope
<a name="BeginusingOpenJPA-TheBasics-Prerequisites"></a>
## Prerequisites
-*Geronimo V2.2:* You can get it [here](http://www.apache.org/dyn/closer.cgi/geronimo/2.2/geronimo-tomcat6-javaee5-2.2-bin.zip)
+**Geronimo V2.2:** You can get it [here](http://www.apache.org/dyn/closer.cgi/geronimo/2.2/geronimo-tomcat6-javaee5-2.2-bin.zip)
. Download this file and unzip it to a permanent location. There is no
installer. The server will run from the command line.
-*Java (J2SE) V1.6:* This tutorial was developed and tested with Java V1.6.
+**Java (J2SE) V1.6:** This tutorial was developed and tested with Java V1.6.
If you don't already have Java V1.6 you can get the IBM JDK [here](http://www.ibm.com/developerworks/java/jdk/)
- or the Sun JDK [here|https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/ViewProductDetail-Start?ProductRef=jdk-6u16-oth-JPR@CDS-CDS_Developer]
+ or the Sun JDK [here](https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/ViewProductDetail-Start?ProductRef=jdk-6u16-oth-JPR@CDS-CDS_Developer)
.
-*Eclipse V3.2 or later:* This version has annotation support included.
+**Eclipse V3.2 or later:** This version has annotation support included.
Annotations play a large role in OpenJPA. [Download](http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/galileo/SR1/eclipse-jee-galileo-SR1-win32.zip)
Eclipse 3.2 or later.
-*Apache OpenJPA library:* For the purpose of implementing this tutorial you
+**Apache OpenJPA library:** For the purpose of implementing this tutorial you
can select
OpenJPA v1.2 or greater. You can download [Apache OpenJPA](http://openjpa.apache.org/downloads.html)
from the Apache site. Note that the Milestone (openjpa-all-2.0.0-M3.jar as
of this writing) is an early release of OpenJPA 2.0 and may have some
instabilities. No issues have been noted for the usage in this tutorial.
-*The tutorial code files*: [These files](^openjpawebapptutorial.zip|attached-source-files.html)
+*The tutorial code files*: [These files](artifacts/OpenJPAWebAppTutorial.zip)
are provided with this tutorial. You will add them to your Eclipse
project.
@@ -66,224 +67,140 @@ your Eclipse environment is updated and
not know how to do that, follow the instructions found at the [Geronimo website](http://geronimo.apache.org/geronimo-eclipse-plugin-installation-instructions.html)
.
-1. Create a new Java project in Eclipse called, *"OpenJPATutorial"*.
-1. * From the menu, select: *File->New->Enterprise Application Project*. (If
-*Enterprise Application Project* is not available as an option, select
-*Project* and then choose *Enterprise Application Project* from the
-list. Then click on the *Next* button).
+1. Create a new Java project in Eclipse called, **"OpenJPATutorial"**.
+
+ * From the menu, select: **File->New->Enterprise Application Project**. (If
+**Enterprise Application Project** is not available as an option, select
+**Project** and then choose **Enterprise Application Project** from the
+list. Then click on the **Next** button).
When the New Project settings dialog appears, use the following settings:
+
+ <img src="images/image001.jpg"/>
+1. Under the **Target Runtime** section, select **Apache Geronimo v2.2**.
+
+ * If you do not already have Geronimo setup in Eclipse then you will have
+to do so now. Click on the **New...** button.
+ * If Apache Geronimo v2.2 does not appear in the list under **Apache**,
+click the **Download additional server adapters** link at the top right of
+the dialog. If the adapter does not appear in that list then follow the [directions from the Geronimo site](http://geronimo.apache.org/geronimo-eclipse-plugin-installation-instructions.html).
+
+ <img src="images/image002.jpg"/>
+ * Select **Apache->Apache Geronimo v2.2**
+ * Click **Next**.
+ <img src="images/image003.jpg"/>
+ * Set the JRE to **jre6** if it is not already set.
+ * Browse for the install directory of Geronimo v2.2 on your system.
+ * Click **Finish**. You should see the following:
+ <img src="images/image001.jpg"/>
-1. Under the *Target Runtime* section, select *Apache Geronimo v2.2*.
-1. * If you do not already have Geronimo setup in Eclipse then you will have
-to do so now. Click on the *New...* button.
-1. * If Apache Geronimo v2.2 does not appear in the list under *Apache*,
-click the *Download additional server adapters* link at the top right of
-the dialog. If the adapter does not appear in that list then follow the [directions from the Geronimo site](http://geronimo.apache.org/geronimo-eclipse-plugin-installation-instructions.html)
-.
-
-
-
-
-
-
-1. * Select *Apache->Apache Geronimo v2.2*
-1. * Click *Next*.
-
-
-
-
-
-
-1. * Set the JRE to *jre6* if it is not already set.
-1. * Browse for the install directory of Geronimo v2.2 on your system.
-1. * Click *Finish*. You should see the following:
-
-
-
-
-
-
-1. Now, click the *Next* button. You should see this:
-
-
-
-
-
-
-1. * Check the *Generate application.xml deployment descriptor* option.
-1. * Click the *New Module...* button:
-
-
-
-
-
-
-1. * De-select *Create default modules*.
-1. * Select the *Web* option.
-1. * Click *Next*.
-
-
-
-
-
-
-1. * Click *Finish*. You will see the following:
-
-
+1. Now, click the **Next** button. You should see this:
+ <img src="images/image004.jpg"/>
+ * Check the **Generate application.xml deployment descriptor** option.
+ * Click the **New Module...** button:
+ <img src="images/image005.jpg"/>
-1. * Click *Finish*.
+ * De-select **Create default modules**.
+ * Select the **Web** option.
+ * Click **Next**.
+ <img src="images/image006.jpg"/>
+ * Click **Finish**. You will see the following:
+
+ <img src="images/image007.jpg"/>
+
+ * Click **Finish**.
1. Now, your Project Explorer should look like this (partially expanded):
+ <img src="images/image008.jpg"/>
+
-
-
-
-
-1. * If you double-click on the *Deployment Descriptor: OpenJPATutorial*, you
+ * If you double-click on the **Deployment Descriptor: OpenJPATutorial**, you
should see the application.xml open:
-
-
-
-
+ <img src="images/image009.jpg"/>
1. Now we will bring in the sample code. The easiest way to add the sample
code is to find the source provided with this tutorial and copy it to
-the src folder under the *OpenJPATutorialWeb* folder in your project
+the src folder under the **OpenJPATutorialWeb** folder in your project
directory in Windows Explorer:
+ <img src="images/image010.jpg"/>
-
-
-
-
-1. * Now go back to Eclipse. Right-click on the *OpenJPATutorialWeb* folder
-in the Project Explorer view and select *Refresh,* or press the *F5* key on
+ * Now go back to Eclipse. Right-click on the **OpenJPATutorialWeb** folder
+in the Project Explorer view and select **Refresh,** or press the **F5** key on
your keyboard. Now you will see this:
+ <img src="images/image011.jpg"/>
-
-
-
-
-Notice that all the source files compile without error. That is because
+ Notice that all the source files compile without error. That is because
Geronimo comes with OpenJPA v1.1 built in.
+1. Now copy the index.jsp file from the tutorial into the Web Content directory under the Project directory in Windows Explorer:
+ <img src="images/image012.jpg"/>
+ * Got to the Project Explorer and refresh the project. You should see this:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ <img src="images/image013.jpg"/>
<a name="BeginusingOpenJPA-TheBasics-RunningandConfiguringGeronimoandDerby"></a>
## Running and Configuring Geronimo and Derby
Geronimo has no installer and runs from the command line. Here are some
quick instructions to get you started.
-1. In Windows, open a command prompt and navigate to the Geronimo *bin*
+
+1. In Windows, open a command prompt and navigate to the Geronimo **bin**
directory.
1. Type the command:
- start-server
-
-
-
-
-
-
-
-Press the *Enter* key.
-
-
-
-
+ start-server
+ <img src="images/image014.jpg"/>
+
+ Press the *Enter* key.
+
+ <img src="images/image015.jpg"/>
1. Open a web browser and go to the address:
+ <http://localhost:8080/console>
+ <img src="images/image016.jpg"/>
-
-
-
-
-
-
-
-
-
-
-
-The default password is _manager_.
-
-
-
+ The default password is _manager_.
1. You will come to the Welcome page. On the left menu, at the bottom, find
the section for the Embedded DB. This is the Derby database control
page.
+
+ <img src="images/image017.jpg"/>
-
-
-
-
-
-
-
-1. {color:black}Click on the link for the{color} {color:black}{*}DB
-Manager{*}{color}{color:black}.{color}
-1. You will see two sections: *DB Viewer* and *Run SQL*.
+1. Click on the link for the **DB Manager**
+1. You will see two sections: **DB Viewer** and **Run SQL**.
1. In the Run SQL section, in the text field labeled Create DB, type in
-*StoreSystem*. This is the name of the database that the OpenJPA sample is
+**StoreSystem**. This is the name of the database that the OpenJPA sample is
configured to transact.
+ <img src="images/image018.jpg"/>
+1. Click on the **Create** button. You should now see the
+**StoreSystem** database appear in
+the **DB Viewer** section.
+ <img src="images/image019.jpg"/>
-
-
-
-
-1. {color:black}Click on the{color} {color:black}{*}Create{*}{color}
-{color:black}button. You should now see the{color}
-{color:black}{*}StoreSystem{*}{color} {color:black}database appear in
-the{color}{color:black}{*}DB Viewer{*}{color} {color:black}section{color}.
-
-
-
-
-
-
-
-
-1. {color:black}We are now ready to deploy and run the sample code.{color}
-
-
-
+1. We are now ready to deploy and run the sample code.
<a name="BeginusingOpenJPA-TheBasics-RunningandDeployingtheSampleCodeinGeronimo"></a>
## Running and Deploying the Sample Code in Geronimo
@@ -293,93 +210,58 @@ inventory database program that shows it
simple example requires the ability to add, edit and delete entries. It
requires the ability to sort and filter database queries and it requires
the identification of the relationship of the items to the categories. In
-this example, the relationship is *one to many*. Knowing that relationship
+this example, the relationship is **one to many**. Knowing that relationship
is important to how the code is written. Before we analyze the code and
OpenJPA, we will first deploy the sample and see it work. To deploy the
sample code follow these instructions:
+
1. In Eclipse, in the Project Explorer, right click on the OpenJPATutorial
-project and select: *Export->EAR file*.
-
-
-
-
-
-
+project and select: **Export->EAR file**.
+ <img src="images/image020.jpg"/>
1. In the Ear Export dialog, find a convenient place to put the
exported EAR file.
-1. Check the *Overwrite existing file* check box.
-
+1. Check the **Overwrite existing file** check box.
+ <img src="images/image021.jpg"/>
-
-
-
-
-
-1. Click *Finish*.
-1. Go out to Windows Explorer and copy the file *TutorialDeploymentPlan.xml*
+1. Click **Finish**.
+1. Go out to Windows Explorer and copy the file **TutorialDeploymentPlan.xml**
to the location of the exported ear. This is the deployment plan that
Geronimo requires to deploy the application.
-
-
-
-
-
-
+ <img src="images/image022.jpg"/>
1. Open the Geronimo console in a web browser and log in.
-1. In the Console Navigation menu on the left, under the *Applications*
-section, click on the *Deploy New* item.
+1. In the Console Navigation menu on the left, under the **Applications**
+section, click on the **Deploy New** item.
1. Browse to the location of the exported EAR file and the deployment plan
XML file.
+ <img src="images/image023.jpg"/>
+1. Click on the **Install** button. You should see this.
+ <img src="images/image024.jpg"/>
-
-
-
-
-1. Click on the *Install* button. You should see this.
-
-
-
-
-
-
-
-
-1. In the Console Navigation menu on the left, under the *Applications*
-section, click on the *Web App WARs* item.
-1. * Notice that the OpenJPATutorial application is now listed and that there
+1. In the Console Navigation menu on the left, under the **Applications**
+section, click on the **Web App WARs** item.
+ * Notice that the OpenJPATutorial application is now listed and that there
is a clickable link under the URL heading:
+ <img src="images/image025.jpg"/>
+1. Click on the link **OpenJPATutorial** and now you should see this:
+ <img src="images/image026.jpg"/>
-
-
-
-
-1. Click on the link *OpenJPATutorial* and now you should see this:
-
-
-
-
-
-
-
-
-Each of the buttons will execute OpenJPA code. The lists are filled by
+ Each of the buttons will execute OpenJPA code. The lists are filled by
running queries on the Derby database.
-1. # Add a some categories and items
-1. # Make sure you test each of the buttons and see the results.
-
-
+ * Add a some categories and items
+ * Make sure you test each of the buttons and see the results.
+
<a name="BeginusingOpenJPA-TheBasics-ExaminingtheSampleCode"></a>
# Examining the Sample Code
@@ -390,307 +272,303 @@ source code is provided for this tutoria
customizations. However, you have the option of reproducing the code
manually using the following explanations. Whichever method you choose,
locate the code that corresponds to explanations as you follow along.
+
* Java code: This tutorial comes with the following java source files:
-** index.jsp: This is the interface code only. It does call into other
+ * index.jsp: This is the interface code only. It does call into other
classes but it does not use any OpenJPA code directly.
-** InventoryEntityBroker.java: This class contains methods that
+ * InventoryEntityBroker.java: This class contains methods that
encapsulate the OpenJPA handling code. It is provided as a way to separate
OpenJPA functionality from the web interface.
-** InventoryItem.java: This is an OpenJPA Entity class file. This file is
+ * InventoryItem.java: This is an OpenJPA Entity class file. This file is
an example of a simple OpenJPA Entity with a relationship.
-** InventoryCategory.java: This is an OpenJPA Entity class file. This file
+ * InventoryCategory.java: This is an OpenJPA Entity class file. This file
is an example of a simple OpenJPA Entity with a relationship.
* Persistence code: Each entity concept that would be a database table will
be its own class. In this case, the tables are called "InventoryItem" and
"InventoryCategory". Annotations in the Java file will associate the
properties with the database columns. The annotation,
-{color:#646464}@Column{color}, maps the property name to the column name
+<font color="#646464">@Column</font>, maps the property name to the column name
for synchronization with the database. If the table corresponding tables do
not exist, OpenJPA can use these annotations to create the tables' schema
dynamically based on the property type and length.
-<DIV class="code panel" style="border-style: solid;border-width: 1px;"><DIV class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><B>InventoryCategory.java|borderStyle=solid</B></DIV><DIV class="codeContent panelContent">
- package tutorial;
- import java.util.List;
-
- import javax.persistence.CascadeType;
- import javax.persistence.Column;
- import javax.persistence.Entity;
- import javax.persistence.GeneratedValue;
- import javax.persistence.GenerationType;
- import javax.persistence.Id;
- import javax.persistence.OneToMany;
- import javax.persistence.Version;
-
- @Entity
- public class InventoryCategory
- {
- private int version;
- private int id;
-
- private String categoryName;
- private String categoryDescription;
-
- List<InventoryItem> items;
-
- public InventoryCategory(){}
-
- @Column(name = "categoryName")
- public String getCategoryName()
- {
- return categoryName;
- }
-
- public void setCategoryName(String name)
- {
- this.categoryName = name;
- }
-
- @Column(name = "itemDescription")
- public String getCategoryDescription()
- {
- return categoryDescription;
- }
-
- public void setCategoryDescription(String description)
- {
- this.categoryDescription = description;
- }
-
- @Version
- @Column(name = "version_field")
- // not required
- public int getVersion()
- {
- return version;
- }
-
- public void setVersion(int version)
- {
- this.version = version;
- }
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- public int getId()
- {
- return id;
- }
-
- public void setId(int id)
- {
- this.id = id;
- }
-
- @OneToMany(targetEntity=tutorial.InventoryItem.class,
- cascade=CascadeType.ALL,
- mappedBy="category")
- public List<InventoryItem> getItems()
- {
- return items;
- }
-
- public void setItems(List<InventoryItem> items)
- {
- this.items = items;
- }
-
- public void addItem(InventoryItem item)
- {
- this.items.add(item);
- }
- }
+ <DIV style="border-style: solid;border-width: 0px;"><DIV style="border-bottom-width: 1px;border-bottom-style: solid;"><B>InventoryCategory.java</B></DIV>
-
-
-{info:title=Note}
+ package tutorial;
+ import java.util.List;
+
+ import javax.persistence.CascadeType;
+ import javax.persistence.Column;
+ import javax.persistence.Entity;
+ import javax.persistence.GeneratedValue;
+ import javax.persistence.GenerationType;
+ import javax.persistence.Id;
+ import javax.persistence.OneToMany;
+ import javax.persistence.Version;
+
+ @Entity
+ public class InventoryCategory
+ {
+ private int version;
+ private int id;
+
+ private String categoryName;
+ private String categoryDescription;
+
+ List<InventoryItem> items;
+
+ public InventoryCategory(){}
+
+ @Column(name = "categoryName")
+ public String getCategoryName()
+ {
+ return categoryName;
+ }
+
+ public void setCategoryName(String name)
+ {
+ this.categoryName = name;
+ }
+
+ @Column(name = "itemDescription")
+ public String getCategoryDescription()
+ {
+ return categoryDescription;
+ }
+
+ public void setCategoryDescription(String description)
+ {
+ this.categoryDescription = description;
+ }
+
+ @Version
+ @Column(name = "version_field")
+ // not required
+ public int getVersion()
+ {
+ return version;
+ }
+
+ public void setVersion(int version)
+ {
+ this.version = version;
+ }
+
+ @Id
+ @GeneratedValue(strategy = GenerationType.AUTO)
+ public int getId()
+ {
+ return id;
+ }
+
+ public void setId(int id)
+ {
+ this.id = id;
+ }
+
+ @OneToMany(targetEntity=tutorial.InventoryItem.class,
+ cascade=CascadeType.ALL,
+ mappedBy="category")
+ public List<InventoryItem> getItems()
+ {
+ return items;
+ }
+
+ public void setItems(List<InventoryItem> items)
+ {
+ this.items = items;
+ }
+
+ public void addItem(InventoryItem item)
+ {
+ this.items.add(item);
+ }
+ }
+ </div>
+
+ <table class="info"><tr>
+ <td valign="top"> <IMG src="images/information.gif" width="16" height="16" border="0">
+ <td> <B>Note</B><BR>
In this example, the property annotations (
-{color:#646464}@Column{color},{color:#646464}@Version{color}, and
-{color:#646464}@Id{color}) are placed on the getter methods. They can
+<font color="#646464">@Column, @Version</font>, and
+<font color="#646464">@Id</font>) are placed on the getter methods. They can
alternatively be placed on the property declarations. For more information
on these annotations and to see what other annotations are in OpenJPA, see
-the [Apache OpenJPA 2.0 User's Guide: Chapter 5](http://openjpa.apache.org/builds/latest/docs/manual/jpa_overview_meta.html)
-* The annotated class and property declarations are all that are required.
-* The {color:#646464}*@Id{*}{color} annotation is needed as the unique
+the <a href="http://openjpa.apache.org/builds/latest/docs/manual/jpa_overview_meta.html">Apache OpenJPA 2.0 User's Guide: Chapter 5</a>
+<ul>
+<li> The annotated class and property declarations are all that are required.
+<li> The <font color="#646464">@Id</font> annotation is needed as the unique
identifier (primary key) for each record.
-* The {color:#646464}*@Version{*}{color} annotation is common practice. It
+<li> The <font color="#646464">@Version</font> annotation is common practice. It
ensures data integrity during merges and acts as an optimistic concurrency
control.
-* Every property must have both a getter and a setter and the standard case
+<li> Every property must have both a getter and a setter and the standard case
convention must be observed.
- °
-Correct: {color:#7f0055}{*}public{*}{color}
-{color:#7f0055}{*}void{*}{color} {color:black}setCategoryName(String
-name){color}
- °
-Incorrect: {color:#7f0055}{*}public{*}{color}
-{color:#7f0055}{*}void{*}{color} {color:black}setcategoryname(String
-name){color}
-{info}
-
-
+ �
+<ul>
+<li>Correct: <font color="#7f0055">public void</font> setCategoryName(String name)
+ �
+<li>Incorrect: <font color="#7f0055">public void setcategoryname(String name)
+</ul>
+</ul>
+</tr></table>
+
+
* Persistence.xml: JPA requires the use of a XML file called the
"persistence.xml" that describes how to access the data. The XML file must
be created in the META-INF directory. The META-INF directory containing the
persistence.xml must be located with the source files.
+ <img src="images/image027.jpg"/>
+ In the following example, the file only requires a few fields.
-
-
-
-
-
-In the following example, the file only requires a few fields.
-
-
-
-
-{code:xml|title=META-INF/persistence.xml|borderStyle=solid}
-<persistence xmlns=http://java.sun.com/xml/ns/persistence
- xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
- version="1.0">
- <persistence-unit name="InventorySystem"
-transaction-type="RESOURCE_LOCAL">
- <class>tutorial.InventoryItem</class>
- <class>tutorial.InventoryCategory</class>
- <properties>
- <property name="openjpa.jdbc.SynchronizeMappings"
-value="buildSchema"/>
- <property name="openjpa.ConnectionURL"
-value="jdbc:derby://localhost:1527/StoreSystem"/>
- <property name="openjpa.ConnectionDriverName"
-value="org.apache.derby.jdbc.ClientDriver"/>
- </properties>
- </persistence-unit>
-</persistence>
-
- \\
- \\
- * The following elements are specific to this tutorial:
- ** *persistence-unit*: the *name* is the table name to bind. In this case
+ <DIV style="border-style:solid;border-width: 0px;"><DIV style="border-bottom-width: 1px;border-bottom-style: solid;"><B>META-INF/persistence.xml</B></DIV>
+
+ <persistence xmlns=http://java.sun.com/xml/ns/persistence
+ xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
+ version="1.0">
+ <persistence-unit name="InventorySystem" transaction-type="RESOURCE_LOCAL">
+ <class>tutorial.InventoryItem</class>
+ <class>tutorial.InventoryCategory</class>
+ <properties>
+ <property name="openjpa.jdbc.SynchronizeMappings"
+ value="buildSchema"/>
+ <property name="openjpa.ConnectionURL"
+ value="jdbc:derby://localhost:1527/StoreSystem"/>
+ <property name="openjpa.ConnectionDriverName"
+ value="org.apache.derby.jdbc.ClientDriver"/>
+ </properties>
+ </persistence-unit>
+ </persistence>
+ </div>
+
+* The following elements are specific to this tutorial:
+ * **persistence-unit**: the **name** is the table name to bind. In this case
it is 'person'.
- ** *class*: the java class that is bound to the table 'person'.
- ** *property:* openjpa.jdbc.SynchronizeMappings: This tells OpenJPA to
+ * **class**: the java class that is bound to the table 'person'.
+ * **property:** openjpa.jdbc.SynchronizeMappings: This tells OpenJPA to
automatically create the table with the class definition if a table does
not already exist.
- ** *property:* openjpa.ConnectionURL: The URL of the database connection.
- ** *property:* openjpa.ConnectionDriverName: the class name of the JDBC
+ * **property:** openjpa.ConnectionURL: The URL of the database connection.
+ * **property:** openjpa.ConnectionDriverName: the class name of the JDBC
driver for Derby. This must be available via the classpath. In this
tutorial, the driver is built into Geronimo so no extra actions are needed.
- * A complete explanation of the persistence.xml is in the [Apache OpenJPAV2.0 user's Guide: Chapter 6|http://openjpa.apache.org/builds/latest/docs/manual/jpa_overview_persistence.html]
-\\
- \\
- * Create the Entity Manager. In the provided code, the EntityManager is a
+* A complete explanation of the persistence.xml is in the [Apache OpenJPAV2.0 user's Guide: Chapter 6](http://openjpa.apache.org/builds/latest/docs/manual/jpa_overview_persistence.html)
+
+* Create the Entity Manager. In the provided code, the EntityManager is a
property of the InventoryEntityBroker class. The Entity Manager controls
the interaction with the database. You must use the Entity Manager to start
or access transactions or to send queries.
- ** The following code must be added before using any of the persistence
+ * The following code must be added before using any of the persistence
APIs (If you are using the provided sample code, this is already included):
- {code:java}
- EntityManagerFactory factory =
-Persistence.createEntityManagerFactory("InventorySystem",
- System.getProperties());
-
- EntityManager em = factory.createEntityManager();
-** Note that the name, {color:#2a00ff}"InventorySystem"{color}, is the same
+ EntityManagerFactory factory = Persistence.
+ createEntityManagerFactory("InventorySystem", System.getProperties());
+
+ EntityManager em = factory.createEntityManager();
+
+ * Note that the name, **"InventorySystem"**, is the same
one identified in the persistence.xml.
-** This code can be placed just before a query or transaction or they can
+ * This code can be placed just before a query or transaction or they can
be class properties.
-** Regardless of the scope, the EntityManager and the EntityManagerFactory
+ * Regardless of the scope, the EntityManager and the EntityManagerFactory
should be closed when they are no longer needed:
-
-{code:java}
-...
-em.close();
-factory.close();
-...
+ ...
+ em.close();
+ factory.close();
+ ...
- ** The EntityManagerFactory and EntityManager full descriptions are in the
+ * The EntityManagerFactory and EntityManager full descriptions are in the
following OpenJPA documentation:
- *** EntityManagerFactory: [http://openjpa.apache.org/builds/latest/docs/manual/jpa_overview_emfactory.html|http://openjpa.apache.org/builds/latest/docs/manual/jpa_overview_emfactory.html]
- *** EntityManager: [http://openjpa.apache.org/builds/latest/docs/manual/jpa_overview_em.html|http://openjpa.apache.org/builds/latest/docs/manual/jpa_overview_em.html]
+ * EntityManagerFactory: <http://openjpa.apache.org/builds/latest/docs/manual/jpa_overview_emfactory.html>
+ * EntityManager: <http://openjpa.apache.org/builds/latest/docs/manual/jpa_overview_em.html>
- * DB interface class. In this example, the InventoryEntityBroker class
+* DB interface class. In this example, the InventoryEntityBroker class
contains all the OpenJPA database interaction code. This is not required
but it is a good idea for keeping the functionality componentized. For
example, if you want to pull all of the records from the InventoryItem
table, the code would look like this:
- \\
- {code:java|title=InventoryEntityBroker.java}
- ...
- List<Person> getAllItems()
- {
- Query q = em.createQuery("SELECT item FROM InventoryItem item");
-
- return (List<InventoryItem>)q.getResultList();
- }
- ...
-
-{code:java|title=index.jsp}
-...
-List<InventoryItem> itemList = getAllItems();
-...
- ** All of the specific APIs are described in the OpenJPA [javadoc|http:/openjpa.apache.org/builds/latest/docs/javadoc/index.html]
- ** Notice that the Query is not standard SQL. It is actually JPQL, which is
+ <DIV style="border-style:solid;border-width: 0px;"><DIV style="border-bottom-width: 1px;border-bottom-style: solid;"><B>InventoryEntityBroker.java</B></DIV>
+
+ ...
+ List<Person> getAllItems()
+ {
+ Query q = em.createQuery("SELECT item FROM InventoryItem item");
+
+ return (List<InventoryItem>)q.getResultList();
+ }
+ ...
+ </div>
+
+ <DIV style="border-style:solid;border-width: 0px;"><DIV style="border-bottom-width: 1px;border-bottom-style: solid;"><B>index.jsp</B></DIV>
+
+ ...
+ List<InventoryItem> itemList = getAllItems();
+ ...
+ </div>
+
+ * All of the specific APIs are described in the OpenJPA [javadoc](http:/openjpa.apache.org/builds/latest/docs/javadoc/index.html)
+ * Notice that the Query is not standard SQL. It is actually JPQL, which is
a specialized form of query language specifically designed for JPA.
- **- In the JPQL statement, "{color:#2a00ff}SELECT item FROM InventoryItem
-item{color}", notice that InventoryItem has the same case as the class
+ * In the JPQL statement, "<font color="#2a00ff">SELECT item FROM InventoryItem
+item</font>", notice that InventoryItem has the same case as the class
InventoryItem.
- **- JPQL uses java objects in the query and not the database table names.
+ * JPQL uses java objects in the query and not the database table names.
The statement identifies the variable for InventoryItem as
-"{color:#2a00ff}item{color}".
- **- JPQL provides an object oriented query language that is independent of
+"<font color="#2a00ff">item</font>".
+ * JPQL provides an object oriented query language that is independent of
the database being queried. So, regardless of which database being
used, the JPQL does not change. The JPA runtime takes care of doing
the translation from the object world to the desired relational database.
- **- For more information on JPQL, check out this [Java Persistence Querly Language reference.|http://java.sun.com/javaee/5/docs/tutorial/backup/update3/doc/QueryLanguage.html]
-\\
- \\
- * Also in the InventoryEntityBroker is code to add entries the database
+ * For more information on JPQL, check out this [Java Persistence Query Language reference](http://java.sun.com/javaee/5/docs/tutorial/backup/update3/doc/QueryLanguage.html)
+
+* Also in the InventoryEntityBroker is code to add entries the database
tables. Since you did not create a table for InventoryItem in the
StoreSystem database in Derby, OpenJPA 2.0 will create the table the first
time an _"add"_ is attempted.
- ** Consider the following code:
- {code:java|title=InventoryEntityBroker}
- ...
- void addItem(String name, String description, float price, int categoryID)
- {
- InventoryItem item = new InventoryItem();
- item.setName(name);
- item.setDescription(description);
- ...
+ * Consider the following code:
- em.persist(item);
- }
- ...
+ <DIV style="border-style:solid;border-width: 0px;"><DIV style="border-bottom-width: 1px;border-bottom-style: solid;"><B>InventoryEntityBroker</B></DIV>
+
+ ...
+ void addItem(String name, String description, float price, int categoryID)
+ {
+ InventoryItem item = new InventoryItem();
+ item.setName(name);
+ item.setDescription(description);
+ ...
+
+ em.persist(item);
+ }
+ ...
+ </div>
-You can then call the addItem() method in another part of the code. The
+ You can then call the addItem() method in another part of the code. The
EntityManager.persist() method will throw an exception if a transaction has
not been started. The transaction must be committed by calling the
Transaction.commit() method after all updates have been applied or else the
changes will not be saved to the database:
- ...
- em.getTransaction().begin();
-
- addItem(...);
-
- em.getTransaction().commit();
- ...
+ ...
+ em.getTransaction().begin();
+
+ addItem(...);
+
+ em.getTransaction().commit();
+ ...
-*** When this is executed the first time it will use the annotations to
+ * When this is executed the first time it will use the annotations to
create the Person table, then OpenJPA 2.0 will populate it with the
provided data.
-*** Note the use of the getTransaction() method to start an update and then
+ * Note the use of the getTransaction() method to start an update and then
to commit it. The concept is the same as in any database transaction
processing.
-*** Also note that while the getAllItems() function requires a JPQL SELECT
+ * Also note that while the getAllItems() function requires a JPQL SELECT
query, the update type actions have APIs.
-*** Take a look in the InventoryEntityBroker code at the addItem(),
+ * Take a look in the InventoryEntityBroker code at the addItem(),
updateItem() and deleteItem() functions and note the simplicity of these
operations.
@@ -700,55 +578,62 @@ and many to many. OpenJPA provides annot
fields.
Open the source file, InventoryCategory.java in Eclipse and find the
following code:
-{code:java|title=InventoryCategory.java}
-...
-@OneToMany(targetEntity=tutorial.InventoryItem.class,
- cascade=CascadeType.ALL,
- mappedBy="category")
-public List<InventoryItem> getItems()
-{
- return items;
-}
-...
- ** The annotation {color:#646464}@OneToMany{color} identifies that:
- *** This object has a one-to-many relationship with
+ <DIV style="border-style:solid;border-width: 0px;"><DIV style="border-bottom-width: 1px;border-bottom-style: solid;"><B>InventoryCategory.java</B></DIV>
+
+ ...
+ @OneToMany(targetEntity=tutorial.InventoryItem.class,
+ cascade=CascadeType.ALL,
+ mappedBy="category")
+ public List<InventoryItem> getItems()
+ {
+ return items;
+ }
+ ...
+
+ * The annotation <font color="#646464">@OneToMany</font> identifies that:
+ * This object has a one-to-many relationship with
targetEntity=tutorial.InventoryItem.class. Meaning that one
InventoryCategory can have many InventoryItems associated with it.
- *** {color:black}The property of InventoryItem that specifies the
+ * The property of InventoryItem that specifies the
InventoryCategory it is associated with is mappedBy="category". In other
words, InventoryItem has a class property of type InventoryCategory named
-"category".{color}\\ {color:black}Now open the source file,
-InventoryItem.java and find the following code:{color}
- {code:java|title=InventoryItem.java}
- ...
- @ManyToOne
- @JoinColumn(name="CAT_ID", nullable=false)
- public InventoryCategory getCategory()
- {
- return category;
- }
- ...
+"category".\\ Now open the source file,
+InventoryItem.java and find the following code:
+
+ <DIV style="border-style:solid;border-width: 0px;"><DIV style="border-bottom-width: 1px;border-bottom-style: solid;"><B>InventoryItem.java</B></DIV>
+
+ ...
+ @ManyToOne
+ @JoinColumn(name="CAT_ID", nullable=false)
+ public InventoryCategory getCategory()
+ {
+ return category;
+ }
+ ...
-*** {color:black}The annotation @ManyToOne identifies that:{color}
-*** This object has a many-to-one relationship with the InventoryCategory
+ * The annotation @ManyToOne identifies that:
+ * This object has a many-to-one relationship with the InventoryCategory
object. Meaning that there many InventoryItems can reference the same
InventoryCategory
-** The annotation {color:#646464}@JoinColumn{color} identifies that:
-*** The column in the database table that holds the InventoryCategory
+
+ * The annotation <font color="#646464">@JoinColumn</font> identifies that:
+ * The column in the database table that holds the InventoryCategory
reference by the attribute:
-{color:black}name={color}{color:#2a00ff}"CAT_ID"{color}.
-
+name=<font color="##2a00ff">"CAT_ID"</font>.
-{info:title=Remember}
+<table class="info"><tr>
+ <td valign="top"> <IMG src="images/information.gif" width="16" height="16" border="0">
+ <td> <B>Remember</B><BR>
These annotations contribute to the creation of the tables and the
relationships. It is important to put as much thought into how these
objects relate to each other as you would if you were designing the
database tables because you are designing the database tables.
You can see more about the relationship annotations at the Apache OpenJPA
-site. The [documentation is here](http://openjpa.apache.org/builds/latest/docs/manual/jpa_overview_meta_field.html)
+site. The <a href="http://openjpa.apache.org/builds/latest/docs/manual/jpa_overview_meta_field.html">documentation is here</a>
.
-{info}
+</tr></table>
+
<a name="BeginusingOpenJPA-TheBasics-Summary"></a>
# Summary
@@ -760,8 +645,11 @@ The purpose of this was to be a primer.
and database, we went through the creation of a persistence.xml file, the
basics of the OpenJPA Entity, and EntityManager and some of the
functionality.
-*{+}Exercises{+}*
+
+**Exercises**
+
Using this sample code as a base, try to do some of the following:
+
* Add additional fields to the InventoryItem Entity.
* Create a Customer Entity and establish a one-to-many relationship with
the InventoryItems as one customer having purchased many items.
@@ -769,8 +657,8 @@ the InventoryItems as one customer havin
could have been purchased by many customers, use the documentation to
create a many-to-many relationship using @ManyToMany*.
-~\*To make these changes you may have to delete the existing database
-tables so that they can recreated with the new relationship fields.~
+\*To make these changes you may have to delete the existing database
+tables so that they can recreated with the new relationship fields.
@@ -778,27 +666,27 @@ tables so that they can recreated with t
<a name="BeginusingOpenJPA-TheBasics-References"></a>
# References
-* *Java J2SE 1.6*
-** [Download](https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/ViewProductDetail-Start?ProductRef=jdk-6u16-oth-JPR@CDS-CDS_Developer)
+* **Java J2SE 1.6**
+ * [Download](https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/ViewProductDetail-Start?ProductRef=jdk-6u16-oth-JPR@CDS-CDS_Developer)
* *
-* *Apache Sources*
-** *Geronimo*
-**- [Geronimo Homepage](http://geronimo.apache.org/)
-**- [Geronimo V2.2 Server Documentation](http://cwiki.apache.org/GMOxDOC22/documentation.html)
-**- [Geronimo V2.2 Server download](http://www.apache.org/dyn/closer.cgi/geronimo/2.2/geronimo-tomcat6-javaee5-2.2-bin.zip)
-** *JPA*
-**- [Apache OpenJPA home page](http://openjpa.apache.org/)
-**- [Apache OpenJPA download](http://openjpa.apache.org/downloads.html)
-**- [Apache OpenJPA documentation](http://openjpa.apache.org/documentation.html)
+* **Apache Sources**
+ * **Geronimo**
+ * [Geronimo Homepage](http://geronimo.apache.org/)
+ * [Gernimo V2.2 Server Documentation](http://cwiki.apache.org/GMOxDOC22/documentation.html)
+ * [Geronimo V2.2 Server download](http://www.apache.org/dyn/closer.cgi/geronimo/2.2/geronimo-tomcat6-javaee5-2.2-bin.zip)
+ * **JPA**
+ * [Apache OpenJPA home page](http://openjpa.apache.org/)
+ * [Apache OpenJPA download](http://openjpa.apache.org/downloads.html)
+ * [Apache OpenJPA documentation](http://openjpa.apache.org/documentation.html)
-* *Annotations*
-** [Documentation for Java Annotations](http://java.sun.com/j2se/1.5.0/docs/guide/language/annotations.html)
-* *JPQL*
-** [A reference for JPQL](http://java.sun.com/javaee/5/docs/tutorial/backup/update3/doc/QueryLanguage.html)
-* *Blogs*
-** [Discussion on The Server Side](http://www.theserverside.com/news/thread.tss?thread_id=58343)
-** [Websphere & OpenJPA blog on blogspot](http://bit.ly/WASJPAblog)
-** [JPA Blog on developerWorks](http://bit.ly/JPATutApachedwBlog)
-* *Implementation Sites*
-** [IBM WebSphere Application Server V7 Java Persistence API (JPA) 2.0 Open Beta](http://bit.ly/BetaSiteApache)
+* **Annotations**
+ * [Documentation for Java Annotations](http://java.sun.com/j2se/1.5.0/docs/guide/language/annotations.html)
+* **JPQL**
+ * [A reference for JPQL](http://java.sun.com/javaee/5/docs/tutorial/backup/update3/doc/QueryLanguage.html)
+* **Blogs**
+ * [Discussion on The Server Side](http://www.theserverside.com/news/thread.tss?thread_id=58343)
+ * [Websphere & OpenJPA blog on blogspot](http://bit.ly/WASJPAblog)
+ * [JPA Blog on developerWorks](http://bit.ly/JPATutApachedwBlog)
+* **Implementation Sites**
+ * [IBM WebSphere Application Server V7 Java Persistence API (JPA) 2.0 Open Beta](http://bit.ly/BetaSiteApache)
Added: openjpa/site/trunk/content/images/image001.jpg
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/images/image001.jpg?rev=1414843&view=auto
==============================================================================
Binary file - no diff available.
Propchange: openjpa/site/trunk/content/images/image001.jpg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: openjpa/site/trunk/content/images/image002.jpg
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/images/image002.jpg?rev=1414843&view=auto
==============================================================================
Binary file - no diff available.
Propchange: openjpa/site/trunk/content/images/image002.jpg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: openjpa/site/trunk/content/images/image003.jpg
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/images/image003.jpg?rev=1414843&view=auto
==============================================================================
Binary file - no diff available.
Propchange: openjpa/site/trunk/content/images/image003.jpg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: openjpa/site/trunk/content/images/image004.jpg
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/images/image004.jpg?rev=1414843&view=auto
==============================================================================
Binary file - no diff available.
Propchange: openjpa/site/trunk/content/images/image004.jpg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: openjpa/site/trunk/content/images/image005.jpg
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/images/image005.jpg?rev=1414843&view=auto
==============================================================================
Binary file - no diff available.
Propchange: openjpa/site/trunk/content/images/image005.jpg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: openjpa/site/trunk/content/images/image006.jpg
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/images/image006.jpg?rev=1414843&view=auto
==============================================================================
Binary file - no diff available.
Propchange: openjpa/site/trunk/content/images/image006.jpg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: openjpa/site/trunk/content/images/image007.jpg
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/images/image007.jpg?rev=1414843&view=auto
==============================================================================
Binary file - no diff available.
Propchange: openjpa/site/trunk/content/images/image007.jpg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: openjpa/site/trunk/content/images/image008.jpg
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/images/image008.jpg?rev=1414843&view=auto
==============================================================================
Binary file - no diff available.
Propchange: openjpa/site/trunk/content/images/image008.jpg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: openjpa/site/trunk/content/images/image009.jpg
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/images/image009.jpg?rev=1414843&view=auto
==============================================================================
Binary file - no diff available.
Propchange: openjpa/site/trunk/content/images/image009.jpg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: openjpa/site/trunk/content/images/image010.jpg
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/images/image010.jpg?rev=1414843&view=auto
==============================================================================
Binary file - no diff available.
Propchange: openjpa/site/trunk/content/images/image010.jpg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: openjpa/site/trunk/content/images/image011.jpg
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/images/image011.jpg?rev=1414843&view=auto
==============================================================================
Binary file - no diff available.
Propchange: openjpa/site/trunk/content/images/image011.jpg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: openjpa/site/trunk/content/images/image012.jpg
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/images/image012.jpg?rev=1414843&view=auto
==============================================================================
Binary file - no diff available.
Propchange: openjpa/site/trunk/content/images/image012.jpg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: openjpa/site/trunk/content/images/image013.jpg
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/images/image013.jpg?rev=1414843&view=auto
==============================================================================
Binary file - no diff available.
Propchange: openjpa/site/trunk/content/images/image013.jpg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: openjpa/site/trunk/content/images/image014.jpg
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/images/image014.jpg?rev=1414843&view=auto
==============================================================================
Binary file - no diff available.
Propchange: openjpa/site/trunk/content/images/image014.jpg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: openjpa/site/trunk/content/images/image015.jpg
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/images/image015.jpg?rev=1414843&view=auto
==============================================================================
Binary file - no diff available.
Propchange: openjpa/site/trunk/content/images/image015.jpg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: openjpa/site/trunk/content/images/image016.jpg
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/images/image016.jpg?rev=1414843&view=auto
==============================================================================
Binary file - no diff available.
Propchange: openjpa/site/trunk/content/images/image016.jpg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: openjpa/site/trunk/content/images/image017.jpg
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/images/image017.jpg?rev=1414843&view=auto
==============================================================================
Binary file - no diff available.
Propchange: openjpa/site/trunk/content/images/image017.jpg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: openjpa/site/trunk/content/images/image018.jpg
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/images/image018.jpg?rev=1414843&view=auto
==============================================================================
Binary file - no diff available.
Propchange: openjpa/site/trunk/content/images/image018.jpg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: openjpa/site/trunk/content/images/image019.jpg
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/images/image019.jpg?rev=1414843&view=auto
==============================================================================
Binary file - no diff available.
Propchange: openjpa/site/trunk/content/images/image019.jpg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: openjpa/site/trunk/content/images/image020.jpg
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/images/image020.jpg?rev=1414843&view=auto
==============================================================================
Binary file - no diff available.
Propchange: openjpa/site/trunk/content/images/image020.jpg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: openjpa/site/trunk/content/images/image021.jpg
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/images/image021.jpg?rev=1414843&view=auto
==============================================================================
Binary file - no diff available.
Propchange: openjpa/site/trunk/content/images/image021.jpg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: openjpa/site/trunk/content/images/image022.jpg
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/images/image022.jpg?rev=1414843&view=auto
==============================================================================
Binary file - no diff available.
Propchange: openjpa/site/trunk/content/images/image022.jpg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: openjpa/site/trunk/content/images/image023.jpg
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/images/image023.jpg?rev=1414843&view=auto
==============================================================================
Binary file - no diff available.
Propchange: openjpa/site/trunk/content/images/image023.jpg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: openjpa/site/trunk/content/images/image024.jpg
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/images/image024.jpg?rev=1414843&view=auto
==============================================================================
Binary file - no diff available.
Propchange: openjpa/site/trunk/content/images/image024.jpg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: openjpa/site/trunk/content/images/image025.jpg
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/images/image025.jpg?rev=1414843&view=auto
==============================================================================
Binary file - no diff available.
Propchange: openjpa/site/trunk/content/images/image025.jpg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: openjpa/site/trunk/content/images/image026.jpg
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/images/image026.jpg?rev=1414843&view=auto
==============================================================================
Binary file - no diff available.
Propchange: openjpa/site/trunk/content/images/image026.jpg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: openjpa/site/trunk/content/images/image027.jpg
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/images/image027.jpg?rev=1414843&view=auto
==============================================================================
Binary file - no diff available.
Propchange: openjpa/site/trunk/content/images/image027.jpg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Modified: openjpa/site/trunk/content/samples.mdtext
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/samples.mdtext?rev=1414843&r1=1414842&r2=1414843&view=diff
==============================================================================
--- openjpa/site/trunk/content/samples.mdtext (original)
+++ openjpa/site/trunk/content/samples.mdtext Wed Nov 28 17:55:42 2012
@@ -15,11 +15,11 @@ For more information on using OpenJPA wi
please see the [Integration](integration.html)
page for more details.
-* [Open JPA Basic Sample and tutorial](openjpa:begin-using-openjpa---the-basics.html)
-* [OpenTrader - a transactional web application featuring how to integrate Google Web Toolkit and OpenJPA ](openjpa:opentrader.html)
-* [OpenBooks - a end-to-end example featuring new JPA 2.0 features in JSE and JEE environments ](openjpa:openbooks---featuring-jpa-2.0.html)
+* [Open JPA Basic Sample and tutorial](begin-using-openjpa---the-basics.html)
+* [OpenTrader - a transactional web application featuring how to integrate Google Web Toolkit and OpenJPA ](opentrader.html)
+* [OpenBooks - a end-to-end example featuring new JPA 2.0 features in JSE and JEE environments ](openbooks---featuring-jpa-2.0.html)
* [Using Criteria API in DayTrader](using-criteria-api-in-daytrader.html)
-* [Bean Validation Primer - A simple example which demonstrates the use Bean Validation with OpenJPA](openjpa:bean-validation-primer.html)
+* [Bean Validation Primer - A simple example which demonstrates the use Bean Validation with OpenJPA](bean-validation-primer.html)
<a name="Samples-OpenJPAANTExamples"></a>
## OpenJPA ANT Examples
|