Hello there. I'm trying to figure out how to use EJBs inside of a Class which is part of the Command Pattern, and that Command I'm going to use it inside of a Servlet, but inside of the Servlet when I use the Dependency Injection there are no problems, or course, but when I use it inside of a plain class (even running inside of the Servlet container) the D.I. doesn't work.
The Architecture is (maybe erroneus but I'm coding for learning) MVC, the EJB takes care of the BusinessLogic, but I want to use the Command pattern and call the EJBs in those specific commands calling the specific EJBs.
How do I do that? How can I call those EJB outside the Servlet class?
PD: I'm deploying it on the GlassFish v3..