Using session beans with more than one business interface
A session bean can use more than one business interface. In this recipe we will use multiple interfaces to illustrate how a subset of methods can be exposed to a client while providing a larger set of methods to the beans of the application. An account EJB is used exposing the discount rates based on the type of client.
The process of adding more than one business interface involves two steps:
- Defining the interfaces
- Implementing the interfaces in the EJB.
Each of these steps is not difficult. However, the implementation of the business methods can be a different matter.
How to do it...
Start by creating a Java EE application called
MultipleInterfacesExample. In the EJB module add ...