struts-user mailing list archives

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

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: baetz.paderborn@arcor.de>
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: user-unsubscribe@struts.apache.org> For additional commands, e-mail:
user-help@struts.apache.org> 
_________________________________________________________________
Get thousands of games on your PC, your mobile phone, and the web with Windows®.
http://clk.atdmt.com/MRT/go/108588800/direct/01/
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message