Both Apache Isis and DataNucleus have their own metamodels of the domain entities. Isis builds its metamodel by walking the graph of types from the services registered in
isis.properties. The JDO objectstore then takes these types and registers them with DataNucleus.
In some cases, though, not every entity type is discoverable from the API of the service actions. This is especially the case if you have lots of subtypes (where the action method specifies only the supertype). In such cases the Isis and JDO metamodels is built lazily, when an instance of that (sub)type is first encountered.
Isis is quite happy for the metamodel to be lazily created, and - to be fair - DataNucleus also works well in most cases. In some cases, though, we have found that the JDBC driver (eg HSQLDB) will deadlock if DataNucleus tries to submit some DDL (for a lazily discovered type) intermingled with DML (for updating).
In any case, it's probably not good practice to have DataNucleus work this way. The
RegisterEntities service can therefore be registered in order to do the eager registration. It searches for all
@PersistenceCapable entities under specified package(s), and registers them all.
We strongly recommend that you register this service as a matter of course
Register like any other service in
isis.services=...other services...,\ org.apache.isis.objectstore.jdo.service.RegisterEntities,\ ...
persistor_datanucleus.properties, specify the package prefix(es) of your application, to provide a hint for finding the
The value of this property can be a comma-separated list, if you wish.
All edits are reviewed before going live, so feel free to do much more than fix typos or links. If you see a page that could benefit from an entire rewrite, we'd be thrilled to review it. Don't be surprised if we like it so much we ask you for help with other pages :)NOTICE: unless indicated otherwise on the pages in question, all editable content available from apache.org is presumed to be licensed under the Apache License (AL) version 2.0 and hence all submissions to apache.org treated as formal Contributions under the license terms.