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
}
Please ignor, user problem.
Was not injected because instance of bean was picked up as POJO rather than from JNDI/EJB create.