JBoss Community

Re: Services with missing/unavailable dependencies EntityManager

created by Evie White in JBoss AS7 Development - View the full discussion

I am experiencing the same problem. I am migrating from Glassfish to JBoss and I want to maintain the dependency injection of the PersistenceContext into the stateless session beans so that they can perform database manipulation via JPA. I am using JBoss AS 7 (Final) with the "standalone" configuration.

 

I have several stateless session beans and one datasource that are configured in the exact manner outlined by the thread poster Raphael. Upon deployment, all beans receive the "Services with missing/unavailable dependencies" error.

 

However, if I remove the @PersistenceContext annotation from the EntityManager class variable in one bean then that one bean does NOT fail. (However, now EntityManager is null and any calls to it, obviously, would fail. I was just experimenting.)

 

Does JBoss AS 7 even support @PersistenceContext?

Reply to this message by going to Community

Start a new discussion in JBoss AS7 Development at Community