Change how entity managers are handled for jpa bean provider
Made test pass for new entity manager handling