in struts1 what's the way to use EJB3.0? there's no possibility to use annotation? i need to use classical jndi? why?
thanks On Fri, Mar 6, 2009 at 13:24, Ignacio de Córdoba <icord...@skios.es> wrote: > > Hi, > I'm us¡ng JBoss and @EJB doesn't work either. Are you using Struts1 or > Struts2? If Struts2, You can use the extension for EJB3 for Struts2. It > works OK (interceptor). > > > senderj wrote: >> >> 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-tp22368697p22369485.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 > > -- Stefano --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org