for a new project i met following strange problem,please help me : using myeclipse to generate a EJB3 projects and When I create a session bean and use the annotation "@PersistenceContext" to inject the EntityManager, then I deploy such
EJB3 to jboss. With jboss web-console ,in JNDIView I cann't find the EJB's JNDI name ,that mean the session bean cann't bind to a JNDI name abd I cann't visit it. But when I delete the using of the annotation "@PersistenceContext", the session bean will be deployed ok, in jboss web- console I can also find the session-bean's JNDI name. code like : //deploy it will have problem @Stateless public class CommonNativeQuery implements CommonNativeQueryLocal, CommonNativeQueryRemote { @PersistenceContext EntityManager em; } //deploy it will be OK @Stateless public class CommonNativeQuery implements CommonNativeQueryLocal, CommonNativeQueryRemote { //@PersistenceContext EntityManager em; } In such circumstance, I cann't use EntityManager to operate the Entity-Bean ,it's really big headache,please help me!! thanks!! View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4073260#4073260 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4073260 _______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user