JFG-696 Add an ability to use EntityManager in core module.