[
https://issues.apache.org/jira/browse/ARIES-1624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15551342#comment-15551342
]
Timothy Ward commented on ARIES-1624:
-------------------------------------
This needs to be thought about carefully as it does represent a significant
change in behaviour. Specifically, Aries JPA can only scan for the standard JPA
annotations. JPA providers (e.g. Hibernate) may define their own additional
annotations which Aries JPA will not know about. Currently Hibernate can scan
to find those types, but the proposed change will break that behaviour.
I'm not wild about "lying" to the Persistence Provider, but scanning is usually
done pretty naively by JPA providers (i.e. expecting file: or jar: URL schemes)
so we probably do need to do something like this. At the very least there
should be a property that can be used to override this behaviour in the
EntityManagerFactoryBuilder though.
> Aries JPA should tell provider tonot scan classes by default
> ------------------------------------------------------------
>
> Key: ARIES-1624
> URL: https://issues.apache.org/jira/browse/ARIES-1624
> Project: Aries
> Issue Type: Improvement
> Components: JPA
> Affects Versions: jpa-2.4.0
> Reporter: Christian Schneider
> Assignee: Christian Schneider
> Fix For: jpa-2.5.0
>
>
> As Aries JPA does the scanning itself it should always tell the
> PersistenceProvider to not scan.
> So it should set when calling it
> <exclude-unlisted-classes>true</exclude-unlisted-classes>
> https://github.com/apache/aries/blob/trunk/jpa/jpa-container/src/main/java/org/apache/aries/jpa/container/parser/impl/PersistenceUnit.java#L217
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)