Improve excludeUnlistedClasses support in OSGi

Description

Some containers (ex: Aries) always return true for PersistenceUnitInfo#excludeUnlistedClasses, even if your persistence.xml explicitly has exclude-unlisted-classes set to false. They claim it's to protect JPA providers from having to implement scanning ("we handle it for you"), even though we still want to support it in many cases. The work around is to set hibernate.archive.autodetection to, for example, hbm,class. This tells hibernate to ignore the excludeUnlistedClasses value and scan for *.hbm.xml and entities regardless.

may have helped – test

Worst case scenario, look into forcing hibernate.archive.autodetection=hbm,class from within hibernate-osgi

Activity

Show:
Out of Date

Details

Assignee

Reporter

Priority

Created September 19, 2013 at 8:12 PM
Updated May 5, 2022 at 10:09 AM
Resolved May 5, 2022 at 10:09 AM