openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r841236 [12/35] - in /websites/staging/openjpa/trunk/content: ./ artifacts/ css/ images/ images/datacache-plugin/
Date Sun, 09 Dec 2012 13:13:50 GMT
Added: websites/staging/openjpa/trunk/content/enhancement-with-eclipse.html
==============================================================================
--- websites/staging/openjpa/trunk/content/enhancement-with-eclipse.html (added)
+++ websites/staging/openjpa/trunk/content/enhancement-with-eclipse.html Sun Dec  9 13:13:35 2012
@@ -0,0 +1,244 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--
+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.
+-->
+<html lang="en">
+    <head>
+        <META http-equiv="Content-Type" content="text/html;charset=UTF-8" />
+        <link href="http://openjpa.apache.org/styles/site.css" rel="stylesheet" type="text/css"/>
+        <!-- <link href="http://openjpa.apache.org/styles/type-settings.css" rel="stylesheet" type="text/css"/> -->
+        <link href="./css/type-settings.css" rel="stylesheet" type="text/css"/>
+        <LINK rel="schema.DC" href="http://purl.org/DC/elements/1.0/">
+        <META name="Description" content="Apache OpenJPA -- Enhancement with Eclipse
" />
+        <META name="Keywords" content="Apache OpenJPA, JPA, JPA 1.0, JSR-220, JPA2, JPA 2.0, JSR-317, " />
+        <META name="Owner" content="dev@openjpa.apache.org" />
+        <META name="Robots" content="index, follow" />
+        <META name="Security" content="Public" />
+        <META name="Source" content="wiki template" />
+        <META name="DC.Date" scheme="iso8601" content="2010-08-11" />
+        <META name="DC.Language" scheme="rfc1766" content="en" />
+        <META name="DC.Rights" content="Copyright © 2006,2010 The Apache Software Foundation" />
+        <META http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))'/>
+
+        <title>
+            Apache OpenJPA --
+        </title>
+    </head>
+    <body>
+        <div class="white_box">
+            <div class="header">
+                <div class="header_l">
+                    <div class="header_r">
+                    </div>
+                </div>
+            </div>
+            <div class="content">
+                <div class="content_l">
+                    <div class="content_r">
+                        <div>
+                            <!-- Banner -->
+                            <TABLE valign="top" border="0" cellspacing="0" cellpadding="5" width="100%" background="images/header-bg3.png">
+                                <TR>
+                                    <TD valing="top" align="left">
+                                        <A href="http://openjpa.apache.org/"><IMG src="images/openjpa-logo.png" border="0" alt="OpenJPA Logo"></A>
+                                    </TD>
+                                    <TD width="100%">
+                                        &nbsp;
+                                    </TD>
+                                    <TD valing="top" align="right">
+                                        <A href="http://www.apache.org/"><IMG src="images/asf_logo_wide2.png" border="0" alt="ASF Logo"></A>
+                                    </TD>
+                                </TR>
+                            </TABLE>
+
+                            <!-- Navigation Bar -->
+                            <div class="bottom_red_bar">
+                                <div id="site-breadcrumbs">
+                                    <!-- Breadcrumbs --
+                                    <a href="/">Home</a>&nbsp;&raquo&nbsp;<a href="/enhancement-with-eclipse.html">Enhancement with Eclipse
</a>
+                                     -- Breadcrumbs -->
+                                </div>
+                            </div>
+
+                            <!-- Content -->
+                            <table border="0">
+                                <tbody>
+                                    <tr>
+                                        <td valign="top">
+                                            <div class="navigation">
+                                                <div class="navigation_top">
+                                                    <div class="navigation_bottom">
+                                                        <!-- NavigationBar -->
+                                                        <h3><a name="SideNav-Overview"></a><a href="overview.html" title="Overview">Overview</a></h3>
+
+                                                        <ul class="alternate" type="square">
+                                                            <li><a href="quick-start.html" title="Quick Start">Quick Start</a></li>
+                                                            <li><a href="documentation.html" title="Documentation">Documentation</a></li>
+                                                            <li><a href="downloads.html" title="Downloads">Downloads</a></li>
+                                                            <li><a href="site-index.html" title="Site Index">Site Index</a></li>
+                                                            <li><a href="license.html" title="License">License</a></li>
+                                                            <li><a href="privacy-policy.html" title="Privacy Policy">Privacy Policy</a></li>
+                                                        </ul>
+
+                                                        <h3><a name="SideNav-Community"></a><a href="community.html" title="Community">Community</a></h3>
+
+                                                        <ul class="alternate" type="square">
+                                                            <li><a href="index.html#Index-eventsandnews" title="Events and News">Events and News</a></li>
+                                                            <li><a href="found-a-bug.html" title="Found a Bug">Found a Bug</a>?</li>
+                                                            <li><a href="get-involved.html" title="Get Involved">Get Involved</a></li>
+                                                            <li><a href="mailing-lists.html" title="Mailing Lists">Mailing Lists</a></li>
+                                                            <li><a href="committers.html" title="Committers">Committers</a></li>
+                                                            <li><a href="integration.html" title="Integration">Integration</a></li>
+                                                            <li><a href="powered-by.html" title="Powered By">Powered By</a></li>
+                                                            <li><a href="thanks.html" title="Thanks">Thanks</a></li>
+                                                        </ul>
+
+
+                                                        <h3><a name="SideNav-Development"></a><a href="development.html" title="Development">Development</a></h3>
+
+                                                        <ul class="alternate" type="square">
+                                                            <li><a href="http://issues.apache.org/jira/browse/OPENJPA" class="external-link" rel="nofollow">Issue Tracker</a></li>
+                                                            <li><a href="source-code.html" title="Source Code">Source Code</a></li>
+                                                            <li><a href="testing.html" title="Testing">Testing</a></li>
+                                                            <li><a href="tools.html" title="Tools">Tools</a></li>
+                                                            <li><a href="samples.html" title="Samples">Samples</a></li>
+                                                            <li><a href="release-management.html" title="Release Management">Release Management</a></li>
+                                                        </ul>
+
+                                                        <h3>Search</h3>
+
+                                                        <div style="padding: 5px 5px 0px 25px;">
+                                                            <form action="http://www.google.com/search" method="get" style="font-size: 10px;">
+                                                                <input name="ie" type="hidden" value="UTF-8">
+                                                                <input name="oe" type="hidden" value="UTF-8">
+                                                                <input maxlength="255" name="q" size="9" type="text" value=""><br><br>
+                                                                <input name="btnG" type="submit" value="Google">
+                                                                <input name="domains" type="hidden" value="openjpa.apache.org">
+                                                                <input name="sitesearch" type="hidden" value="openjpa.apache.org">
+                                                            </form>
+                                                        </div>
+                                                    </div>
+                                                </div>
+                                            </div>
+                                        </td>
+                                        <td valign="top" width="100%" style="overflow:hidden;">
+                                            <div class="wiki-content">
+                                                <p><a name="EnhancementwithEclipse-EnhancingEntitieswithEclipse"></a></p>
+<h1 id="enhancing-entities-with-eclipse">Enhancing Entities with Eclipse</h1>
+<p>If you are using Eclipse to write and deploy your application, then you
+have two choices for <strong>build time</strong> enhancement of your entities.  But, if
+you're using orm.xml to map the Entities, then you can only use the Custom
+ANT Builder method below, as the OpenJPA Plugin for Eclipse currently does
+not handle that scenario.</p>
+<p><a name="EnhancementwithEclipse-CustomANTBuilder"></a></p>
+<h2 id="custom-ant-builder">Custom ANT Builder</h2>
+<p>For steps documented below, I have the following directory structure. Note,
+these steps must be followed for each project that has Entities that need
+to be enhanced.</p>
+<div class="codehilite"><pre><span class="o">/</span>builder_project
+    enhance.xml <span class="o">&lt;-</span> the OpenJPA builder....
+<span class="o">/</span>bin <span class="o">&lt;-</span> Compile directory
+<span class="o">/</span>src <span class="o">&lt;-</span> Source directory
+<span class="o">/</span>jpa_lib <span class="o">&lt;-</span> OpenJPA binary and all jars from the lib dir of the binary download
+    commons<span class="o">-</span>collections<span class="o">-</span><span class="m">3.2.</span>jar
+    commons<span class="o">-</span>lang<span class="o">-</span><span class="m">2.1.</span>jar
+    commons<span class="o">-</span>pool<span class="o">-</span><span class="m">1.3.</span>jar
+    derby<span class="o">-</span><span class="m">10.2.2.0.</span>jar
+    geronimo<span class="o">-</span>jpa_2.0_spec<span class="o">-</span><span class="m">1.0</span><span class="o">-</span>EA<span class="o">-</span>SNAPSHOT.jar
+    geronimo<span class="o">-</span>jta_1.1_spec<span class="o">-</span><span class="m">1.1.1.</span>jar
+    openjpa<span class="o">-</span><span class="m">2.0.0</span><span class="o">-</span>SNAPSHOT.jar
+    serp<span class="o">-</span><span class="m">1.13.1.</span>jar
+<span class="o">/</span>lib <span class="o">&lt;-</span> other libs
+</pre></div>
+
+
+<ol>
+<li>After you add the <a href="artifacts/enhance.xml">enhance.xml</a>
+ file to your file system, make sure to refresh your Eclipse workspace so
+it knows about the newly added file. Make sure that the enhance.xml file is
+listed in the Navigator view (screenshot #1 below.)</li>
+<li>Right click on the Eclipse project that you want to enhance and click on
+Properties.</li>
+<li>Click on the builders filter, and Create a new Ant builder.</li>
+<li>Name your builder, then click on "Browse Workspace" in the buildfile box.
+If you downloaded the enhance.xml file and refreshed your workspace, it
+should be listed there. If not, go back to step 1 and make sure that
+Eclipse detects your enhance.xml file.</li>
+<li>In the "Base Directory" box, click on the variables button and select
+build_project. This should refer to the root of your project. In the
+directory structure above, it refers to "builder_project".</li>
+<li>In the "Arguments" box you need to add the following properties
+<strong>-Dopenjpa.libs</strong> and <strong>-Dbuild.dir</strong> (see screenshot #2 below.) The
+-Dopenjpa.libs is the path to the OpenJPA libs, relative to the root of the
+project. The -Dbuild.dir is the path to the build directory, relative to
+the root of the project. In the directory structure above, openjpa.libs
+should be set to jpa_lib and build.dir should be set to bin.</li>
+<li>Click on the "Targets" tab along the top.</li>
+<li>You need to set the enhance target to run as a part of "Manual Build" and
+"Auto Build" (see screenshot #3 below.)</li>
+</ol>
+<p><img alt="" src="images/navigator.png" /></p>
+<p><img alt="" src="images/main.png" /></p>
+<p><img alt="" src="images/targets.png" /></p>
+<p><a name="EnhancementwithEclipse-OpenJPAPluginforEclipse"></a></p>
+<h2 id="openjpa-plugin-for-eclipse">OpenJPA Plugin for Eclipse</h2>
+<p>The OpenJPA Eclipse Tooling is a sub-project of the OpenJPA project.  It
+develops IDE tooling for OpenJPA as an Eclipse feature with plug-ins.</p>
+<p><span class="note">
+The OpenJPA Eclipse Tooling does not have an official release as some known work-items still need to be addressed in <a href="https://issues.apache.org/jira/browse/OPENJPA-1412">OPENJPA-1412</a>.</span></p>
+<p><span class="note">There are also some known bugs with the bytecode produced by the eclipse plugin (e.g. <a href="http://issues.apache.org/jira/browse/OPENJPA-1879">OPENJPA-1879</a>, <a href="https://issues.apache.org/jira/browse/OPENJPA-1887">OPENJPA-1887</a>).</span></p>
+<p>Currently it provides an Eclipse Builder for OpenJPA Enhancement.</p>
+<ul>
+<li><a href="openjpaeclipseinstallation.html">How to install the OpenJPA Eclipse Tooling</a></li>
+<li><a href="openjpaeclipseenhancementbuilder.html">How to use the OpenJPA Eclipse Tooling Builder for Bytecode Enhancement</a></li>
+<li><a href="openjpaeclipsetoolingdevandbuild.html">How to develop on and build the OpenJPA Eclipse Tooling</a></li>
+</ul>
+                                            </div>
+                                        </td>
+                                        </tr>
+                                    </tbody>
+                                </table>
+                                <div class="bottom_red_bar"></div>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+                <div class="black_box">
+                    <div class="footer">
+                        <div class="footer_l">
+                            <div class="footer_r">
+                                <div>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+            <div class="design_attribution">
+                Copyright (C) 2006,2012 The Apache Software Foundation. Licensed under <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License 2.0</a>.<br />
+                Apache, the Apache feather logo and OpenJPA are trademarks of The Apache Software Foundation.<br />
+                Other names may be trademarks of their respective owners.<br />
+            </div>
+
+        <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
+        </script>
+        <script type="text/javascript">
+            _uacct = "UA-1940143-1";
+            urchinTracker();
+        </script>
+
+    </body>
+</html>

Added: websites/staging/openjpa/trunk/content/enhancement-with-maven.html
==============================================================================
--- websites/staging/openjpa/trunk/content/enhancement-with-maven.html (added)
+++ websites/staging/openjpa/trunk/content/enhancement-with-maven.html Sun Dec  9 13:13:35 2012
@@ -0,0 +1,265 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--
+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.
+-->
+<html lang="en">
+    <head>
+        <META http-equiv="Content-Type" content="text/html;charset=UTF-8" />
+        <link href="http://openjpa.apache.org/styles/site.css" rel="stylesheet" type="text/css"/>
+        <!-- <link href="http://openjpa.apache.org/styles/type-settings.css" rel="stylesheet" type="text/css"/> -->
+        <link href="./css/type-settings.css" rel="stylesheet" type="text/css"/>
+        <LINK rel="schema.DC" href="http://purl.org/DC/elements/1.0/">
+        <META name="Description" content="Apache OpenJPA -- Enhancement with Maven
" />
+        <META name="Keywords" content="Apache OpenJPA, JPA, JPA 1.0, JSR-220, JPA2, JPA 2.0, JSR-317, " />
+        <META name="Owner" content="dev@openjpa.apache.org" />
+        <META name="Robots" content="index, follow" />
+        <META name="Security" content="Public" />
+        <META name="Source" content="wiki template" />
+        <META name="DC.Date" scheme="iso8601" content="2010-08-11" />
+        <META name="DC.Language" scheme="rfc1766" content="en" />
+        <META name="DC.Rights" content="Copyright © 2006,2010 The Apache Software Foundation" />
+        <META http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))'/>
+
+        <title>
+            Apache OpenJPA --
+        </title>
+    </head>
+    <body>
+        <div class="white_box">
+            <div class="header">
+                <div class="header_l">
+                    <div class="header_r">
+                    </div>
+                </div>
+            </div>
+            <div class="content">
+                <div class="content_l">
+                    <div class="content_r">
+                        <div>
+                            <!-- Banner -->
+                            <TABLE valign="top" border="0" cellspacing="0" cellpadding="5" width="100%" background="images/header-bg3.png">
+                                <TR>
+                                    <TD valing="top" align="left">
+                                        <A href="http://openjpa.apache.org/"><IMG src="images/openjpa-logo.png" border="0" alt="OpenJPA Logo"></A>
+                                    </TD>
+                                    <TD width="100%">
+                                        &nbsp;
+                                    </TD>
+                                    <TD valing="top" align="right">
+                                        <A href="http://www.apache.org/"><IMG src="images/asf_logo_wide2.png" border="0" alt="ASF Logo"></A>
+                                    </TD>
+                                </TR>
+                            </TABLE>
+
+                            <!-- Navigation Bar -->
+                            <div class="bottom_red_bar">
+                                <div id="site-breadcrumbs">
+                                    <!-- Breadcrumbs --
+                                    <a href="/">Home</a>&nbsp;&raquo&nbsp;<a href="/enhancement-with-maven.html">Enhancement with Maven
</a>
+                                     -- Breadcrumbs -->
+                                </div>
+                            </div>
+
+                            <!-- Content -->
+                            <table border="0">
+                                <tbody>
+                                    <tr>
+                                        <td valign="top">
+                                            <div class="navigation">
+                                                <div class="navigation_top">
+                                                    <div class="navigation_bottom">
+                                                        <!-- NavigationBar -->
+                                                        <h3><a name="SideNav-Overview"></a><a href="overview.html" title="Overview">Overview</a></h3>
+
+                                                        <ul class="alternate" type="square">
+                                                            <li><a href="quick-start.html" title="Quick Start">Quick Start</a></li>
+                                                            <li><a href="documentation.html" title="Documentation">Documentation</a></li>
+                                                            <li><a href="downloads.html" title="Downloads">Downloads</a></li>
+                                                            <li><a href="site-index.html" title="Site Index">Site Index</a></li>
+                                                            <li><a href="license.html" title="License">License</a></li>
+                                                            <li><a href="privacy-policy.html" title="Privacy Policy">Privacy Policy</a></li>
+                                                        </ul>
+
+                                                        <h3><a name="SideNav-Community"></a><a href="community.html" title="Community">Community</a></h3>
+
+                                                        <ul class="alternate" type="square">
+                                                            <li><a href="index.html#Index-eventsandnews" title="Events and News">Events and News</a></li>
+                                                            <li><a href="found-a-bug.html" title="Found a Bug">Found a Bug</a>?</li>
+                                                            <li><a href="get-involved.html" title="Get Involved">Get Involved</a></li>
+                                                            <li><a href="mailing-lists.html" title="Mailing Lists">Mailing Lists</a></li>
+                                                            <li><a href="committers.html" title="Committers">Committers</a></li>
+                                                            <li><a href="integration.html" title="Integration">Integration</a></li>
+                                                            <li><a href="powered-by.html" title="Powered By">Powered By</a></li>
+                                                            <li><a href="thanks.html" title="Thanks">Thanks</a></li>
+                                                        </ul>
+
+
+                                                        <h3><a name="SideNav-Development"></a><a href="development.html" title="Development">Development</a></h3>
+
+                                                        <ul class="alternate" type="square">
+                                                            <li><a href="http://issues.apache.org/jira/browse/OPENJPA" class="external-link" rel="nofollow">Issue Tracker</a></li>
+                                                            <li><a href="source-code.html" title="Source Code">Source Code</a></li>
+                                                            <li><a href="testing.html" title="Testing">Testing</a></li>
+                                                            <li><a href="tools.html" title="Tools">Tools</a></li>
+                                                            <li><a href="samples.html" title="Samples">Samples</a></li>
+                                                            <li><a href="release-management.html" title="Release Management">Release Management</a></li>
+                                                        </ul>
+
+                                                        <h3>Search</h3>
+
+                                                        <div style="padding: 5px 5px 0px 25px;">
+                                                            <form action="http://www.google.com/search" method="get" style="font-size: 10px;">
+                                                                <input name="ie" type="hidden" value="UTF-8">
+                                                                <input name="oe" type="hidden" value="UTF-8">
+                                                                <input maxlength="255" name="q" size="9" type="text" value=""><br><br>
+                                                                <input name="btnG" type="submit" value="Google">
+                                                                <input name="domains" type="hidden" value="openjpa.apache.org">
+                                                                <input name="sitesearch" type="hidden" value="openjpa.apache.org">
+                                                            </form>
+                                                        </div>
+                                                    </div>
+                                                </div>
+                                            </div>
+                                        </td>
+                                        <td valign="top" width="100%" style="overflow:hidden;">
+                                            <div class="wiki-content">
+                                                <p><a name="EnhancementwithMaven-Usingtheopenjpa-maven-plugin"></a></p>
+<h2 id="using-the-openjpa-maven-plugin">Using the openjpa-maven-plugin</h2>
+<p>The Maven plugin, formerly provided by the Codehaus project is now part of
+OpenJPA 2.2.0. The plugins documentation can be found <a href="http://people.apache.org/~mikedd/openjpa/openjpa-maven-plugin/">here</a>
+ until it finds a permanent home one the openjpa site. </p>
+<p>The previous versions of the plugin can be found at the <a href="http://mojo.codehaus.org/openjpa-maven-plugin/index.html">Codehaus project</a></p>
+<p>For example, to enhance you source entity classes after they have been
+compiled (but exclude any POJO classes that rely upon orm.xml maappings),
+add the openjpa-maven-plugin to the <build> section of your pom.xml, like -</p>
+<div class="codehilite"><pre>    <span class="nt">&lt;build&gt;</span>
+    ...
+    <span class="nt">&lt;plugin&gt;</span>
+        <span class="nt">&lt;groupId&gt;</span>org.apache.openjpa<span class="nt">&lt;/groupId&gt;</span>
+        <span class="nt">&lt;artifactId&gt;</span>openjpa-maven-plugin<span class="nt">&lt;/artifactId&gt;</span>
+        <span class="nt">&lt;version&gt;</span>2.2.0-SNAPSHOT<span class="nt">&lt;/version&gt;</span>
+        <span class="nt">&lt;configuration&gt;</span>
+            <span class="nt">&lt;includes&gt;</span>**/entities/*.class<span class="nt">&lt;/includes&gt;</span>
+            <span class="nt">&lt;excludes&gt;</span>**/entities/XML*.class<span class="nt">&lt;/excludes&gt;</span>
+            <span class="nt">&lt;addDefaultConstructor&gt;</span>true<span class="nt">&lt;/addDefaultConstructor&gt;</span>               
+            <span class="nt">&lt;enforcePropertyRestrictions&gt;</span>true<span class="nt">&lt;/enforcePropertyRestrictions&gt;</span>
+        <span class="nt">&lt;/configuration&gt;</span>
+        <span class="nt">&lt;executions&gt;</span>
+            <span class="nt">&lt;execution&gt;</span>
+                <span class="nt">&lt;id&gt;</span>enhancer<span class="nt">&lt;/id&gt;</span>
+                <span class="nt">&lt;phase&gt;</span>process-classes<span class="nt">&lt;/phase&gt;</span>
+                <span class="nt">&lt;goals&gt;</span>
+                    <span class="nt">&lt;goal&gt;</span>enhance<span class="nt">&lt;/goal&gt;</span>
+                <span class="nt">&lt;/goals&gt;</span>
+            <span class="nt">&lt;/execution&gt;</span>
+        <span class="nt">&lt;/executions&gt;</span>
+        <span class="nt">&lt;dependencies&gt;</span>
+            <span class="nt">&lt;dependency&gt;</span>
+                <span class="nt">&lt;groupId&gt;</span>org.apache.openjpa<span class="nt">&lt;/groupId&gt;</span>
+                <span class="nt">&lt;artifactId&gt;</span>openjpa<span class="nt">&lt;/artifactId&gt;</span>
+                <span class="c">&lt;!-- set the version to be the same as the level in your runtime --&gt;</span>
+                <span class="nt">&lt;version&gt;</span>1.2.2<span class="nt">&lt;/version&gt;</span>
+            <span class="nt">&lt;/dependency&gt;</span>
+        <span class="nt">&lt;/dependencies&gt;</span>
+    <span class="nt">&lt;/plugin&gt;</span>
+    ...
+    <span class="nt">&lt;/build&gt;</span>
+</pre></div>
+
+
+<p>There are other goals available to create the Entity to SQL mapping and
+Entity to XML Schema mapping, which are documented under the <a href="http://mojo.codehaus.org/openjpa-maven-plugin/plugin-info.html">Goals section</a>
+ on the plugin website.</p>
+<p><a name="EnhancementwithMaven-Usingthemaven-antrun-plugin"></a></p>
+<h2 id="using-the-maven-antrun-plugin">Using the maven-antrun-plugin</h2>
+<p>You can use the maven-antrun-plugin to launch the OpenJPA enhancer task
+using ANT.  The steps are nearly identical to the ones for <a href="enhancement-with-ant.html">Enhancing with ANT</a>
+ (again, you may not need to move the persistence.xml file to the build
+directory, but I did for this write-up).</p>
+<div class="codehilite"><pre><span class="nt">&lt;build&gt;</span>
+    <span class="c">&lt;!-- Copy the persistence.xml file to the build dir --&gt;</span>
+    <span class="c">&lt;!-- You can skip this step if you put the persistence.xml in src/main/resources/META-INF instead of src/main/java/META-INF --&gt;</span>
+    <span class="nt">&lt;resources&gt;</span>
+      <span class="nt">&lt;resource&gt;</span>
+        <span class="nt">&lt;directory&gt;</span> src/main/java <span class="nt">&lt;/directory&gt;</span>
+        <span class="nt">&lt;includes&gt;</span>
+          <span class="nt">&lt;include&gt;</span> **/*.xml <span class="nt">&lt;/include&gt;</span>
+          <span class="nt">&lt;/includes&gt;</span>
+      <span class="nt">&lt;/resource&gt;</span>
+    <span class="nt">&lt;/resources&gt;</span>
+    <span class="nt">&lt;plugins&gt;</span>
+    .....        
+      <span class="nt">&lt;plugin&gt;</span>
+        <span class="nt">&lt;groupId&gt;</span>org.apache.maven.plugins<span class="nt">&lt;/groupId&gt;</span>
+        <span class="nt">&lt;artifactId&gt;</span>maven-antrun-plugin<span class="nt">&lt;/artifactId&gt;</span>
+        <span class="nt">&lt;version&gt;</span>1.2<span class="nt">&lt;/version&gt;</span>
+        <span class="nt">&lt;executions&gt;</span>
+            <span class="nt">&lt;execution&gt;</span>
+               <span class="nt">&lt;phase&gt;</span>process-classes<span class="nt">&lt;/phase&gt;</span>
+               <span class="nt">&lt;configuration&gt;</span>
+                  <span class="nt">&lt;tasks&gt;</span>
+                      <span class="nt">&lt;taskdef</span> <span class="na">name=</span><span class="s">&quot;openjpac&quot;</span> <span class="na">classname=</span><span class="s">&quot;org.apache.openjpa.ant.PCEnhancerTask&quot;</span> <span class="na">classpathref=</span><span class="s">&quot;maven.compile.classpath&quot;</span><span class="nt">/&gt;</span>
+                      <span class="nt">&lt;openjpac&gt;</span>
+                         <span class="nt">&lt;classpath</span> <span class="na">refid=</span><span class="s">&quot;maven.compile.classpath&quot;</span><span class="nt">/&gt;</span>
+                      <span class="nt">&lt;/openjpac&gt;</span>
+                  <span class="nt">&lt;/tasks&gt;</span>
+               <span class="nt">&lt;/configuration&gt;</span>
+               <span class="nt">&lt;goals&gt;</span>
+                   <span class="nt">&lt;goal&gt;</span>run<span class="nt">&lt;/goal&gt;</span>
+               <span class="nt">&lt;/goals&gt;</span>
+            <span class="nt">&lt;/execution&gt;</span>
+        <span class="nt">&lt;/executions&gt;</span>
+      <span class="nt">&lt;/plugin&gt;</span>
+    <span class="nt">&lt;/plugins&gt;</span>
+    ....
+ <span class="nt">&lt;/build&gt;</span>
+</pre></div>
+                                            </div>
+                                        </td>
+                                        </tr>
+                                    </tbody>
+                                </table>
+                                <div class="bottom_red_bar"></div>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+                <div class="black_box">
+                    <div class="footer">
+                        <div class="footer_l">
+                            <div class="footer_r">
+                                <div>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+            <div class="design_attribution">
+                Copyright (C) 2006,2012 The Apache Software Foundation. Licensed under <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License 2.0</a>.<br />
+                Apache, the Apache feather logo and OpenJPA are trademarks of The Apache Software Foundation.<br />
+                Other names may be trademarks of their respective owners.<br />
+            </div>
+
+        <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
+        </script>
+        <script type="text/javascript">
+            _uacct = "UA-1940143-1";
+            urchinTracker();
+        </script>
+
+    </body>
+</html>

Added: websites/staging/openjpa/trunk/content/entity-enhancement.html
==============================================================================
--- websites/staging/openjpa/trunk/content/entity-enhancement.html (added)
+++ websites/staging/openjpa/trunk/content/entity-enhancement.html Sun Dec  9 13:13:35 2012
@@ -0,0 +1,246 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--
+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.
+-->
+<html lang="en">
+    <head>
+        <META http-equiv="Content-Type" content="text/html;charset=UTF-8" />
+        <link href="http://openjpa.apache.org/styles/site.css" rel="stylesheet" type="text/css"/>
+        <!-- <link href="http://openjpa.apache.org/styles/type-settings.css" rel="stylesheet" type="text/css"/> -->
+        <link href="./css/type-settings.css" rel="stylesheet" type="text/css"/>
+        <LINK rel="schema.DC" href="http://purl.org/DC/elements/1.0/">
+        <META name="Description" content="Apache OpenJPA -- Entity Enhancement
" />
+        <META name="Keywords" content="Apache OpenJPA, JPA, JPA 1.0, JSR-220, JPA2, JPA 2.0, JSR-317, " />
+        <META name="Owner" content="dev@openjpa.apache.org" />
+        <META name="Robots" content="index, follow" />
+        <META name="Security" content="Public" />
+        <META name="Source" content="wiki template" />
+        <META name="DC.Date" scheme="iso8601" content="2010-08-11" />
+        <META name="DC.Language" scheme="rfc1766" content="en" />
+        <META name="DC.Rights" content="Copyright © 2006,2010 The Apache Software Foundation" />
+        <META http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))'/>
+
+        <title>
+            Apache OpenJPA --
+        </title>
+    </head>
+    <body>
+        <div class="white_box">
+            <div class="header">
+                <div class="header_l">
+                    <div class="header_r">
+                    </div>
+                </div>
+            </div>
+            <div class="content">
+                <div class="content_l">
+                    <div class="content_r">
+                        <div>
+                            <!-- Banner -->
+                            <TABLE valign="top" border="0" cellspacing="0" cellpadding="5" width="100%" background="images/header-bg3.png">
+                                <TR>
+                                    <TD valing="top" align="left">
+                                        <A href="http://openjpa.apache.org/"><IMG src="images/openjpa-logo.png" border="0" alt="OpenJPA Logo"></A>
+                                    </TD>
+                                    <TD width="100%">
+                                        &nbsp;
+                                    </TD>
+                                    <TD valing="top" align="right">
+                                        <A href="http://www.apache.org/"><IMG src="images/asf_logo_wide2.png" border="0" alt="ASF Logo"></A>
+                                    </TD>
+                                </TR>
+                            </TABLE>
+
+                            <!-- Navigation Bar -->
+                            <div class="bottom_red_bar">
+                                <div id="site-breadcrumbs">
+                                    <!-- Breadcrumbs --
+                                    <a href="/">Home</a>&nbsp;&raquo&nbsp;<a href="/entity-enhancement.html">Entity Enhancement
</a>
+                                     -- Breadcrumbs -->
+                                </div>
+                            </div>
+
+                            <!-- Content -->
+                            <table border="0">
+                                <tbody>
+                                    <tr>
+                                        <td valign="top">
+                                            <div class="navigation">
+                                                <div class="navigation_top">
+                                                    <div class="navigation_bottom">
+                                                        <!-- NavigationBar -->
+                                                        <h3><a name="SideNav-Overview"></a><a href="overview.html" title="Overview">Overview</a></h3>
+
+                                                        <ul class="alternate" type="square">
+                                                            <li><a href="quick-start.html" title="Quick Start">Quick Start</a></li>
+                                                            <li><a href="documentation.html" title="Documentation">Documentation</a></li>
+                                                            <li><a href="downloads.html" title="Downloads">Downloads</a></li>
+                                                            <li><a href="site-index.html" title="Site Index">Site Index</a></li>
+                                                            <li><a href="license.html" title="License">License</a></li>
+                                                            <li><a href="privacy-policy.html" title="Privacy Policy">Privacy Policy</a></li>
+                                                        </ul>
+
+                                                        <h3><a name="SideNav-Community"></a><a href="community.html" title="Community">Community</a></h3>
+
+                                                        <ul class="alternate" type="square">
+                                                            <li><a href="index.html#Index-eventsandnews" title="Events and News">Events and News</a></li>
+                                                            <li><a href="found-a-bug.html" title="Found a Bug">Found a Bug</a>?</li>
+                                                            <li><a href="get-involved.html" title="Get Involved">Get Involved</a></li>
+                                                            <li><a href="mailing-lists.html" title="Mailing Lists">Mailing Lists</a></li>
+                                                            <li><a href="committers.html" title="Committers">Committers</a></li>
+                                                            <li><a href="integration.html" title="Integration">Integration</a></li>
+                                                            <li><a href="powered-by.html" title="Powered By">Powered By</a></li>
+                                                            <li><a href="thanks.html" title="Thanks">Thanks</a></li>
+                                                        </ul>
+
+
+                                                        <h3><a name="SideNav-Development"></a><a href="development.html" title="Development">Development</a></h3>
+
+                                                        <ul class="alternate" type="square">
+                                                            <li><a href="http://issues.apache.org/jira/browse/OPENJPA" class="external-link" rel="nofollow">Issue Tracker</a></li>
+                                                            <li><a href="source-code.html" title="Source Code">Source Code</a></li>
+                                                            <li><a href="testing.html" title="Testing">Testing</a></li>
+                                                            <li><a href="tools.html" title="Tools">Tools</a></li>
+                                                            <li><a href="samples.html" title="Samples">Samples</a></li>
+                                                            <li><a href="release-management.html" title="Release Management">Release Management</a></li>
+                                                        </ul>
+
+                                                        <h3>Search</h3>
+
+                                                        <div style="padding: 5px 5px 0px 25px;">
+                                                            <form action="http://www.google.com/search" method="get" style="font-size: 10px;">
+                                                                <input name="ie" type="hidden" value="UTF-8">
+                                                                <input name="oe" type="hidden" value="UTF-8">
+                                                                <input maxlength="255" name="q" size="9" type="text" value=""><br><br>
+                                                                <input name="btnG" type="submit" value="Google">
+                                                                <input name="domains" type="hidden" value="openjpa.apache.org">
+                                                                <input name="sitesearch" type="hidden" value="openjpa.apache.org">
+                                                            </form>
+                                                        </div>
+                                                    </div>
+                                                </div>
+                                            </div>
+                                        </td>
+                                        <td valign="top" width="100%" style="overflow:hidden;">
+                                            <div class="wiki-content">
+                                                <p><a name="How-to-enhance-entity-classes"></a></p>
+<p><a name="EntityEnhancement-WhatisEnhancementAnyway?"></a></p>
+<h1 id="what-is-enhancement-anyway">What is Enhancement Anyway?</h1>
+<p>The JPA spec requires some type of monitoring of Entity objects, but the spec does not define how to implement this monitoring. Some JPA providers auto-generate new subclasses or proxy objects that front the user's Entity objects at runtime, while others use <a href="#EntityEnhancement-byteCode">byte-code weaving</a> technologies to enhance the actual Entity class objects. OpenJPA supports both mechanisms, but strongly suggests only using the byte-code weaving enhancement. The <a href="#EntityEnhancement-SubclassingEnhancement">subclassing</a> support (as provided by OpenJPA)
+is not recommended (and is disabled by default in OpenJPA 2.0 and beyond).</p>
+<p>For complete details on entity enhancement, please checkout the section in
+the latest <a href="http://openjpa.apache.org/builds/latest/docs/manual/manual.html#ref_guide_pc_enhance">User's Guide on Enhancement</a>
+.  The following sections will only cover the high-level concepts and the
+ways to use the enhancer in different build and runtime setups.</p>
+<p><a name="EntityEnhancement-byteCode"></a></p>
+<h2 id="byte-code-weaving-enhancement">Byte-code Weaving Enhancement?</h2>
+<p>Byte-code weaving is the preferred and recommended method of enhancement to use with OpenJPA.  This byte-code enhancement can be performed at <a href="#EntityEnhancement-BuildTimeEnhancement">build-time</a> or dynamically at <a href="#EntityEnhancement-DynamicEnhancement">run-time</a>.  Whichever approach is selected, the same enhancement processing is performed with the same level of functionality weaved into each Entity class.</p>
+<p><a name="EntityEnhancement-BuildTimeEnhancement"></a></p>
+<h3 id="build-time-enhancement">Build Time Enhancement</h3>
+<p>Build time enhancement is the recommended method to use with OpenJPA, as it
+it the fastest and most reliable method.  Please follow the links below
+based on yBuild time enhancement is probably the most common enhancement method to use with OpenJPA, especially in an automated JUnit test environment.  The whole OpenJPA JUnit test bucket relies on build-time enhancement.  Please follow the links below based on your development environment:</p>
+<ul>
+<li><a href="enhancement-with-ant.html">Enhancement with ANT</a></li>
+<li><a href="enhancement-with-maven.html">Enhancement with Maven</a></li>
+<li><a href="enhancement-with-eclipse.html">Enhancement with Eclipse</a></li>
+</ul>
+<p><a name="EntityEnhancement-DynamicEnhancement"></a></p>
+<h3 id="dynamic-enhancement">Dynamic Enhancement</h3>
+<p>Dynamic run-time enhancement with OpenJPA comes in several different flavors, depending on your environment.  The preferred and most reliable method of dynamic enhancement is via the defined container hook in a <a href="#javaee">Java EE and OSGi environments</a>.  In a <a href="#jse">JSE environment</a>, there are a couple of choices for configuring or using dynamic enhancement.  The choice will depend on your usage patterns.</p>
+<p><a name="javaee"></a></p>
+<h4 id="java-ee-and-osgi-environments">Java EE and OSGi environments</h4>
+<p>The Java EE specifications outline a mechanism for plugging in a JPA transformer (byte code enhancer) into the container's classloading processing.  Most Java EE application servers (for example, IBM's WebSphere Application Server) support this mechanism.  In addition, several of the OSGi container providers (for example, WebSphere's OSGi container) have followed a similar path and provide this classloading hook for dynamic enhancement.  If your container environment supports this mechanism with OpenJPA, this would be the preferred and easiest method of performing the byte-code enhancement.</p>
+<p><a name="jse"> </a></p>
+<h4 id="jse-environment">JSE Environment</h4>
+<h5 id="explicit-javaagent-support">Explicit javaagent support</h5>
+<p>The recommended way get runtime enhancement for the JSE environment is to provide a javaagent when launching the JVM that OpenJPA is running in. This is a common method to use when executing individual JUnits in a development environment because it is very painless and easy. All that is required to get runtime enhancement is to specify the -javaagent:openjpa-all-2.2.0-SNAPSHOT.jar (as an example) on the JVM configuration.</p>
+<p>More information can be found on the <a href="runtime-enhancement.html">Runtime Enhancement</a> page.</p>
+<h5 id="implicit-javaagent-support">Implicit javaagent support</h5>
+<p><a href="https://issues.apache.org/jira/browse/OPENJPA-952">OPENJPA-952</a>
+ added the capability to have OpenJPA attempt to dynamically load the
+javaagent enhancer. If you see the following message, OpenJPA loaded the
+enhancer dynamically.</p>
+<blockquote>
+<p>[java] 1453  jpa_app    INFO   [main] openjpa.Runtime - OpenJPA dynamically
+loaded the class enhancer. Any classes that were not enhanced at build time
+will be enhanced when the are loaded by the JVM.</p>
+</blockquote>
+<p>This method of enhancement is intended for first time users or developers
+as it has a number of caveats.</p>
+<ul>
+<li>It works with both the Sun/Oracle 1.6SDK and IBM 1.6JDK.  The JRE is not sufficient.</li>
+<li>If any unenhanced Entities are loaded by the JVM before an EntityManagerFactory is created, this method of enhancement will not work. If this condition is encountered, you will see the following warning:</li>
+</ul>
+<blockquote>
+<p>[java] 1047  jpa_app    WARN   [main] openjpa.Enhance - Unenhanced classes were
+detected even though the enhancer has ran. Ensure that the
+EntityManagerFactory is created prior to creating any Entities.</p>
+</blockquote>
+<p>If your application uses some other method of enhancement, this support can be explicitly disabled by setting the following property in your persistence.xml.</p>
+<blockquote>
+<property name="openjpa.DynamicEnhancementAgent" value="false"/>
+
+</blockquote>
+<p><a name="EntityEnhancement-SubclassingEnhancement"></a></p>
+<h2 id="subclassing-enhancement">Subclassing Enhancement</h2>
+<p><span class="note">The use of OpenJPA's subclassing support is not recommended, and is disabled by default in OpenJPA 2.0 and beyond.</span></p>
+<p>When running in a Java SE environment or in a non-Java EE 5 compliant container, OpenJPA can utilize runtime subclassing enhancement. The subclassing enhancement support was added originally as a convenience to new developers to reduce the amount of work to get a 'HelloWorld-ish' OpenJPA application working out of the box. It was never meant to run in production. So you're probably thinking that this sounds great! OpenJPA handles enhancement automatically for me and I can stop reading this post. Wrong! Subclassing has two major drawbacks. First off, it isn't nearly as fast as byte-code enhancement and the second drawback is that there are some documented functional problems when using the subclassing support. The moral of the story is, don't use this method of enhancement.</p>
+<p>For reference, the property that enables/disables the subclassing support is openjpa.RuntimeUnenhancedClasses. The value "unsupported" is the recommended and default setting for this property.</p>
+<p>Additional information regarding the subclassing enhancement can be found in the <a href="http://openjpa.apache.org/builds/latest/docs/manual/manual.html#ref_guide_pc_enhance">OpenJPA docs</a>.</p>
+<p><a name="EntityEnhancement-AuthorAttribution"></a></p>
+<h2 id="author-attribution">Author Attribution</h2>
+<p>The content for this page and sub-pages was adapted from content created by
+OpenJPA contributor Rick Curtis from the following <a href="http://webspherepersistence.blogspot.com/">WebSphere and Java Persistence</a>
+ blog entries:</p>
+<p><a href="http://webspherepersistence.blogspot.com/2009/02/openjpa-enhancement.html">http://webspherepersistence.blogspot.com/2009/02/openjpa-enhancement.html</a></p>
+<p><a href="http://webspherepersistence.blogspot.com/2009/04/openjpa-enhancement-eclipse-builder.html">http://webspherepersistence.blogspot.com/2009/04/openjpa-enhancement-eclipse-builder.html</a></p>
+                                            </div>
+                                        </td>
+                                        </tr>
+                                    </tbody>
+                                </table>
+                                <div class="bottom_red_bar"></div>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+                <div class="black_box">
+                    <div class="footer">
+                        <div class="footer_l">
+                            <div class="footer_r">
+                                <div>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+            <div class="design_attribution">
+                Copyright (C) 2006,2012 The Apache Software Foundation. Licensed under <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License 2.0</a>.<br />
+                Apache, the Apache feather logo and OpenJPA are trademarks of The Apache Software Foundation.<br />
+                Other names may be trademarks of their respective owners.<br />
+            </div>
+
+        <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
+        </script>
+        <script type="text/javascript">
+            _uacct = "UA-1940143-1";
+            urchinTracker();
+        </script>
+
+    </body>
+</html>

Added: websites/staging/openjpa/trunk/content/faq.html
==============================================================================
--- websites/staging/openjpa/trunk/content/faq.html (added)
+++ websites/staging/openjpa/trunk/content/faq.html Sun Dec  9 13:13:35 2012
@@ -0,0 +1,325 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--
+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.
+-->
+<html lang="en">
+    <head>
+        <META http-equiv="Content-Type" content="text/html;charset=UTF-8" />
+        <link href="http://openjpa.apache.org/styles/site.css" rel="stylesheet" type="text/css"/>
+        <!-- <link href="http://openjpa.apache.org/styles/type-settings.css" rel="stylesheet" type="text/css"/> -->
+        <link href="./css/type-settings.css" rel="stylesheet" type="text/css"/>
+        <LINK rel="schema.DC" href="http://purl.org/DC/elements/1.0/">
+        <META name="Description" content="Apache OpenJPA -- FAQ
" />
+        <META name="Keywords" content="Apache OpenJPA, JPA, JPA 1.0, JSR-220, JPA2, JPA 2.0, JSR-317, " />
+        <META name="Owner" content="dev@openjpa.apache.org" />
+        <META name="Robots" content="index, follow" />
+        <META name="Security" content="Public" />
+        <META name="Source" content="wiki template" />
+        <META name="DC.Date" scheme="iso8601" content="2010-08-11" />
+        <META name="DC.Language" scheme="rfc1766" content="en" />
+        <META name="DC.Rights" content="Copyright © 2006,2010 The Apache Software Foundation" />
+        <META http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))'/>
+
+        <title>
+            Apache OpenJPA --
+        </title>
+    </head>
+    <body>
+        <div class="white_box">
+            <div class="header">
+                <div class="header_l">
+                    <div class="header_r">
+                    </div>
+                </div>
+            </div>
+            <div class="content">
+                <div class="content_l">
+                    <div class="content_r">
+                        <div>
+                            <!-- Banner -->
+                            <TABLE valign="top" border="0" cellspacing="0" cellpadding="5" width="100%" background="images/header-bg3.png">
+                                <TR>
+                                    <TD valing="top" align="left">
+                                        <A href="http://openjpa.apache.org/"><IMG src="images/openjpa-logo.png" border="0" alt="OpenJPA Logo"></A>
+                                    </TD>
+                                    <TD width="100%">
+                                        &nbsp;
+                                    </TD>
+                                    <TD valing="top" align="right">
+                                        <A href="http://www.apache.org/"><IMG src="images/asf_logo_wide2.png" border="0" alt="ASF Logo"></A>
+                                    </TD>
+                                </TR>
+                            </TABLE>
+
+                            <!-- Navigation Bar -->
+                            <div class="bottom_red_bar">
+                                <div id="site-breadcrumbs">
+                                    <!-- Breadcrumbs --
+                                    <a href="/">Home</a>&nbsp;&raquo&nbsp;<a href="/faq.html">FAQ
</a>
+                                     -- Breadcrumbs -->
+                                </div>
+                            </div>
+
+                            <!-- Content -->
+                            <table border="0">
+                                <tbody>
+                                    <tr>
+                                        <td valign="top">
+                                            <div class="navigation">
+                                                <div class="navigation_top">
+                                                    <div class="navigation_bottom">
+                                                        <!-- NavigationBar -->
+                                                        <h3><a name="SideNav-Overview"></a><a href="overview.html" title="Overview">Overview</a></h3>
+
+                                                        <ul class="alternate" type="square">
+                                                            <li><a href="quick-start.html" title="Quick Start">Quick Start</a></li>
+                                                            <li><a href="documentation.html" title="Documentation">Documentation</a></li>
+                                                            <li><a href="downloads.html" title="Downloads">Downloads</a></li>
+                                                            <li><a href="site-index.html" title="Site Index">Site Index</a></li>
+                                                            <li><a href="license.html" title="License">License</a></li>
+                                                            <li><a href="privacy-policy.html" title="Privacy Policy">Privacy Policy</a></li>
+                                                        </ul>
+
+                                                        <h3><a name="SideNav-Community"></a><a href="community.html" title="Community">Community</a></h3>
+
+                                                        <ul class="alternate" type="square">
+                                                            <li><a href="index.html#Index-eventsandnews" title="Events and News">Events and News</a></li>
+                                                            <li><a href="found-a-bug.html" title="Found a Bug">Found a Bug</a>?</li>
+                                                            <li><a href="get-involved.html" title="Get Involved">Get Involved</a></li>
+                                                            <li><a href="mailing-lists.html" title="Mailing Lists">Mailing Lists</a></li>
+                                                            <li><a href="committers.html" title="Committers">Committers</a></li>
+                                                            <li><a href="integration.html" title="Integration">Integration</a></li>
+                                                            <li><a href="powered-by.html" title="Powered By">Powered By</a></li>
+                                                            <li><a href="thanks.html" title="Thanks">Thanks</a></li>
+                                                        </ul>
+
+
+                                                        <h3><a name="SideNav-Development"></a><a href="development.html" title="Development">Development</a></h3>
+
+                                                        <ul class="alternate" type="square">
+                                                            <li><a href="http://issues.apache.org/jira/browse/OPENJPA" class="external-link" rel="nofollow">Issue Tracker</a></li>
+                                                            <li><a href="source-code.html" title="Source Code">Source Code</a></li>
+                                                            <li><a href="testing.html" title="Testing">Testing</a></li>
+                                                            <li><a href="tools.html" title="Tools">Tools</a></li>
+                                                            <li><a href="samples.html" title="Samples">Samples</a></li>
+                                                            <li><a href="release-management.html" title="Release Management">Release Management</a></li>
+                                                        </ul>
+
+                                                        <h3>Search</h3>
+
+                                                        <div style="padding: 5px 5px 0px 25px;">
+                                                            <form action="http://www.google.com/search" method="get" style="font-size: 10px;">
+                                                                <input name="ie" type="hidden" value="UTF-8">
+                                                                <input name="oe" type="hidden" value="UTF-8">
+                                                                <input maxlength="255" name="q" size="9" type="text" value=""><br><br>
+                                                                <input name="btnG" type="submit" value="Google">
+                                                                <input name="domains" type="hidden" value="openjpa.apache.org">
+                                                                <input name="sitesearch" type="hidden" value="openjpa.apache.org">
+                                                            </form>
+                                                        </div>
+                                                    </div>
+                                                </div>
+                                            </div>
+                                        </td>
+                                        <td valign="top" width="100%" style="overflow:hidden;">
+                                            <div class="wiki-content">
+                                                <p><a name="FAQ-General"></a></p>
+<h2 id="general">General</h2>
+<ul>
+<li><a href="#what">What is OpenJPA?</a></li>
+<li><a href="#history">What is the history of OpenJPA?</a></li>
+<li><a href="#kodo">What is the current relationship between Kodo and OpenJPA?</a></li>
+<li><a href="#status">What is the current status of the project?</a></li>
+<li><a href="#download">Where can I download OpenJPA?</a></li>
+<li><a href="#server">Does OpenJPA work with my application server or container?</a></li>
+<li><a href="#contribute">How can I contribute to OpenJPA?</a></li>
+<li><a href="#pooling">How do I enable connection pooling in OpenJPA?</a></li>
+<li><a href="#version">How do I figure out which version of OpenJPA I am running?</a></li>
+<li><a href="#sql">How do I see the SQL that OpenJPA is executing?</a></li>
+<li><a href="#reorder">Can OpenJPA reorder SQL statements to satisfy database foreign key constraints?</a></li>
+<li><a href="#crosstable">Can OpenJPA map a one-sided one-many association without a cross table?</a></li>
+</ul>
+<p><a name="what"></a></p>
+<h2 id="what-is-openjpa">What is OpenJPA?</h2>
+<p>OpenJPA is a 100% open-source implementation of the Java Persistence API
+(JPA), which is the persistence component for EJB in the <a href="http://java.sun.com/javaee/">Java EE 5 specification</a>
+.</p>
+<p><a name="history"></a></p>
+<h2 id="what-is-the-history-of-openjpa">What is the history of OpenJPA?</h2>
+<p>OpenJPA has its roots in the popular Kodo product, which was created by SolarMetric, Inc. in 2001. BEA Systems, Inc. 
+purchased SolarMetric in November of 2005, and soon thereafter announced that they would be donating the bulk of the code to the Apache Software Foundation. OpenJPA is the result of that donation.</p>
+<p><a name="kodo"></a></p>
+<h2 id="what-is-the-current-relationship-between-kodo-and-openjpa">What is the current relationship between Kodo and OpenJPA?</h2>
+<p>Version 4.1 of Kodo will be based on the OpenJPA code base.</p>
+<p><a name="status"></a></p>
+<h2 id="what-is-the-current-status-of-the-project">What is the current status of the project?</h2>
+<p>OpenJPA is a top-level project at the Apache Software Foundation.</p>
+<p><a name="download"></a></p>
+<h2 id="where-can-i-download-openjpa">Where can I download OpenJPA?</h2>
+<p>Look at the <a href="downloads.html">Downloads</a> page.</p>
+<p><a name="server"></a></p>
+<h2 id="does-openjpa-work-with-my-application-server-or-container">Does OpenJPA work with my application server or container?</h2>
+<p>See <a href="integration.html">Integration</a>
+.</p>
+<p><a name="contribute"></a></p>
+<h2 id="how-can-i-contribute-to-openjpa">How can I contribute to OpenJPA?</h2>
+<p>Check out the <a href="get-involved.html">Get Involved</a>
+ page.</p>
+<p><a name="version"></a></p>
+<h2 id="how-do-i-figure-out-which-version-of-openjpa-i-am-running">How do I figure out which version of OpenJPA I am running?</h2>
+<p>You can get version number and other details of OpenJPA jar you are using
+by:</p>
+<p><a name="sql"></a></p>
+<h2 id="how-do-i-see-the-sql-that-openjpa-is-executing">How do I see the SQL that OpenJPA is executing?</h2>
+<p>OpenJPA provides configurable channel-based logging, as described in the
+chapter on <a href="http://openjpa.apache.org/builds/latest/docs/manual/manual.html#ref_guide_logging">Logging</a>
+. The simplest example of enabling verbose logging is by using the
+following property in your {{persistence.xml}} file:</p>
+<div class="codehilite"><pre><span class="o">&lt;</span><span class="n">persistence</span> <span class="n">xmlns</span><span class="o">=</span><span class="s">&quot;http://java.sun.com/xml/ns/persistence&quot;</span>
+    <span class="n">xmlns:xsi</span><span class="o">=</span><span class="s">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span>
+    <span class="n">version</span><span class="o">=</span><span class="s">&quot;1.0&quot;</span><span class="o">&gt;</span>
+    <span class="o">&lt;</span><span class="n">persistence</span><span class="o">-</span><span class="n">unit</span> <span class="n">name</span><span class="o">=</span><span class="s">&quot;example-logging&quot;</span>
+</pre></div>
+
+
+<p>transaction-type="RESOURCE_LOCAL"&gt;
+        <properties>
+            <property name="openjpa.Log" value="SQL=TRACE"/>
+        </properties>
+        </persistence-unit>
+    </persistence></p>
+<p><a name="pooling"/></p>
+<h2 id="how-do-i-enable-connection-pooling-in-openjpa">How do I enable connection pooling in OpenJPA?</h2>
+<p>As of the 2.1.0 release, OpenJPA includes the <a href="http://jakarta.apache.org/commons/dbcp/">Apache DBCP</a>
+ connection pool. You can also use any third-party connection pool that is
+configurable via the JDBC DataSource API (which most are). The following
+<em>persistence.xml</em> example shows how to use OpenJPA with a [Apache Derby|http://db.apache.org/derby/]
+ database and the [Apache DBCP|http://jakarta.apache.org/commons/dbcp/]
+ connection pool:</p>
+<div class="codehilite"><pre>    <span class="nt">&lt;persistence</span> <span class="na">xmlns=</span><span class="s">&quot;http://java.sun.com/xml/ns/persistence&quot;</span>
+        <span class="na">xmlns:xsi=</span><span class="s">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span>
+        <span class="na">version=</span><span class="s">&quot;1.0&quot;</span><span class="nt">&gt;</span>
+        <span class="nt">&lt;persistence-unit</span> <span class="na">name=</span><span class="s">&quot;example-derby&quot;</span>
+            <span class="na">transaction-type=</span><span class="s">&quot;RESOURCE_LOCAL&quot;</span><span class="nt">&gt;</span>
+        <span class="nt">&lt;properties&gt;</span>
+            <span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">&quot;openjpa.ConnectionProperties&quot;</span> 
+            <span class="na">value=</span><span class="s">&quot;DriverClassName=org.apache.derby.jdbc.ClientDriver,</span>
+<span class="s">              Url=jdbc:derby://localhost:1527/database, </span>
+<span class="s">              MaxActive=100, </span>
+<span class="s">              MaxWait=10000, </span>
+<span class="s">              TestOnBorrow=true, </span>
+<span class="s">              Username=user, </span>
+<span class="s">              Password=secret&quot;</span><span class="nt">/&gt;</span>
+            <span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">&quot;openjpa.ConnectionDriverName&quot;</span> 
+            <span class="na">value=</span><span class="s">&quot;org.apache.commons.dbcp.BasicDataSource&quot;</span><span class="nt">/&gt;</span>
+        <span class="nt">&lt;/properties&gt;</span>
+        <span class="nt">&lt;/persistence-unit&gt;</span>
+    <span class="nt">&lt;/persistence&gt;</span>
+</pre></div>
+
+
+<p>See the documentation on <a href="http://openjpa.apache.org/builds/latest/docs/manual/manual.html#ref_guide_dbsetup_thirdparty">Using a Third-Party DataSource</a> for further details.</p>
+<p><a name="reorder"></a>                                                        <br />
+</p>
+<h2 id="can-openjpa-reorder-sql-statements-to-satisfy-database-foreign-key-constraints">Can OpenJPA reorder SQL statements to satisfy database foreign key constraints?</h2>
+<p>Yes. OpenJPA can reorder and/or batch the SQL statements using different
+configurable strategies. The default strategy is capable of reordering the
+SQL statements to satisfy foreign key constraints. However ,you must tell
+OpenJPA to read the existing foreign key information from the database
+schema:</p>
+<div class="codehilite"><pre>  <span class="o">&lt;</span><span class="n">property</span> <span class="n">name</span><span class="o">=</span><span class="s">&quot;openjpa.jdbc.SchemaFactory&quot;</span> <span class="n">value</span><span class="o">=</span><span class="s">&quot;native(ForeignKeys=true)&quot;</span><span class="o">/&gt;</span>
+</pre></div>
+
+
+<p>See the documentation on <a href="http://openjpa.apache.org/builds/latest/docs/manual/manual.html#ref_guide_schema_info_list">Schema Factory</a> for further details.</p>
+<p><a name="fk"></a></p>
+<h2 id="why-openjpa-is-not-creating-foreign-key-constraints-on-the-database-tables">Why OpenJPA is not creating foreign key constraints on the database tables?</h2>
+<p>By default, OpenJPA does not create foreign key constraints on new tables
+that gets created according to O-R mapping annotation/descriptors. You can
+change this default behavior via following configuration property :</p>
+<div class="codehilite"><pre>  <span class="o">&lt;</span><span class="n">property</span> <span class="n">name</span><span class="o">=</span><span class="s">&quot;openjpa.jdbc.MappingDefaults&quot;</span> <span class="o">\</span>
+           <span class="n">value</span><span class="o">=</span><span class="s">&quot;ForeignKeyDeleteAction=restrict,JoinForeignKeyDeleteAction=restrict&quot;</span><span class="o">/&gt;</span>
+</pre></div>
+
+
+<p>to create foreign key constraints on the database tables generated by OpenJPA. </p>
+<p><a name="crosstable"></a></p>
+<h2 id="can-openjpa-map-a-one-sided-one-many-association-without-a-cross-table">Can OpenJPA map a one-sided one-many association without a cross table?</h2>
+<p>Yes. Standard JPA specification use a cross table to map one-sided
+one-to-many relation without a {{mappedBy}} inverse side. Often, you would
+like to create a one-to-many association based on an inverse foreign key
+(logical or actual) in the table of the related type. OpenJPA supports this
+mapping via {{@ElementJoinColumn}} annotation. The following example will
+map the collection of {{LineItem}} of a {{Subscription}} via a foreign key
+of {{LINEITEM}} table referring to primary key of {{SUBSCRIPTION}} table.
+    {code:JAVA}
+    package org.mag.subscribe;</p>
+<div class="codehilite"><pre><span class="nb">import</span> <span class="n">org</span><span class="o">.</span><span class="n">apache</span><span class="o">.</span><span class="n">openjpa</span><span class="o">.</span><span class="n">persistence</span><span class="o">.</span><span class="n">jdbc</span><span class="o">.*</span><span class="p">;</span>
+
+<span class="nv">@Entity</span>
+<span class="n">public</span> <span class="n">class</span> <span class="n">LineItem</span> <span class="p">{</span>
+    <span class="sr">//</span> <span class="n">has</span> <span class="nb">no</span> <span class="n">inverse</span> <span class="n">relation</span> <span class="n">to</span> <span class="n">Subscription</span>
+<span class="p">}</span>
+
+<span class="nv">@Entity</span>
+<span class="nv">@Table</span><span class="p">(</span><span class="n">name</span><span class="o">=</span><span class="s">&quot;SUB&quot;</span><span class="p">,</span> <span class="n">schema</span><span class="o">=</span><span class="s">&quot;CNTRCT&quot;</span><span class="p">)</span>
+<span class="n">public</span> <span class="n">class</span> <span class="n">Subscription</span> <span class="p">{</span>
+    <span class="nv">@Id</span> 
+    <span class="n">private</span> <span class="n">long</span> <span class="n">id</span><span class="p">;</span>
+
+    <span class="nv">@OneToMany</span>
+    <span class="nv">@ElementJoinColumn</span><span class="p">(</span><span class="n">name</span><span class="o">=</span><span class="s">&quot;SUB_ID&quot;</span><span class="p">,</span> <span class="n">referencedColumnName</span><span class="o">=</span><span class="s">&quot;ID&quot;</span><span class="p">)</span>
+    <span class="n">private</span> <span class="n">Collection</span><span class="sr">&lt;LineItem&gt;</span> <span class="n">items</span><span class="p">;</span>
+
+    <span class="o">...</span>
+<span class="p">}</span>
+</pre></div>
+                                            </div>
+                                        </td>
+                                        </tr>
+                                    </tbody>
+                                </table>
+                                <div class="bottom_red_bar"></div>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+                <div class="black_box">
+                    <div class="footer">
+                        <div class="footer_l">
+                            <div class="footer_r">
+                                <div>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+            <div class="design_attribution">
+                Copyright (C) 2006,2012 The Apache Software Foundation. Licensed under <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License 2.0</a>.<br />
+                Apache, the Apache feather logo and OpenJPA are trademarks of The Apache Software Foundation.<br />
+                Other names may be trademarks of their respective owners.<br />
+            </div>
+
+        <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
+        </script>
+        <script type="text/javascript">
+            _uacct = "UA-1940143-1";
+            urchinTracker();
+        </script>
+
+    </body>
+</html>



Mime
View raw message