I don't know where this should fail, but it needs to fail somewhere, and if CDI isn't it, I trust there are people on this list the other EGs will listen to because too many of them ignore the users list, because you know, they're the "experts".
public class EmProducer() {
@PersistenceContext(type = PersistenceContextType.EXTENDED)
EntityManager em;
@Produces @RequestScoped
public EntityManager getEntityManager() {
return em;
}
}
That should be a deployment exception stating it isn't valid (the @PersistenceContext injection).