This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Struts and the fly likes Action class and ejb references. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Action class and ejb references." Watch "Action class and ejb references." New topic
Author

Action class and ejb references.

Wes Hughes
Ranch Hand

Joined: Jul 29, 2002
Posts: 31
I'm calling an stateless session bean to do the business logic in my Action class. For the time being, we're not using a business delegate. I'm wondering what the best practice is for obtaining the reference to the ejb object in my Action class.
1) Do I get the home interface and store the ejb object as a local variable within the execute method?
2) Do I store the home interface as a member variable?
3) Do I store the ejb object as a member variable?
Thanks for your help, trying to learn a lot at once here .
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Action class and ejb references.
 
Similar Threads
Using EJB's from Action method - is this safe?
Getting the Local Home
Some questions about the Scoped Model Driven interface of Struts 2
Home and Remote interface
ejb create() Error java.lang. IllegalStateEx: Failed to find method for hash