[jboss-user] [EJB 3.0] - Re: what happen with my entity bean , need expert help
do-not-reply at jboss.com
Tue Jul 31 15:21:59 EDT 2007
Well, since your EjbLocator class is not itself a Service (Stateless EJB or JMX), you can't inject into it. It's just a POJO; there's no way for the container to know that it should be scanned for dependencies or injection.
So you can do one of a couple things:
1) Make your EjbLocator itself an EJB
2) Put your EM in JNDI by configuring persistence.xml with the properties "jboss.entity.manager.jndi.name" and "jboss.entity.manager.factory.jndi.name", and then do Context.lookup() for your EM instead of injecting it as a @PersistenceUnit.
Hope this helps.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4069334#4069334
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4069334
More information about the jboss-user