I renamed entityManager to em and new it woks fine. now out of curiosity is this how annotations are suppose to work?
you mean you replaced
@PC EntityManager entityManager
@PC EntityManager em
and it now works?
If this is the case, there is something wrong in your code somewhere like overriden local variable
Yes that's all I have done. em is not referenced or overridden anywhere in my code. only used (IE em.find() etc..)
I don't see anything in our code base that could do such a behavior
Just thought I would fully verify my problem.
My bean class is empty except for empty method declarations. if the EntityManager is named anything else other then em the beans local interface is unavailable in the jndi tree. Calling the EntityManager em or removing the annotation makes the bean available in the jndi tree.
As far as the entityManager named varable actual working I can't tell due to disappearance from the jndi tree.