As i mentioned, i want to avoid doing the lookup every time. Thats why i wanted to write that interceptor. But there doesnt seem to be a good way to get Beans without doing the lookup directly in the action. At least i didnt find one.

Greetings,
Alexander

Martin Gainty schrieb:
did you get a chance to look at using 
context.lookuphttp://www.tutorialized.com/view/tutorial/EJB-3-and-Struts-Framework-Tutorial-using-JBoss/11894
by Sebastian Hennebrueder public class ListBooksAction extends Action { /** * Method execute * * @param mapping * @param form * @param request * @param response * @return ActionForward */ public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { BookDao bookDao = null; List<Book> books = null; try { Context context = new InitialContext(); bookDao = (BookDao) context.lookup(BookDaoImp.LocalJNDIName); } catch (NamingException e) { System.out.println("NamingException found message = "+e.getMessage());}
we could be more assistance if you could describe which alternative lookups you 
want to implement and provide a few testcases to achieve that objective
?Martin Gainty ______________________________________________ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. > Date: Sat, 30 Aug 2008 16:18:56 +0200> From: [EMAIL PROTECTED]> To: user@struts.apache.org> Subject: Re: Extending EJBInjection interceptor> > Thats a pretty good explanation of how the plugin works....> > I was going to use this method because it was recommended by another > user on the mailing list.> EJB3 is no necessity, but i want to avoid making jndi lookups in every > action i have. Is there another way to achive that?> > Greetings,> Alexander> > ---------------------------------------------------------------------> To unsubscribe, e-mail: [EMAIL PROTECTED]> For additional commands, e-mail: [EMAIL PROTECTED]> _________________________________________________________________
Get thousands of games on your PC, your mobile phone, and the web with Windows®.
http://clk.atdmt.com/MRT/go/108588800/direct/01/



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to