Fixed entity manager factory instantiation to be static.