First of all, you are using a mix of JUnit 3.8 and 4.0. This may cause you problems. The only line in your code that is 3.8 is this one. You might want to remove the "extends."
Now on to your problem - you are running your JUnit test a standalone program, not an EJB. This means it isn't a session bean even though you have the annotation. Which in tern means things aren't injected.
What are you actually trying to test? A session bean? Something else?
How are you running your test? If you use a server side framework, like Cactus, it can access the EJB.
Joined: Aug 18, 2009
No I am not using any server side framework. I am working on RAD 7.5 with WAS 7. Can unit test my DAO classes using Junit here.
I was trying to get the entitymanager in a junit test class. I tried also injecting the entitymanager and making the test class as session. But I still get entitymanager as null. Is there is any way I can unit test ejb's from inside the container.