We need a way to disable metadata scanning. It takes too much time on startup.
There is the persistence.xml element _exclude-unlisted-classes_ and the hibernate option _hibernate.archive.autodetection_ but they don't disable the time consuming class/hbm scan for entity mapping metadata.
Possible solution is to implement a _Scanner_ that returns empty _ScanResult_ and pass it on _hibernate.archive.scanner_. The pull request does this with _DisabledScanner_.
Usage: In persistence.xml set the property _hibernate.archive.scanner_ as follows.
{noformat} <property name="hibernate.archive.scanner" value="org.hibernate.boot.archive.scan.internal.DisabledScanner"/> {noformat} |
|