Has anyone tried resource injection of EntityManager in 
EJB-3.0_Embeddable_ALPHA_9 ?

Injected value is null in embedded container, but same bean with 
persistence.xml in real JBoss 4.0.5GA injects correctly.

Trying to resource inject SessionContext also returns null.

I am using other injected resources like @EJB, deployment seems to understand, 
lookup and log these but I have not checked the values yet.

e.g
@Stateful
public class MyBean implements IMyBean {
  @PersistenceContext
  private EntityManager em;
  @Resource 
  protected SessionContext ctx;

public void someMethod() {  // em and ctx are null here
}

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4019230
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to