Make orm entitymanager configurable

We need to use a different entitymanager and made it configurable.