My env is Netbean with Glassfish. I am able to create a servlet to call EJB
with this code:

public class TryAdvise_create extends HttpServlet {
    @EJB
    AdviseFacadeRemote advBean;
    ......
    protected void processRequest(HttpServletRequest request, ........ {
    ......
        Advise adv = new Advise(123, "123 Company");
        advBean.create(adv);
   
It works great. But when doing the same on a Struts Action:

public class TryAdviseAction extends Action {
    @EJB
    AdviseFacadeRemote advBean;
    ......
    public ActionForward execute(ActionMapping mapping, ......... {
        Advise a = advBean.find(new Long(1));

advBean is always null. Why? Please help.
-- 
View this message in context: 
http://www.nabble.com/Struts-and-EJB-3-tp22368697p22368697.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to