diff --git a/openjpa-examples/openbooks/index.html b/openjpa-examples/openbooks/index.html index c286ea88d..0b8be3afe 100644 --- a/openjpa-examples/openbooks/index.html +++ b/openjpa-examples/openbooks/index.html @@ -19,19 +19,49 @@ under the License. + + + + +

OpenBooks: A sample JPA 2.0 Application


OpenBooks is a sample (and perhaps simple) application to demonstrate some of the new features of - version 2.0 of Java Persistence API (JPA) specification. + version 2.0 of Java Persistence API (JPA) specification, such as
+
  • Creating dynamic Criteria Query from an input form +
  • Using compound, derived identity and orphan delete for modeling composite relationship +
  • Browsing Persistent Domain Model via MetaModel API +
    + OpenBooks runs with OpenJPA as its JPA provider.
    -

    Instructions to run OpenBooks Demo

    +

    Instructions to download and run OpenBooks Demo

    + OpenBooks comes with complete source code, build scripts to demonstrate how to build a typical OpenJPA application + and scripts to run OpenBooks in on your local database installation. Follow the simple instructions below: +
    1. Download OpenBooks distribution. -
    2. Install OpenBooks distribution -
    3. Edit for your local environment +
    4. Build OpenBooks from source +
    5. Edit for your local environment to run
    6. Populate a Database
    7. Run OpenBooks
    @@ -39,8 +69,12 @@ under the License.

    Download Instructions

    OpenBooks is distributed under Apache License, Version 2.0
    - OpenBooks can be downloaded from here. + OpenBooks can be checked out from OpenJPA repository. +
    + $ svn co https://svn.apache.org/repos/asf/openjpa/trunk/openjpa-examples/openbooks.

    + will check out the source code and build scripts of OpenBooks in current directory. + OpenBooks require following software environment to run:

    1. Java Runtime version 6.0 or higher @@ -49,30 +83,26 @@ under the License.
    2. Any JDBC complaint database supported by OpenJPA. See OpenJPA documentation for a list of supported databases.
    - -

    Install OpenBooks distribution

    - Unzip openbooks.zip to a directory. Following instructions assume this directory as - your current directory.
    - The files included in this distribution are: -
  • index.html : the file you are reading -
  • openbooks.jar : OpenBooks class library -
  • run.xml : Ant script to run OpenBooks -
  • run.properties : The configuration for your execution environment used by Ant script -
  • load.properties : The configuration for loading initial data into OpenBooks. -
  • demo.properties: Properties to configure the demonstation GUI. -
  • META-INF/persistence.xml: The configuration for OpenJPA runtime -
  • slides/: Directory containing the default presentation accompanying this demonstration. -
  • source/: Directory containing the source code for OpenBooks -
  • LICENSE.txt: Apache License -
  • NOTICE.txt: Copyright Notice -
    -


    -

    Configure OpenBooks for your local environment

    + + +

    Build OpenBooks from source

    + OpenBooks builds with Ant. Before you run a build, configure the build environment by editing + build.properties. Essentially you need to point to OpenJPA class library. + The file is commented on what is to be edited. Once you have edited build.properties, simply issue +
    + $ ant package deploy +
    + This will compile the source code, generate metamodel classes, enhance the persistence domain model, package + the application and copy it to a target/openbooks directory. +
    + +

    Edit for your local environment to run

    + Now go to the deploy directory i.e. target/openbooks directory
      -
    1. Edit run.properties to specify location of OpenJPA class libraries and JDBC Driver -
    2. Edit META-INF/persistence.xml to specify database properties -
    3. Edit load.properties to specify load parameters such as number of Books etc. +
    4. Edit run.properties to specify location of OpenJPA class libraries and JDBC Driver +
    5. Edit META-INF/persistence.xml to specify database properties +
    6. Edit load.properties to specify load parameters such as number of Books etc. This example file has some typical values. If you are satisfied with it, you can leave them as it is.

    @@ -80,6 +110,7 @@ under the License. Invoke the Ant script to populate the database.
    $ ant -f run.xml load
    +

    Run OpenBooks

    Invoke the Ant script to run OpenBooks
    $ ant -f run.xml run