A.5. Update the Configuration

The main changes we need to make are for Naked Objects' configuration (as discussed in Section 7.1, “Configure Naked Objects”) and for Hibernate itself (as discussed in Section 7.2, “Configure Hibernate”). Follow the steps described there, configuring (a) the persistor key, (b) the reflector key, (c) disable the bytecode providers and (d) registering the JPA repository implementations. For the last of these, the service implementations to specify should be:

nakedobjects.services=jpa.service.employee.EmployeeRepositoryJpa,\
                      jpa.service.claim.ClaimRepositoryJpa

For Hibernate, make sure that the JDBC driver, username, password and URL are correct, as well as the dialect. If using the PostgreSQL database (as described earlier in Section A.2, “Set up a Relational Database”) then the settings to use are:

<property name="connection.driver_class">org.postgresql.Driver</property>
<property name="connection.username">claims</property>
<property name="connection.password">claims</property>
<property name="connection.url">jdbc:postgresql://localhost/claims_db</property>
<property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>