File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes struts-EJB recipe  in the Recipe book Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "struts-EJB recipe  in the Recipe book" Watch "struts-EJB recipe  in the Recipe book" New topic
Author

struts-EJB recipe in the Recipe book

manasa teja
Ranch Hand

Joined: May 27, 2002
Posts: 325
Dear authors,
Does have your book have any recipe for Struts and EJB..
it will be really good if we have a chapter explaining how to use with struts ..

what other topics does your book have? Any tips, best practices for each concept?


thanks
[ January 26, 2005: Message edited by: manasa teja ]

MT
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
I don't think there's any difference in how one uses EJB's with Struts compared to any other MVC framework or regular servlets.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
friso dejonge
Ranch Hand

Joined: Jul 11, 2002
Posts: 162
hi,

any tips on ejb's ? Take a look at Rod Johnson's book Expert - One-on-One J2EE Development without EJB. This is exactly the opposite of what you might want, but it does give you valuable (and life saving) tips.

regards,
friso


swimming certificate (A & B), shoelaces diploma, and some useless java ones.
manasa teja
Ranch Hand

Joined: May 27, 2002
Posts: 325
Originally posted by Lasse Koskela:
I don't think there's any difference in how one uses EJB's with Struts compared to any other MVC framework or regular servlets.


Mmmm.. Just want to know, whether there are plug-ins, extension points, or configuring some XMLs (like struts-config.xml) etc, when we use struts with EJB...
George Franciscus
author
Ranch Hand

Joined: Jan 25, 2005
Posts: 32
As stated above, there is nothing special about calling an EJB from Struts. All you need to do is call the EJB from the Action and you are away to the races - albeit a better approach is to use a delegate to abstract away the fact you are using EJB technology.

Is there a plug-in? Not that I'm aware of. If you wire Spring and Struts together then you may have what you are looking for.

However, if you wanted to call an EJB from a Struts Action, then you should cache the home interface. One option of doing this is to create your own Struts plug-in. In Struts Recipes we show you how to create a Struts plug-in to cache things. We didn't cache an EJB home interface because we didn't want to predicate the recipe on EJB knowledge, but this recipe will show you how to do it (See 8.1 Caching using a Struts plug-in).


George Franciscus<br />george.franciscus@nexcel.ca<br /><a href="http://www.nexcel.ca" target="_blank" rel="nofollow">http://www.nexcel.ca</a><br /><a href="http://www.manning.com/franciscus" target="_blank" rel="nofollow">http://www.manning.com/franciscus</a>
manasa teja
Ranch Hand

Joined: May 27, 2002
Posts: 325
thanks George!!
bas duijzings
Ranch Hand

Joined: Apr 07, 2004
Posts: 83
a lot of things are out there already,

have a look

http://www.laliluna.de/integration-struts-ejb-tutorial.html

dont know if this is usefull to you


have a nice one
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: struts-EJB recipe in the Recipe book