struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Gainty <>
Subject RE: Extending EJBInjection interceptor
Date Sat, 30 Aug 2008 15:07:31 GMT

did you get a chance to look at using context.lookup
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:>
To:> 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:> For additional commands, e-mail:> 
Get thousands of games on your PC, your mobile phone, and the web with Windows®.
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message