-
1. Re: How to find EJB3 bean from a seam pojo class
tom_goring May 9, 2008 11:18 AM (in response to hsingh1.hdhanoa.gmail.com)Should be as simple as adding @Name on your SLSB and @In on your POJO.
E.g.
@Local public interface MessageManager { public void method(); }
@Stateless @Local(MessageManager.class) @Name("messageManager") @AutoCreate public class MessageManagerBean implements MessageManager { .. }
@Name public class MyPojo { @In MessageManager messageManager .... }
-
2. Re: How to find EJB3 bean from a seam pojo class
hsingh1.hdhanoa.gmail.com May 9, 2008 5:43 PM (in response to hsingh1.hdhanoa.gmail.com)Thanks a lot Tom for your response.
Actually I tried this and the exception i got is that it could not find the SLSB, is this proven solution in seam to find EJB?may be at the time pojo componenet is created, the EJB class(component) is not there (or not yet created..)
I will be more happy to also get a solution that does not make my EJB a seam component (ofcourse i also don't want to manually lookup in the pojo class)
I am wondering may be there is something that i define the EJB class
as a seam component in component.xmlthis is my 2nd posting in this forum, i am really glad somebody reply because i was really disappointed last time because i am still wating on that from a week :) so thanks a lot again!
-
3. Re: How to find EJB3 bean from a seam pojo class
vasana May 12, 2008 11:29 AM (in response to hsingh1.hdhanoa.gmail.com)The common mistake is to inject the Bean implementaion rather than the interface.Did you inject the interface as shown in the exaple above