Some Design Patterns are needed in between Action class and EJBs. As the two components are made up of different APIs they both need some interfaces to communicate each other. There are many Design Patterns that can be used to call EJBs. The combinations how we use to call EJBs depends on the Application. We can use Business Delegate, Command Pattern, JDO, Session Facade etc. Out of these Business Delegate and Session Facade combination will work fine for most of the applications.
From Action class we will get the Business Delegate reference(which is a plain java class), which inturn gets Session Facade reference by using the Home object and from Session Facade we will call EJBs.
Subclass your Action class and Override execute() method. Then in body of execute() method, do this: 1. Get Initial Context 2. Get home object using JNDI look up. 3 Create the bean and call teh business methods.
Yeah I too agree with this, Here action class is client for EJB First get home interface object using JNDI then call remote interface reference variable and continue.