-
1. Re: Annotation @EJB not working
alrubinger Apr 25, 2007 11:06 AM (in response to raoulduke)Are you using javax.annotation.EJB or javax.ejb.EJB?
Should be the latter.
http://wiki.jboss.org/wiki/Wiki.jsp?page=FromRC7RC8
S,
ALR -
2. Re: Annotation @EJB not working
alrubinger Apr 25, 2007 11:08 AM (in response to raoulduke)Oh, sorry, missed the part about your injecting into a Servlet. Injection is not yet supported in the 4.0.x series.
S,
ALR -
3. Re: Annotation @EJB not working
raoulduke Apr 25, 2007 3:32 PM (in response to raoulduke)Tanks for the answer! I already read on the JBoss website that EJB3 is not fully implemented. I took me lots of time to find out whats up. It would have been easier for me if JBoss threw an exception when I try to use the EJB annotation inside a servlet.
-
4. Re: Annotation @EJB not working
alrubinger Apr 25, 2007 4:40 PM (in response to raoulduke)If only.
But if someone were to write the code to look for annotations in your Servlets, they might as well just inject instead of throwing an exception. ;)
S,
ALR -
5. Re: Annotation @EJB not working
teem Apr 25, 2007 6:59 PM (in response to raoulduke)Hi,
I have a similar problem with injecting stateless session bean in jsf managed-bean. I get always null value. I use jsf 1.1 implementation and I have my web-app.xml correct for sure, I mean, my schemaLocation corresponds to JEE5. Is ejb3.0 injection in jsf managed beans supported in jboss 4.0.5??
regards,
teem -
6. Re: Annotation @EJB not working
raoulduke Apr 26, 2007 3:18 AM (in response to raoulduke)@teem:
You got the same problem like I do. As far as I know now JBoss just does not support the @EJB annotation anywhere in the web context of an enterprise application. You can only use it inside of EJBs, not in Servlets, JSF managed beans or anything else thats not an EJB.
Regards,
Sven -
8. Re: Annotation @EJB not working
teem Apr 26, 2007 3:04 PM (in response to raoulduke)Thanks for your answers! If it is so, it would be an explanation of my problems. I'm just downloading jboss 5.0.0 so I'll see if the injection in jsf managed beans works on it.
regards,
teem