Service layer considerations
It is important to have clearly defined entry points for service layer operations. This will again be achieved through Java interfaces that define the operations exposed by the service layer. Clients of the service layer will interact with the business logic through these interfaces, not the implementing classes.
For similar reasons, it is important that the service layer itself is decoupled from the underlying DAO implementation. We have already achieved this by ensuring that our DAO layer exposes its persistence operations through interfaces. The service layer should know nothing about how the persistence layer is implemented and there should not be any persistence operations coded within the service layer classes.
Enterprise application clients come in many different forms, most commonly web browsers and web services. However, there may be other types of clients; for example, standalone servers using RMI. In all cases, the service layer must be as independent...