-
1. Re: Using @Resource annotation with RESTEasy in JBoss 6.1.0 Final
earnest.dyke May 23, 2012 11:42 AM (in response to jacklund)Jack,
You ever resolve this? I am having the same problem.
Earnie!
-
2. Re: Using @Resource annotation with RESTEasy in JBoss 6.1.0 Final
jacklund May 23, 2012 11:47 AM (in response to earnest.dyke)No, we just changed to using Spring to inject the stuff rather than using @Resource. This worked because we were already using Spring for other things.
That being said, I haven't tried this since we switched to version 7.1.x, so it might have been fixed there, I don't know.
Sorry, wish I could be more help.
-Jack
-
3. Re: Using @Resource annotation with RESTEasy in JBoss 6.1.0 Final
earnest.dyke May 23, 2012 11:48 AM (in response to jacklund)Thanks. I am using 7.1.1 now and am getting the error.
Earnie!
-
4. Re: Using @Resource annotation with RESTEasy in JBoss 6.1.0 Final
earnest.dyke May 23, 2012 12:36 PM (in response to earnest.dyke)As is usually the case, 5 minutes after I make a post seeking help with a problem I discover the solution. In this case, I was trying to access the @Resource fields in the constructor. When I changed the constructor to an @PostConstruct annotated method (because I am using Stateless bean) low and behold the @Resource fields are resolved and everything works just fine.
I use a Stateless bean because that is one of the types that is scanned for @Resource annotations. I don't think a POJO, as in your example, gets scanned for @Resource annotations.
Earnie!