I have an application that uses EJB 2.1 stateless sessions beans and JDBC. I would like to move the JDBC towards EJB 3 Entities so I won't have to manage the SQL, but because of time I cannot upgrade my sessions beans (so they must continue to follow the EJB 2.1 spec).
I've successuflly written and tested the Entities using annotations and have it working properly outside of the container. But when I try to run them within the container and have JBoss use dependency injection to set the EntityManager on my Session bean, it never works. Basically, the EntityManager is never set and is left as null.
Please note that in order to make sure that my environment was setup correctly, I created a simple HelloWorld bean and entity using EJB 3 feautes and the dependency injection of my EntityManager works as expected.
Therefore, Is it possible to use dependency injection on an EJB 2.1 session bean or must everything be upgraded to EJB 3? Can I mix EJB 2.1 and EJB 3.0 features?
Here is my environment information:
Thanks in advance.
I am having the Exact Same issue. Were you ever able to find this out?