Reputation: 2920
Does anyone know if JBoss AS 7 has support for EJB injection in ReSTEasy applications per J2EE spec? I know this did not work in AS6 and was a known spec violation.
Thanks for any help/insights.
Upvotes: 1
Views: 879
Reputation: 23
Yes the EJB injection is supported. I will explain a trick to put everything together to work:
You have to create a file beans.xml on /Web-Inf/
You have to change your Application Class. Change singletons by class.
Example:
singletos.add(new HelloResource())
replace this line by empty or clazzes.add(HelloResource.class)
After that you can use ejb injection on JBoss7 and RestEasy using ejb annotation @EJB.
Upvotes: 1