openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mik...@apache.org
Subject svn commit: r1409057 [25/25] - in /openjpa/site: branches/ trunk/ trunk/cgi-bin/ trunk/content/ trunk/content/images/ trunk/lib/ trunk/resources/ trunk/templates/
Date Wed, 14 Nov 2012 01:50:14 GMT
Added: openjpa/site/trunk/content/using-criteria-api-in-daytrader.mdtext
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/using-criteria-api-in-daytrader.mdtext?rev=1409057&view=auto
==============================================================================
--- openjpa/site/trunk/content/using-criteria-api-in-daytrader.mdtext (added)
+++ openjpa/site/trunk/content/using-criteria-api-in-daytrader.mdtext Wed Nov 14 01:49:37 2012
@@ -0,0 +1,188 @@
+Title: Using Criteria API in DayTrader
+<a name="UsingCriteriaAPIinDayTrader-UsingCriteriaAPIinDayTrader"></a>
+# Using Criteria API in DayTrader
+
+A current DayTrader project implementation in Apache Geronimo contains
+several JPQL queries. These can easily be converted to JPA Criteria API
+queries. A sample with this conversion can be created to run on either the
+Apache Geronimo server or the WebSphere Application Server with the
+built-in Derby database.
+
+
+<a name="UsingCriteriaAPIinDayTrader-DownloadingDayTrader"></a>
+## Downloading DayTrader
+
+You must have Subversion installed in order to download the DayTrader implementation.Subversion can be downloaded from&nbsp;[http://subversion.apache.org/packages.html](http://subversion.apache.org/packages.html)
+.  Use the 2.1.3 version of DayTrader for this sample. Follow the following
+steps:
+1. Create a root directory for the download. For this example, we will use a
+directory called *DayTrader*.
+1. Create subdirectories *branches/2.1.3* under the *DayTrader* directory
+1. cd to *DayTrader*
+1. Issue the following subversion command:
+&nbsp;&nbsp;&nbsp;&nbsp; svn checkout [https://svn.apache.org/repos/asf/geronimo/daytrader/branches/2.1.3](https://svn.apache.org/repos/asf/geronimo/daytrader/branches/2.1.3)
+ branches/2.1.3
+
+<a name="UsingCriteriaAPIinDayTrader-BuildDayTrader"></a>
+## Build DayTrader
+
+You must have maven installed in order to build DayTrader. Maven can be
+downloaded from [http://maven.apache.org/download.html](http://maven.apache.org/download.html)
+. Unzip the file to a directory and run mvn.bat\|.sh in the bin
+subdirectory to install. Add the bin subdirectory to you system path.
+
+Maven needs a repository. Typically it is at the following:
+* Windows - C:\Documents and Settings\<userid>\.m2\repository
+* Linux/unix - \~/.m2/repository
+
+From the *DayTrader/branches/2.1.3* directory, type "mvn clean install" to
+build the project. (Note: If you see errors that say
+"java.util.zip.ZipException: error in opening zip file", ignore them for
+this exercise.)
+
+
+
+<a name="UsingCriteriaAPIinDayTrader-"></a>
+## 
+
+<a name="UsingCriteriaAPIinDayTrader-ApplytheDayTraderPatch"></a>
+## Apply the DayTrader Patch
+
+The following patch can be applied using a system or downloaded *patch* utility. (For example, you can get a patch utility for Windows from&nbsp;[http://gnuwin32.sourceforge.net/packages/patch.htm](http://gnuwin32.sourceforge.net/packages/patch.htm)
+.)
+
+for Geronimo - [^daytrader_geronimo.patch](^daytrader_geronimo.patch.html)
+
+
+
+
+
+
+
+
+
+for WebSphere - [^daytrader_websphere.patch](^daytrader_websphere.patch.html)
+
+
+
+Download the appropriate patch and go to the *DayTrader/branches.2.1.3*
+directory to apply it. For example, with the patch utility mentioned above,
+you can type:
+
+patch \-p0 \-i <path-to>/daytrader_geronimo.patch
+
+After you have applied the patch, you can see the changes from JPQL to the
+Criteria API in the java class
+org.apache.geronimo.samples.daytrader.ejb3.TradeSLSBBean. The changes are
+in the following 4 methods:
+* getMarketSummary()
+* getClosedOrders()
+* getAllQuotes()
+* getHoldings()
+
+(Note: If you view these changes in eclipse, and you have previously run
+"mvn eclipse:eclipse" to setup eclipse projects, you'll have to run this
+command again in order for this file to compile.)
+
+You can also [Apply an Eclipse Patch](apply-an-eclipse-patch.html)
+
+
+
+
+
+
+<a name="UsingCriteriaAPIinDayTrader-Re-createtheDayTraderearfile"></a>
+## Re-create the DayTrader ear file
+
+From the *DayTrader/branches/2.1.3* directory, type "mvn clean	install" to
+build the project.
+
+
+
+<a name="UsingCriteriaAPIinDayTrader-RunDayTraderonGeronimo"></a>
+## Run DayTrader on Geronimo
+
+This writeup assumes some familiarity with Apache Geronimo. The download
+and documentation can be found at [http://geronimo.apache.org.](http://geronimo.apache.org/)
+
+
+
+
+
+
+
+
+
+
+Install and start the Geronimo server
+
+Add jpa2 plugins from repository [http://geronimo.apache.org/plugins/openjpa2](http://geronimo.apache.org/plugins/openjpa2)
+. One way to do this is the following:
+1. Go to the Geronimo console at http://<host>:8080/console and logon
+1. Select _plugins_
+1. Click on _Add Repository_ and add [http://geronimo.apache.org/plugins/openjpa2](http://geronimo.apache.org/plugins/openjpa2)
+1. Click on _Update Repository List_
+1. Make sure the new repository is selected. Then click on _Show Plugins in
+selected repository._ On that panel:
+1. # Select _GeronimoPlugins, OpenJPA2::CAR 2.1.3-SNAPSHOT_ and
+_GeronimoPlugins, OpenJPA2::Deployer 2.1.3-SNAPSHOT_
+1. # Click on _Install_
+1. On the next screen, click on _Install_
+
+Deploy the DayTrader application. This can be done through the console as
+follows:
+1. Click on _Deploy New_
+1. For _Archive_, browse to
+DayTrader/branches/2.1.3/modules/ear/target/daytrader-ear-2.1.3.ear
+1. For _Plan,_ browse to
+DayTrader/branches/2.1.3/plans/dayTrader-derby-plan.xml
+1. Check _Start app after install_
+1. Click on _Install_
+
+Re-start the server.
+
+Make sure that the system module,
+org.apache.geronimo.configs/axis-deployer/2.1.5/car, is running.
+
+Run DayTrader:
+1. Go to http://<host>:8080/daytrader/
+1. Click on the _Configuration_ tab and click on _(Re)-create DayTrader
+Database Tables and Indexes_
+1. Click on the _Configuration&nbsp;_ tab and click on _(Re)-populate
+DayTrader Database_
+1. Click on the _Trading & Portfolios_ tab, login, and start trading
+
+<a name="UsingCriteriaAPIinDayTrader-RunDayTraderonWebSphere"></a>
+## Run DayTrader on WebSphere
+
+This writeup assumes some familiarity with WebSphere. Also, the script that
+is provided assumes a local unmanaged node with a single server.
+
+At a minimum, the WebSphere Application Server must be at version 7.0.0.9.
+You must also have installed the Feature Pack for OSGi Applications and
+Java Persistence API 2.0. Make sure you have a profile that is augmented
+for JPA 2.0 function.
+
+Download the following jython script. This script is used to configure the
+objects needed by DayTrader (data sources, JMS queues and topics) and
+install the application.
+
+[^daytrader_singleServer.py](^daytrader_singleserver.py.html)
+
+
+Within the bin directory of the augmented profile:
+1. Start the server.
+1. Run the script using the following command: "wsadmin \-f <location of
+daytrader_singleServer.py> <script options>". You can display the list of
+available script options by specifying the option "--help".
+1. Re-start the server.
+
+Run DayTrader
+1. On a web browser, go to http://localhost:<application port>/daytrader/
+(The default application port is 9080. But, you may have a different one if
+you created a new profile.)
+1. Click on the _Configuration_ tab and click on _(Re)-create  DayTrader
+Database Tables and Indexes_
+1. Click on the _Configuration&nbsp;_ tab and click on _(Re)-populate 
+DayTrader Database_
+1. Click on the _Trading & Portfolios_ tab, login, and start  trading

Added: openjpa/site/trunk/content/verifying-release-signatures
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/verifying-release-signatures?rev=1409057&view=auto
==============================================================================
--- openjpa/site/trunk/content/verifying-release-signatures (added)
+++ openjpa/site/trunk/content/verifying-release-signatures Wed Nov 14 01:49:37 2012
@@ -0,0 +1,18 @@
+On unix platforms the following command can be executed : 
+{code}
+for file in `find . -type f -iname '*.asc'`
+do
+    gpg --verify ${file} 
+done
+{code}
+
+You'll need to look at the output contains only good signaturesie :
+{code}
+gpg: Good signature from "Michael Dick (CODE SIGNING KEY) <mikedd@apache.org>"
+gpg: Signature made Tue 12 Jan 2010 05:30:17 PM CST using RSA key ID 7412AD2C
+gpg: Good signature from "Michael Dick (CODE SIGNING KEY) <mikedd@apache.org>"
+gpg: Signature made Tue 12 Jan 2010 05:30:18 PM CST using RSA key ID 7412AD2C
+gpg: Good signature from "Michael Dick (CODE SIGNING KEY) <mikedd@apache.org>"
+gpg: Signature made Tue 12 Jan 2010 05:30:17 PM CST using RSA key ID 7412AD2C
+gpg: Good signature from "Michael Dick (CODE SIGNING KEY) <mikedd@apache.org>"
+{code} 
\ No newline at end of file

Added: openjpa/site/trunk/content/verifying-release-signatures.cwiki
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/verifying-release-signatures.cwiki?rev=1409057&view=auto
==============================================================================
--- openjpa/site/trunk/content/verifying-release-signatures.cwiki (added)
+++ openjpa/site/trunk/content/verifying-release-signatures.cwiki Wed Nov 14 01:49:37 2012
@@ -0,0 +1,18 @@
+On unix platforms the following command can be executed : 
+{code}
+for file in `find . -type f -iname '*.asc'`
+do
+    gpg --verify ${file} 
+done
+{code}
+
+You'll need to look at the output contains only good signaturesie :
+{code}
+gpg: Good signature from "Michael Dick (CODE SIGNING KEY) <mikedd@apache.org>"
+gpg: Signature made Tue 12 Jan 2010 05:30:17 PM CST using RSA key ID 7412AD2C
+gpg: Good signature from "Michael Dick (CODE SIGNING KEY) <mikedd@apache.org>"
+gpg: Signature made Tue 12 Jan 2010 05:30:18 PM CST using RSA key ID 7412AD2C
+gpg: Good signature from "Michael Dick (CODE SIGNING KEY) <mikedd@apache.org>"
+gpg: Signature made Tue 12 Jan 2010 05:30:17 PM CST using RSA key ID 7412AD2C
+gpg: Good signature from "Michael Dick (CODE SIGNING KEY) <mikedd@apache.org>"
+{code} 
\ No newline at end of file

Propchange: openjpa/site/trunk/content/verifying-release-signatures.cwiki
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/site/trunk/content/verifying-release-signatures.mdtext
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/verifying-release-signatures.mdtext?rev=1409057&view=auto
==============================================================================
--- openjpa/site/trunk/content/verifying-release-signatures.mdtext (added)
+++ openjpa/site/trunk/content/verifying-release-signatures.mdtext Wed Nov 14 01:49:37 2012
@@ -0,0 +1,26 @@
+Title: Verifying release signatures
+On unix platforms the following command can be executed : 
+
+    for file in `find . -type f -iname '*.asc'`
+    do
+        gpg --verify ${file} 
+    done
+
+
+You'll need to look at the output contains only good signaturesie :
+
+    gpg: Good signature from "Michael Dick (CODE SIGNING KEY)
+<mikedd@apache.org>"
+    gpg: Signature made Tue 12 Jan 2010 05:30:17 PM CST using RSA key ID
+7412AD2C
+    gpg: Good signature from "Michael Dick (CODE SIGNING KEY)
+<mikedd@apache.org>"
+    gpg: Signature made Tue 12 Jan 2010 05:30:18 PM CST using RSA key ID
+7412AD2C
+    gpg: Good signature from "Michael Dick (CODE SIGNING KEY)
+<mikedd@apache.org>"
+    gpg: Signature made Tue 12 Jan 2010 05:30:17 PM CST using RSA key ID
+7412AD2C
+    gpg: Good signature from "Michael Dick (CODE SIGNING KEY)
+<mikedd@apache.org>"
+

Added: openjpa/site/trunk/content/websphere-application-server
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/websphere-application-server?rev=1409057&view=auto
==============================================================================
--- openjpa/site/trunk/content/websphere-application-server (added)
+++ openjpa/site/trunk/content/websphere-application-server Wed Nov 14 01:49:37 2012
@@ -0,0 +1,8 @@
+h1. Fetch Statistic Tool Usage for Websphere Application Server
+
+h2. Download
+* The latest OpenJPA Tools JAR file can be download from the [SNAPSHOT Repository|https://repository.apache.org/content/groups/snapshots/org/apache/openjpa/openjpa-fetch-statistics-was/] or can be built from the source code in [svn|https://svn.apache.org/repos/asf/openjpa/trunk/openjpa-tools/openjpa-fetch-statistics-was/] by using Maven 2.2.1 and Java SE 6.
+
+h2. Configuration
+* Put openjpa-fetch-statistics-VERSION-was.jar into the WAS_HOME\plugins directory.
+* Run WAS_HOME\bin\osgiCfgInit.sh(bat) to clear the osgi cache.
\ No newline at end of file

Added: openjpa/site/trunk/content/websphere-application-server.cwiki
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/websphere-application-server.cwiki?rev=1409057&view=auto
==============================================================================
--- openjpa/site/trunk/content/websphere-application-server.cwiki (added)
+++ openjpa/site/trunk/content/websphere-application-server.cwiki Wed Nov 14 01:49:37 2012
@@ -0,0 +1,8 @@
+h1. Fetch Statistic Tool Usage for Websphere Application Server
+
+h2. Download
+* The latest OpenJPA Tools JAR file can be download from the [SNAPSHOT Repository|https://repository.apache.org/content/groups/snapshots/org/apache/openjpa/openjpa-fetch-statistics-was/] or can be built from the source code in [svn|https://svn.apache.org/repos/asf/openjpa/trunk/openjpa-tools/openjpa-fetch-statistics-was/] by using Maven 2.2.1 and Java SE 6.
+
+h2. Configuration
+* Put openjpa-fetch-statistics-VERSION-was.jar into the WAS_HOME\plugins directory.
+* Run WAS_HOME\bin\osgiCfgInit.sh(bat) to clear the osgi cache.
\ No newline at end of file

Propchange: openjpa/site/trunk/content/websphere-application-server.cwiki
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/site/trunk/content/websphere-application-server.mdtext
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/websphere-application-server.mdtext?rev=1409057&view=auto
==============================================================================
--- openjpa/site/trunk/content/websphere-application-server.mdtext (added)
+++ openjpa/site/trunk/content/websphere-application-server.mdtext Wed Nov 14 01:49:37 2012
@@ -0,0 +1,15 @@
+Title: Websphere Application Server
+<a name="WebsphereApplicationServer-FetchStatisticToolUsageforWebsphereApplicationServer"></a>
+# Fetch Statistic Tool Usage for Websphere Application Server
+
+<a name="WebsphereApplicationServer-Download"></a>
+## Download
+* The latest OpenJPA Tools JAR file can be download from the [SNAPSHOT Repository](https://repository.apache.org/content/groups/snapshots/org/apache/openjpa/openjpa-fetch-statistics-was/)
+ or can be built from the source code in [svn|https://svn.apache.org/repos/asf/openjpa/trunk/openjpa-tools/openjpa-fetch-statistics-was/]
+ by using Maven 2.2.1 and Java SE 6.
+
+<a name="WebsphereApplicationServer-Configuration"></a>
+## Configuration
+* Put openjpa-fetch-statistics-VERSION-was.jar into the WAS_HOME\plugins
+directory.
+* Run WAS_HOME\bin\osgiCfgInit.sh(bat) to clear the osgi cache.

Added: openjpa/site/trunk/content/whither-openjpa
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/whither-openjpa?rev=1409057&view=auto
==============================================================================
--- openjpa/site/trunk/content/whither-openjpa (added)
+++ openjpa/site/trunk/content/whither-openjpa Wed Nov 14 01:49:37 2012
@@ -0,0 +1,14 @@
+Discussion topics: OpenJPA 1.0, OpenJPA 1.1, JPA 2.0, SDO, etc.
+
+* JPA 2.0: Any of OpenJPA members on the expert group? 
+Patrick will be on the EG. There will be a lurker list set up by each EG member for internal discussions.
+
+* Does Apache want to have representation on the JPA 2.0 EG? There would be an advantage for OpenJPA community members who are not privy to an internal lurker alias, to be able to participate in the discussion.
+AI: Craig poll the openjpa community to see if they want to participate under NDA in the EG under rules established by the Spec Lead. If positive, discuss with Apache JCP representative how to do it. We would need a closed Apache-JPA mail alias for discussion and an EG representative to forward comments to the expert group.
+
+* Roadmap for OpenJPA. It would be nice to have an idea of when releases should come out. 
+What about picking a date, for example, August 20 for branching the release. Everyone who wants a bug fixed for the release, do it by then. Marc has volunteered to be release manager. He goes on vacation August 31 so if the release is delayed beyond that point, someone else needs to push it. AI Craig propose a release date and strategy to the community.
+
+* What about the next releases? 
+Craig earlier volunteered to start the roadmap discussion.
+

Added: openjpa/site/trunk/content/whither-openjpa.cwiki
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/whither-openjpa.cwiki?rev=1409057&view=auto
==============================================================================
--- openjpa/site/trunk/content/whither-openjpa.cwiki (added)
+++ openjpa/site/trunk/content/whither-openjpa.cwiki Wed Nov 14 01:49:37 2012
@@ -0,0 +1,14 @@
+Discussion topics: OpenJPA 1.0, OpenJPA 1.1, JPA 2.0, SDO, etc.
+
+* JPA 2.0: Any of OpenJPA members on the expert group? 
+Patrick will be on the EG. There will be a lurker list set up by each EG member for internal discussions.
+
+* Does Apache want to have representation on the JPA 2.0 EG? There would be an advantage for OpenJPA community members who are not privy to an internal lurker alias, to be able to participate in the discussion.
+AI: Craig poll the openjpa community to see if they want to participate under NDA in the EG under rules established by the Spec Lead. If positive, discuss with Apache JCP representative how to do it. We would need a closed Apache-JPA mail alias for discussion and an EG representative to forward comments to the expert group.
+
+* Roadmap for OpenJPA. It would be nice to have an idea of when releases should come out. 
+What about picking a date, for example, August 20 for branching the release. Everyone who wants a bug fixed for the release, do it by then. Marc has volunteered to be release manager. He goes on vacation August 31 so if the release is delayed beyond that point, someone else needs to push it. AI Craig propose a release date and strategy to the community.
+
+* What about the next releases? 
+Craig earlier volunteered to start the roadmap discussion.
+

Propchange: openjpa/site/trunk/content/whither-openjpa.cwiki
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/site/trunk/content/whither-openjpa.mdtext
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/whither-openjpa.mdtext?rev=1409057&view=auto
==============================================================================
--- openjpa/site/trunk/content/whither-openjpa.mdtext (added)
+++ openjpa/site/trunk/content/whither-openjpa.mdtext Wed Nov 14 01:49:37 2012
@@ -0,0 +1,27 @@
+Title: Whither OpenJPA
+Discussion topics: OpenJPA 1.0, OpenJPA 1.1, JPA 2.0, SDO, etc.
+
+* JPA 2.0: Any of OpenJPA members on the expert group? 
+Patrick will be on the EG. There will be a lurker list set up by each EG
+member for internal discussions.
+
+* Does Apache want to have representation on the JPA 2.0 EG? There would be
+an advantage for OpenJPA community members who are not privy to an internal
+lurker alias, to be able to participate in the discussion.
+AI: Craig poll the openjpa community to see if they want to participate
+under NDA in the EG under rules established by the Spec Lead. If positive,
+discuss with Apache JCP representative how to do it. We would need a closed
+Apache-JPA mail alias for discussion and an EG representative to forward
+comments to the expert group.
+
+* Roadmap for OpenJPA. It would be nice to have an idea of when releases
+should come out. 
+What about picking a date, for example, August 20 for branching the
+release. Everyone who wants a bug fixed for the release, do it by then.
+Marc has volunteered to be release manager. He goes on vacation August 31
+so if the release is delayed beyond that point, someone else needs to push
+it. AI Craig propose a release date and strategy to the community.
+
+* What about the next releases? 
+Craig earlier volunteered to start the roadmap discussion.
+

Added: openjpa/site/trunk/content/wiki
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/wiki?rev=1409057&view=auto
==============================================================================
--- openjpa/site/trunk/content/wiki (added)
+++ openjpa/site/trunk/content/wiki Wed Nov 14 01:49:37 2012
@@ -0,0 +1 @@
+{note}TODO{note}
\ No newline at end of file

Added: openjpa/site/trunk/content/wiki.cwiki
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/wiki.cwiki?rev=1409057&view=auto
==============================================================================
--- openjpa/site/trunk/content/wiki.cwiki (added)
+++ openjpa/site/trunk/content/wiki.cwiki Wed Nov 14 01:49:37 2012
@@ -0,0 +1 @@
+{note}TODO{note}
\ No newline at end of file

Propchange: openjpa/site/trunk/content/wiki.cwiki
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/site/trunk/content/wiki.mdtext
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/wiki.mdtext?rev=1409057&view=auto
==============================================================================
--- openjpa/site/trunk/content/wiki.mdtext (added)
+++ openjpa/site/trunk/content/wiki.mdtext Wed Nov 14 01:49:37 2012
@@ -0,0 +1,2 @@
+Title: Wiki
+{note}TODO{note}

Added: openjpa/site/trunk/content/writing-test-cases-for-openjpa
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/writing-test-cases-for-openjpa?rev=1409057&view=auto
==============================================================================
--- openjpa/site/trunk/content/writing-test-cases-for-openjpa (added)
+++ openjpa/site/trunk/content/writing-test-cases-for-openjpa Wed Nov 14 01:49:37 2012
@@ -0,0 +1,77 @@
+
+h1. Tips on writing TestCase for OpenJPA
+
+You are welcome to contribute new test cases. Following are few suggestions and guidelines on how to contribute new test case to OpenJPA repository of 2000 test cases spread across 400 classes.
+
+{tip:title=Inherit from OpenJPA TestCases}
+Unit Tests are {{JUnit}} Tests. The base JUnit test case implementation {{org.junit.TestCase}} has been extended to facilitate common initialization steps or configuration settings for unit testing OpenJPA. 
+The inheritance hierarchy is:
+{code}
+junit.framework.TestCase
+   +-- org.apache.openjpa.persistence.test.PersistenceTestCase
+       +-- org.apache.openjpa.persistence.test.SingleEMFTestCase
+          +-- org.apache.openjpa.persistence.test.SQLListenerTestCase
+{code}
+As a test developer, you should inherit your test class from one of the extended TestCases. In general, {{SingleEMFTestCase}} is a good candidate to inherit from. If your test needs to analyze or count number of SQL statements, {{SQLListenerTestCase}} should be your choice.
+{tip}
+
+{tip:title=Use correct name and package for test case and entity classes}
+* Test case should be in a separate sub-package of {{org.apache.openjpa.persistence.*}} or {{org.apache.openjpa.persistence.jdbc.*}}
+
+* Test case class names must start with "Test" e.g. {{TestEagerFetch}}
+
+* There are hundreds of testable entity classes. But if your test requires new entity classes, place them in the same package as that of the new Test cases. 
+{tip}
+
+{tip:title=setUp() and tearDown()}
+* OpenJPA TestCases augment the {{setUp()}} method to accept a list of arguments. In this list, you should specify:
+ ** the entity classes used by your test
+ ** the critical configuration properties 
+ ** {{CLEAR_TABLES}} or {{DROP_TABLES}} : these are constants declared in the superclass which clears the existing rows or drops the tables altogether.
+
+* The following is an example {{setUp()}} method 
+{code}
+public void setUp() throws Exception {
+    super.setUp(CLEAR_TABLES,                // clears records for domain classes
+          Candidate.class, Election.class,   // registers Candidate and Election as persistence-capable entity
+          "openjpa.Multithreaded", "true",   // sets configuration property as name-value pairs
+          "openjpa.Log", "SQL=TRACE");       
+}
+{code}
+
+* Notice that some configuration parameters can be set in the {{setUp()}} method of test program itself. This is recommended for properties that are important for your test. The non-critical parameters such as database connection properties (unless your test is about some specific aspect of a particular database) are better be specified in {{META-INF/persistence.xml}}. The persistence name can be specified by overwriting the following method:
+{code}
+protected String getPersistenceUnitName() {
+    return "test-eager-fetch";
+}
+{code}
+
+* {{SingleEMFTestCase}} ensures that {{tearDown()}} method deletes all rows for the domain classes involved in your test. You may want the database records to remain for analysis especially when tests are failing. In that case, you may consider suppressing the superclass behavior of {{tearDown()}} by simply nullifying the method as
+{code}
+public void tearDown() throws Exception {
+     // avoids super class to delete all records
+}
+{code}
+{tip}
+
+{tip:title=Annotate O-R Mapping}
+
+Prefer annotation over XML Descriptors for O-R Mapping because that helps to collocate relevant information. Unless, of course, the test is specific about variations in behavior across annotation and XML Descriptors.
+{tip}
+
+{tip:title=Use JUnit assert*() methods}
+For verification, use many assertion methods provided by {{JUnit}} e.g. {{assertEquals()}} or {{assertTrue()}} rather than depending on printing trace with {{System.out.println()}}. If you want to trace generated SQL or other runtime information, use appropriate {{openjpa.Log}} property settings.
+{tip}
+
+{tip:title=Create JIRA Issue}
+Create a JIRA issue. Refer to the JIRA issue in the comments section of the new test case.
+{tip}
+
+{tip:title=ASF License}
+Remember to include ASF License header in the comment section of all the new source or resource files.
+{tip}
+
+{tip:title=Attach the test to JIRA Issue}
+Package all the *.java files related to your test case in a JAR file and attach it to JIRA issue you have created.
+You must check in the radio button *Grant license to ASF for inclusion in ASF works* that appears near the bottom of *Attach File* JIRA page.
+{tip}
\ No newline at end of file

Added: openjpa/site/trunk/content/writing-test-cases-for-openjpa.cwik
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/writing-test-cases-for-openjpa.cwik?rev=1409057&view=auto
==============================================================================
--- openjpa/site/trunk/content/writing-test-cases-for-openjpa.cwik (added)
+++ openjpa/site/trunk/content/writing-test-cases-for-openjpa.cwik Wed Nov 14 01:49:37 2012
@@ -0,0 +1,116 @@
+Title: writing-test-cases-for-openjpa.mdtext
+
+<a name="writing-test-cases-for-openjpa.mdtext-TipsonwritingTestCaseforOpenJPA"></a>
+# Tips on writing TestCase for OpenJPA
+
+You are welcome to contribute new test cases. Following are few suggestions
+and guidelines on how to contribute new test case to OpenJPA repository of
+2000 test cases spread across 400 classes.
+
+{tip:title=Inherit from OpenJPA TestCases}
+Unit Tests are *JUnit* Tests. The base JUnit test case implementation
+*org.junit.TestCase* has been extended to facilitate common
+initialization steps or configuration settings for unit testing OpenJPA. 
+The inheritance hierarchy is:
+
+    junit.framework.TestCase
+       +-- org.apache.openjpa.persistence.test.PersistenceTestCase
+           +-- org.apache.openjpa.persistence.test.SingleEMFTestCase
+    	  +-- org.apache.openjpa.persistence.test.SQLListenerTestCase
+
+As a test developer, you should inherit your test class from one of the
+extended TestCases. In general, *SingleEMFTestCase* is a good candidate
+to inherit from. If your test needs to analyze or count number of SQL
+statements, *SQLListenerTestCase* should be your choice.
+{tip}
+
+{tip:title=Use correct name and package for test case and entity classes}
+* Test case should be in a separate sub-package of
+*org.apache.openjpa.persistence.** or
+*org.apache.openjpa.persistence.jdbc.**
+
+* Test case class names must start with "Test" e.g. *TestEagerFetch*
+
+* There are hundreds of testable entity classes. But if your test requires
+new entity classes, place them in the same package as that of the new Test
+cases. 
+{tip}
+
+{tip:title=setUp() and tearDown()}
+* OpenJPA TestCases augment the *setUp()* method to accept a list of
+arguments. In this list, you should specify:
+ ** the entity classes used by your test
+ ** the critical configuration properties 
+ ** *CLEAR_TABLES* or *DROP_TABLES* : these are constants declared in
+the superclass which clears the existing rows or drops the tables
+altogether.
+
+* The following is an example *setUp()* method 
+
+    public void setUp() throws Exception {
+        super.setUp(CLEAR_TABLES,		     // clears records for domain
+classes
+    	  Candidate.class, Election.class,   // registers Candidate and
+Election as persistence-capable entity
+    	  "openjpa.Multithreaded", "true",   // sets configuration property
+as name-value pairs
+    	  "openjpa.Log", "SQL=TRACE");	     
+    }
+
+
+* Notice that some configuration parameters can be set in the *setUp()*
+method of test program itself. This is recommended for properties that are
+important for your test. The non-critical parameters such as database
+connection properties (unless your test is about some specific aspect of a
+particular database) are better be specified in
+*META-INF/persistence.xml*. The persistence name can be specified by
+overwriting the following method:
+
+    protected String getPersistenceUnitName() {
+        return "test-eager-fetch";
+    }
+
+
+* *SingleEMFTestCase* ensures that *tearDown()* method deletes all rows
+for the domain classes involved in your test. You may want the database
+records to remain for analysis especially when tests are failing. In that
+case, you may consider suppressing the superclass behavior of
+*tearDown()* by simply nullifying the method as
+
+    public void tearDown() throws Exception {
+         // avoids super class to delete all records
+    }
+
+{tip}
+
+{tip:title=Annotate O-R Mapping}
+
+Prefer annotation over XML Descriptors for O-R Mapping because that helps
+to collocate relevant information. Unless, of course, the test is specific
+about variations in behavior across annotation and XML Descriptors.
+{tip}
+
+{tip:title=Use JUnit assert*() methods}
+For verification, use many assertion methods provided by *JUnit* e.g.
+*assertEquals()* or *assertTrue()* rather than depending on printing
+trace with *System.out.println()*. If you want to trace generated SQL or
+other runtime information, use appropriate *openjpa.Log* property
+settings.
+{tip}
+
+{tip:title=Create JIRA Issue}
+Create a JIRA issue. Refer to the JIRA issue in the comments section of the
+new test case.
+{tip}
+
+{tip:title=ASF License}
+Remember to include ASF License header in the comment section of all the
+new source or resource files.
+{tip}
+
+{tip:title=Attach the test to JIRA Issue}
+Package all the *.java files related to your test case in a JAR file and
+attach it to JIRA issue you have created.
+You must check in the radio button *Grant license to ASF for inclusion in
+ASF works* that appears near the bottom of *Attach File* JIRA page.
+{tip}

Added: openjpa/site/trunk/content/writing-test-cases-for-openjpa.cwiki
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/writing-test-cases-for-openjpa.cwiki?rev=1409057&view=auto
==============================================================================
--- openjpa/site/trunk/content/writing-test-cases-for-openjpa.cwiki (added)
+++ openjpa/site/trunk/content/writing-test-cases-for-openjpa.cwiki Wed Nov 14 01:49:37 2012
@@ -0,0 +1,77 @@
+
+h1. Tips on writing TestCase for OpenJPA
+
+You are welcome to contribute new test cases. Following are few suggestions and guidelines on how to contribute new test case to OpenJPA repository of 2000 test cases spread across 400 classes.
+
+{tip:title=Inherit from OpenJPA TestCases}
+Unit Tests are {{JUnit}} Tests. The base JUnit test case implementation {{org.junit.TestCase}} has been extended to facilitate common initialization steps or configuration settings for unit testing OpenJPA. 
+The inheritance hierarchy is:
+{code}
+junit.framework.TestCase
+   +-- org.apache.openjpa.persistence.test.PersistenceTestCase
+       +-- org.apache.openjpa.persistence.test.SingleEMFTestCase
+          +-- org.apache.openjpa.persistence.test.SQLListenerTestCase
+{code}
+As a test developer, you should inherit your test class from one of the extended TestCases. In general, {{SingleEMFTestCase}} is a good candidate to inherit from. If your test needs to analyze or count number of SQL statements, {{SQLListenerTestCase}} should be your choice.
+{tip}
+
+{tip:title=Use correct name and package for test case and entity classes}
+* Test case should be in a separate sub-package of {{org.apache.openjpa.persistence.*}} or {{org.apache.openjpa.persistence.jdbc.*}}
+
+* Test case class names must start with "Test" e.g. {{TestEagerFetch}}
+
+* There are hundreds of testable entity classes. But if your test requires new entity classes, place them in the same package as that of the new Test cases. 
+{tip}
+
+{tip:title=setUp() and tearDown()}
+* OpenJPA TestCases augment the {{setUp()}} method to accept a list of arguments. In this list, you should specify:
+ ** the entity classes used by your test
+ ** the critical configuration properties 
+ ** {{CLEAR_TABLES}} or {{DROP_TABLES}} : these are constants declared in the superclass which clears the existing rows or drops the tables altogether.
+
+* The following is an example {{setUp()}} method 
+{code}
+public void setUp() throws Exception {
+    super.setUp(CLEAR_TABLES,                // clears records for domain classes
+          Candidate.class, Election.class,   // registers Candidate and Election as persistence-capable entity
+          "openjpa.Multithreaded", "true",   // sets configuration property as name-value pairs
+          "openjpa.Log", "SQL=TRACE");       
+}
+{code}
+
+* Notice that some configuration parameters can be set in the {{setUp()}} method of test program itself. This is recommended for properties that are important for your test. The non-critical parameters such as database connection properties (unless your test is about some specific aspect of a particular database) are better be specified in {{META-INF/persistence.xml}}. The persistence name can be specified by overwriting the following method:
+{code}
+protected String getPersistenceUnitName() {
+    return "test-eager-fetch";
+}
+{code}
+
+* {{SingleEMFTestCase}} ensures that {{tearDown()}} method deletes all rows for the domain classes involved in your test. You may want the database records to remain for analysis especially when tests are failing. In that case, you may consider suppressing the superclass behavior of {{tearDown()}} by simply nullifying the method as
+{code}
+public void tearDown() throws Exception {
+     // avoids super class to delete all records
+}
+{code}
+{tip}
+
+{tip:title=Annotate O-R Mapping}
+
+Prefer annotation over XML Descriptors for O-R Mapping because that helps to collocate relevant information. Unless, of course, the test is specific about variations in behavior across annotation and XML Descriptors.
+{tip}
+
+{tip:title=Use JUnit assert*() methods}
+For verification, use many assertion methods provided by {{JUnit}} e.g. {{assertEquals()}} or {{assertTrue()}} rather than depending on printing trace with {{System.out.println()}}. If you want to trace generated SQL or other runtime information, use appropriate {{openjpa.Log}} property settings.
+{tip}
+
+{tip:title=Create JIRA Issue}
+Create a JIRA issue. Refer to the JIRA issue in the comments section of the new test case.
+{tip}
+
+{tip:title=ASF License}
+Remember to include ASF License header in the comment section of all the new source or resource files.
+{tip}
+
+{tip:title=Attach the test to JIRA Issue}
+Package all the *.java files related to your test case in a JAR file and attach it to JIRA issue you have created.
+You must check in the radio button *Grant license to ASF for inclusion in ASF works* that appears near the bottom of *Attach File* JIRA page.
+{tip}
\ No newline at end of file

Propchange: openjpa/site/trunk/content/writing-test-cases-for-openjpa.cwiki
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/site/trunk/content/writing-test-cases-for-openjpa.mdtext
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/writing-test-cases-for-openjpa.mdtext?rev=1409057&view=auto
==============================================================================
--- openjpa/site/trunk/content/writing-test-cases-for-openjpa.mdtext (added)
+++ openjpa/site/trunk/content/writing-test-cases-for-openjpa.mdtext Wed Nov 14 01:49:37 2012
@@ -0,0 +1,116 @@
+Title: Writing Test Cases For OpenJPA
+
+<a name="WritingTestCasesForOpenJPA-TipsonwritingTestCaseforOpenJPA"></a>
+# Tips on writing TestCase for OpenJPA
+
+You are welcome to contribute new test cases. Following are few suggestions
+and guidelines on how to contribute new test case to OpenJPA repository of
+2000 test cases spread across 400 classes.
+
+{tip:title=Inherit from OpenJPA TestCases}
+Unit Tests are *JUnit* Tests. The base JUnit test case implementation
+*org.junit.TestCase* has been extended to facilitate common
+initialization steps or configuration settings for unit testing OpenJPA. 
+The inheritance hierarchy is:
+
+    junit.framework.TestCase
+       +-- org.apache.openjpa.persistence.test.PersistenceTestCase
+           +-- org.apache.openjpa.persistence.test.SingleEMFTestCase
+    	  +-- org.apache.openjpa.persistence.test.SQLListenerTestCase
+
+As a test developer, you should inherit your test class from one of the
+extended TestCases. In general, *SingleEMFTestCase* is a good candidate
+to inherit from. If your test needs to analyze or count number of SQL
+statements, *SQLListenerTestCase* should be your choice.
+{tip}
+
+{tip:title=Use correct name and package for test case and entity classes}
+* Test case should be in a separate sub-package of
+*org.apache.openjpa.persistence.** or
+*org.apache.openjpa.persistence.jdbc.**
+
+* Test case class names must start with "Test" e.g. *TestEagerFetch*
+
+* There are hundreds of testable entity classes. But if your test requires
+new entity classes, place them in the same package as that of the new Test
+cases. 
+{tip}
+
+{tip:title=setUp() and tearDown()}
+* OpenJPA TestCases augment the *setUp()* method to accept a list of
+arguments. In this list, you should specify:
+ ** the entity classes used by your test
+ ** the critical configuration properties 
+ ** *CLEAR_TABLES* or *DROP_TABLES* : these are constants declared in
+the superclass which clears the existing rows or drops the tables
+altogether.
+
+* The following is an example *setUp()* method 
+
+    public void setUp() throws Exception {
+        super.setUp(CLEAR_TABLES,		     // clears records for domain
+classes
+    	  Candidate.class, Election.class,   // registers Candidate and
+Election as persistence-capable entity
+    	  "openjpa.Multithreaded", "true",   // sets configuration property
+as name-value pairs
+    	  "openjpa.Log", "SQL=TRACE");	     
+    }
+
+
+* Notice that some configuration parameters can be set in the *setUp()*
+method of test program itself. This is recommended for properties that are
+important for your test. The non-critical parameters such as database
+connection properties (unless your test is about some specific aspect of a
+particular database) are better be specified in
+*META-INF/persistence.xml*. The persistence name can be specified by
+overwriting the following method:
+
+    protected String getPersistenceUnitName() {
+        return "test-eager-fetch";
+    }
+
+
+* *SingleEMFTestCase* ensures that *tearDown()* method deletes all rows
+for the domain classes involved in your test. You may want the database
+records to remain for analysis especially when tests are failing. In that
+case, you may consider suppressing the superclass behavior of
+*tearDown()* by simply nullifying the method as
+
+    public void tearDown() throws Exception {
+         // avoids super class to delete all records
+    }
+
+{tip}
+
+{tip:title=Annotate O-R Mapping}
+
+Prefer annotation over XML Descriptors for O-R Mapping because that helps
+to collocate relevant information. Unless, of course, the test is specific
+about variations in behavior across annotation and XML Descriptors.
+{tip}
+
+{tip:title=Use JUnit assert*() methods}
+For verification, use many assertion methods provided by *JUnit* e.g.
+*assertEquals()* or *assertTrue()* rather than depending on printing
+trace with *System.out.println()*. If you want to trace generated SQL or
+other runtime information, use appropriate *openjpa.Log* property
+settings.
+{tip}
+
+{tip:title=Create JIRA Issue}
+Create a JIRA issue. Refer to the JIRA issue in the comments section of the
+new test case.
+{tip}
+
+{tip:title=ASF License}
+Remember to include ASF License header in the comment section of all the
+new source or resource files.
+{tip}
+
+{tip:title=Attach the test to JIRA Issue}
+Package all the *.java files related to your test case in a JAR file and
+attach it to JIRA issue you have created.
+You must check in the radio button *Grant license to ASF for inclusion in
+ASF works* that appears near the bottom of *Attach File* JIRA page.
+{tip}

Added: openjpa/site/trunk/export.xml
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/export.xml?rev=1409057&view=auto
==============================================================================
--- openjpa/site/trunk/export.xml (added)
+++ openjpa/site/trunk/export.xml Wed Nov 14 01:49:37 2012
@@ -0,0 +1,150 @@
+<!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.
+-->
+##
+#set ($images = "http://openjpa.apache.org/images")
+#set ($siteroot = "http://openjpa.apache.org")
+#set ($pageContentHeaderEnabled = false)
+##
+#set($globalHelper = $action.getHelper())
+#set($renderer = $globalHelper.getWikiStyleRenderer())
+##
+<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 rel="schema.DC" href="http://purl.org/DC/elements/1.0/">
+    <META name="Description" content="Apache OpenJPA -- $page.title" />
+    <META name="Keywords" content="Apache OpenJPA, JPA, JPA 1.0, JSR-220, JPA2, JPA 2.0, JSR-317, $page.title" />
+    <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 -- $page.title
+    </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="top_red_bar">
+          <div id="site-breadcrumbs">
+            <!-- Breadcrumbs -->
+$autoexport.breadcrumbs($page)
+            <!-- Breadcrumbs -->
+          </div>
+          <div id="site-quicklinks">
+            <!-- Quicklinks -->
+#set($child = $pageManager.getPage($page.space.key,"QuickLinks"))
+#set($content = $renderer.convertWikiToXHtml($child.toPageContext(), $child.content).trim())
+#set($content = $content.replaceAll("^<[pP]>|</[pP]>$", "") )
+$content
+            <a href="$confluenceUri/pages/editpage.action?pageId=$page.id">Edit</a>
+            <!-- Quicklinks -->
+          </div>
+        </div>
+
+    <!-- Content -->
+    <table border="0">
+    <tbody>
+      <tr>
+        <td valign="top">
+          <div class="navigation">
+            <div class="navigation_top">
+              <div class="navigation_bottom">
+                <!-- NavigationBar -->
+#set($child = $pageManager.getPage($page.space.key,"SideNav"))
+#set($content = $renderer.convertWikiToXHtml($child.toPageContext(), $child.content).trim())
+#set($content = $content.replaceAll("^<[pP]>|</[pP]>$", "") )
+$content
+                <!-- NavigationBar -->
+              </div>
+            </div>
+          </div>
+        </td>
+        <td valign="top" width="100%" style="overflow:hidden;">
+          <div class="wiki-content">
+          $body
+          </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,2010 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>

Propchange: openjpa/site/trunk/export.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/site/trunk/lib/path.pm
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/lib/path.pm?rev=1409057&view=auto
==============================================================================
--- openjpa/site/trunk/lib/path.pm (added)
+++ openjpa/site/trunk/lib/path.pm Wed Nov 14 01:49:37 2012
@@ -0,0 +1,41 @@
+package path;
+
+# The following was gleefully borrowed from OpenEJB's explanation (thanks!). 
+# The @patterns array is used to map filepaths to page treatments.  Each
+# element must be an arrayref with 3 elements of its own: a regex pattern for
+# selecting filepaths, the name of the subroutine from view.pm which will be
+# invoked to generate the page, and a hashref of named parameters which will
+# be passed to the view subroutine.
+
+our @patterns = (
+    [qr!^/.*\.html$!,   normal_page => {} ],
+    [qr!^/.*\.mdtext$!, normal_page => { template=>"standard_markdown.html" } ],
+);
+
+# This explanation was also -stolen- borrowed from OpenEJB. 
+# The %dependecies hash is used when building pages that reference or depend
+# upon other pages -- e.g. a sitemap, which depends upon the pages that it
+# links to.  The keys for %dependencies are filepaths, and the values are
+our %dependencies = ();
+
+1;
+
+=head1 LICENSE
+
+           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.
+

Propchange: openjpa/site/trunk/lib/path.pm
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/site/trunk/lib/view.pm
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/lib/view.pm?rev=1409057&view=auto
==============================================================================
--- openjpa/site/trunk/lib/view.pm (added)
+++ openjpa/site/trunk/lib/view.pm Wed Nov 14 01:49:37 2012
@@ -0,0 +1,97 @@
+package view;
+
+#
+# BUILD CONSTRAINT:  all views must return $content, $extension.
+# additional return values (as seen below) are optional.  However,
+# careful use of symlinks and dependency management in path.pm can
+# resolve most issues with this constraint.
+#
+
+use strict;
+use warnings;
+use Dotiac::DTL qw/Template/;
+use Dotiac::DTL::Addon::markup;
+use ASF::Util qw/read_text_file/;
+
+push @Dotiac::DTL::TEMPLATE_DIRS, "templates";
+
+# This is most widely used view.  It takes a
+# 'template' argument and a 'path' argument.
+# Assuming the path ends in foo.mdtext, any files
+# like foo.page/bar.mdtext will be parsed and
+# passed to the template in the "bar" (hash)
+# variable.
+sub normal_page {
+    my %args = @_;
+    my $file = "content$args{path}";
+    $args{path} =~ s/\.mdtext$/\.html/;
+
+    my $template = $file;
+    if($args{template}) {
+       $template = $args{template};
+    }
+
+    read_text_file $file, \%args;
+    $args{breadcrumbs} = breadcrumbs($args{path}, $args{headers});
+
+    my $page_path = $file;
+    $page_path =~ s/\.[^.]+$/.page/;
+    if (-d $page_path) {
+        for my $f (grep -f, glob "$page_path/*.mdtext") {
+            $f =~ m!/([^/]+)\.mdtext$! or die "Bad filename: $f\n";
+            $args{$1} = {};
+            read_text_file $f, $args{$1};
+        }
+    }
+
+    return Dotiac::DTL::Template($template)->render(\%args), html => \%args;
+}
+
+# Generates cwiki-style breadcrumbs
+sub breadcrumbs {
+    my ($fullpath, $headerref) = @_;
+    my @titles = split m!/!, $fullpath;
+    my @paths = split m!/!, $fullpath;
+
+    if($paths[scalar@paths-1] =~ /^index/) { 
+      pop @titles; 
+      pop @paths; 
+    } else {
+      if($headerref && $headerref->{title}) {
+         $titles[scalar@titles-1] = $headerref->{title};
+      }
+    }
+    $titles[0] = "Home";
+
+    my @rv;
+    my $relpath = "/";
+    for(my $i=0; $i<scalar @paths; $i++) {
+        my $title = $titles[$i];
+        $relpath .= $paths[$i];
+        push @rv, qq(<a href="$relpath">\u$title</a>);
+        unless($relpath eq "/") { $relpath .= "/"; }
+    }
+    return join "&nbsp;&raquo&nbsp;", @rv;
+}
+
+1;
+
+=head1 LICENSE
+
+           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.
+

Propchange: openjpa/site/trunk/lib/view.pm
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/site/trunk/start_markdown.sh
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/start_markdown.sh?rev=1409057&view=auto
==============================================================================
--- openjpa/site/trunk/start_markdown.sh (added)
+++ openjpa/site/trunk/start_markdown.sh Wed Nov 14 01:49:37 2012
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+# path to https://svn.apache.org/repos/infra/websites/cms/build
+# change this to match your environment
+
+CMS_BUILD_PATH=~/cms/cms/build
+
+export MARKDOWN_SOCKET=${CMS_BUILD_PATH}/markdown.socket
+export PYTHONPATH=${CMS_BUILD_PATH}
+
+python ${CMS_BUILD_PATH}/markdownd.py
+
+

Propchange: openjpa/site/trunk/start_markdown.sh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: openjpa/site/trunk/start_markdown.sh
------------------------------------------------------------------------------
    svn:executable = *

Added: openjpa/site/trunk/templates/standard.html
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/templates/standard.html?rev=1409057&view=auto
==============================================================================
--- openjpa/site/trunk/templates/standard.html (added)
+++ openjpa/site/trunk/templates/standard.html Wed Nov 14 01:49:37 2012
@@ -0,0 +1,176 @@
+<!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 rel="schema.DC" href="http://purl.org/DC/elements/1.0/">
+        <META name="Description" content="Apache OpenJPA -- {% block title %}{% endblock %}" />
+        <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="{{base}}images/header-bg3.png">
+                                <TR>
+                                    <TD valing="top" align="left">
+                                        <A href="http://openjpa.apache.org/"><IMG src="{{base}}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="{{base}}images/asf_logo_wide2.png" border="0" alt="ASF Logo"></A>
+                                    </TD>
+                                </TR>
+                            </TABLE>
+
+                            <!-- Navigation Bar -->
+                            <div class="top_red_bar">
+                                <div id="site-breadcrumbs">
+                                    <!-- Breadcrumbs -->
+                                    {{ breadcrumbs|safe }}
+                                    <!-- 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>Overview</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>-->
+                                                        <h3>Community</h3>
+
+                                                        <ul class="alternate" type="square">
+                                                            <li><a href="events-and-news.html" 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>-->
+                                                        <h3>Development</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="15" 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">
+                                                {% block content %} {% endblock %}
+                                            </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,2010 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>

Propchange: openjpa/site/trunk/templates/standard.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/site/trunk/templates/standard_markdown.html
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/templates/standard_markdown.html?rev=1409057&view=auto
==============================================================================
--- openjpa/site/trunk/templates/standard_markdown.html (added)
+++ openjpa/site/trunk/templates/standard_markdown.html Wed Nov 14 01:49:37 2012
@@ -0,0 +1,3 @@
+{% extends "standard.html" %}
+{% block title %}{{ headers.title }}{% endblock %}
+{% block content %}{{ content|markdown }}{% endblock %}

Propchange: openjpa/site/trunk/templates/standard_markdown.html
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message