Hi! Did anybody tried to use RequestFactory with EJB Beans using Locator/ServiceLocator?
I'm having a little issue here. My stateless session bean extends Locator<Group, Long>. For my RequestContext I use a ServiceLocator which uses InitialContext.doLookup(); to lookup the EJB (I can't use @EJB because the ServiceLocator instance isn't container-managed -- btw. is there any solution for this? lookup looks ugly). Everything looks fine, but in my Bean, the entityManager instance is null (I'm using @PersistenceContext annotation on it) when GWT wants to invoke find(Class<?>, Long) method: here I use simple em.find(). It's strange because invoking from a servlet, using @EJB, it works fine. What am I doing wrong? I've created a gist for it: https://gist.github.com/807082 So in this file: https://gist.github.com/807082#file_group_manager.java Line #29, the em is null, but using this servlet: https://gist.github.com/807082#file_test_servlet.java it works perfectly. Has anybody experience with this problem? I would like to use EJBs, because I would like to have JTA and Container-managed transactions. Thanks for any advice! -- Regards, Bálint Kriván -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
