I am using Cactus to test a servlet which has an injected ejb (EJB 3.0) using @EJB annotation. The servlet is working fine when executed as part of the web application but while running the cactus test it is fail开发者_如何转开发ing to inject the ejb. I am getting a null pointer exception. Please let me know if there is any limitation of ejb dependency injection in cactus.
I was using new to instantiate the servlet and hence it was not being managed by the container. I have corrected this issue. thanks for your time and help
精彩评论