Skip to content

Database Configuration

MaxKissgen edited this page Sep 12, 2021 · 4 revisions

JPA and persistence.xml

The service makes use of the Java Persistence API (JPA) specification to simplify database access. The JPA implementation that is being used is EclipseLink. If you want to use the service with another database or change some aspects of the database configuration you must adapt the following files accordingly.

  • rest_ocd_services/src/main/java/META-INF/persistence.xml: This database configuration is used for the actual execution of the service through the service jar (e.g. when running bin/start_network.bat)
  • rest_ocd_services/src/main/java/META-INF/testing/persistence.xml: This database configuration is used during jUnit testing.

The file locations are different in the old ant build:

  • ocd/eclipselink/persistence.xml for the execution
  • src/META-INF/persistence.xml for testing