persistence icon indicating copy to clipboard operation
persistence copied to clipboard

@PersistenceModule

Open gavinking opened this issue 3 weeks ago • 0 comments

This change introduces:

  • a way to declare a Java module as defining a persistence unit (or "persistence archive" in language we were using early on), that is, a package of entities and related code, along with XML mapping files, and
  • an annotation for specifying "static" configuration information which does not vary with the deployment, as an alternative to persistence.xml, and
  • a way to segregate deployment-specific information into a separate .properties file.

See https://github.com/jakartaee/persistence/issues/701#issuecomment-3683334139.

NOTE: This proposal is on ice until I can get feedback from someone else who is prepared to spend time thinking carefully about what a "persistence unit" or "persistence module" is going to mean in the future. Since I have not been able to gather such feedback yet, this feature is not currently planned for JPA 4.

gavinking avatar Dec 22 '25 18:12 gavinking