Using an initialized EntityManagerFactory is convenient because it provides a wide range of information that we don't need to determine ourselves. Initializing Hibernate comes with the risk of configuration arrangements that we cannot satisfy or that require much more contextual components (e.g. Schema actions, initialization of beans) and therefore it makes sense to explore a mode of operation that can provide metamodel details without the need to initialize EntityManagerFactory.
Specifically, we need:
- Domain model mapping metadata
- Access to named queries
- Access to entity graphs