P (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *updated* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiYmUyMmJlMjBj...
) / New Feature (
https://hibernate.atlassian.net/browse/HHH-13924?atlOrigin=eyJpIjoiYmUyMm...
) HHH-13924 (
https://hibernate.atlassian.net/browse/HHH-13924?atlOrigin=eyJpIjoiYmUyMm...
) Hibernate must also scan for persistence.xml in module-path if Java 9+ (
https://hibernate.atlassian.net/browse/HHH-13924?atlOrigin=eyJpIjoiYmUyMm...
)
Change By: P (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
JPMS appeared in Java 9, now Java 14 is available. Starting from Java 9 we have two types
of path:
# – class-path
# --module-path.
If JPMS is used in application then, as a rule, no class-path is used.
So I suggest to add scanning for persistence.xml also in module-path if Java9+. Although
according to JPA specs persistence.xml file has to be located in the META-INF directory in
the classpath, all we know that there was no JPMS when JPA specs was written.
At the same time module Hibernate as JPA provider - path scanning > persistence.xml
must be enabled only explicitly for example via java system property.
At the same time JPMS layers can be created dynamically and modules that are not on --
classpath, but now there is module-path and class-path can be added there not used at
all.
I suggest to create spi service that will be used by hibernate to get path (for example,
URL) to persistence.xml files. It can be optional.
(
https://hibernate.atlassian.net/browse/HHH-13924#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-13924#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100127- sha1:ff24dc8 )