[jboss-user] [EJB 3.0 Users] - Re: JBoss 5.1.0 GA + EJB 3.0: RESTful Web Services with Jers

longbeach do-not-reply at jboss.com
Fri Dec 11 06:42:50 EST 2009


Hi, 
i got it working. It was just a basic configuration problem in Eclipse.

But now I have a question regarding injection of resources.
I am using the Jersey implementation of JSR-311.

I use EJB 3.0 (not 3.1). I have exposed a stateless session bean as a RESTful web service.

@Path("/blabla")
@Stateless
public class MyBean implements MyBeanRemote{

@PersistenceContext
private EntityManager em;
...
}

I try to inject a persistence context but it is not working. em is null.

So my question is :
do injection of resources (@PersistenceContext, @EJB ...) cease to work in a stateless session bean that has been exposed as a RESTful web service ?

Thanks

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4270167#4270167

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4270167



More information about the jboss-user mailing list