This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
my project contains of three (eclipse) project. One project contains all JPA files, the second contains the Stateless Session Beans (with all CRUD operations) and the least project contains the web (Struts 2) application. How can I combine the Actions with the beans without a lot of additional code (InitialContext etc.). Is there a way to get a reference via reference injection or what is the normal approach for this task?
In theory, you're supposed to be able to use the @EJB annotation in a web client. In practice, most web containers don't support it. The best way I know of to get an EJB3 reference that works fairly consistently is: