Sample Application For OCE-JPA Developer Exam

We are very serious about the quality of our mock exams. All our questions and explanations are thoroughly tested by developing sample programs. We did the same for our mock exams for OCE-Java Persistent API Developer exam. This toy application includes a lot of sample code for all kinds of situations encountered in developing JPA applications, including JPQL Queries, Criteria Queries, Attribute Overrides, Call back methods, OBject Relationship Mapping.

Features

  • Includes all kinds of entity relationships.
  • Primes the database with sample data.
  • Provides a simple GUI to enter queries and see the result.
  • Allows you to write arbitrary Criteria Builder and Business Logic code and run without having you go through save-compile-deploy-run cycle.
  • Clean, short, and striaght forward code and data model.
  • Does not require to be run inside a container.
  • Uses Java DB (Derby), which comes bundled with most IDEs.
  • Packaged as a Maven project, so you can just extract the contents, and load the project straight away in any IDE such as Netbeans, Eclipse, or IntelliJ. (Most IDEs have Maven built in.)
  • Uses Hibernate as its persistence provider.

Data Model
Client GUI

How to run

  • Download ToyAppForJPA.zip and extract to any folder.
  • Go to your IDE, use Open Project menu and point to this folder.
  • Do Clean and Build. It will download all necessary libraries from Maven's Central Repository.
  • In your IDE, go to services, start Java DB, and create a database named "toyjpadb". Let the username and password be empty.
  • Run guiclient.JPATest. It should pop up the GUI.
  • Before you fire the queries, click on "Init DB" to populate the database.
  • Dig into the code to see how it works :)

Note: We have tested the process on NetBeans 7.0, but it should work for all other IDEs.

If you have any question, please post it on JPA Certification Forum.