Jaikiran Pai wrote:
Pedro Kowalski wrote:Antonio, could you tell me how did you access the EntityManager from your non-EJB superclass (AbstractBaseService)? Or maybe you didn't use the EntityManager for these CRUD operations?
1) If the base class is abstract he won't be able to create an instance of that. So accessing from the base class in that case is ruled out. i.e. you'll need to lookup the bean which extends that class and then let that bean instance access the injected entitymanager.
2) If the base class is not abstract and itself is a bean and also has a subclass which is a bean, then there are 2 bean implementation classes. The user can lookup either of them separately and use the injected entity manager.