Option to disable scanning of entity mapping metadata

Description

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.

Environment

None

Status

Assignee

Chris Cranford

Reporter

Petteri Pitkänen

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Minor
Configure