4.4.1. Services

Services form the layer that defines a set of Middleware operations available to the client tier. Services encapsulate business logic and transaction management.

The main objectives of services:

  • Provide the remote interface to call from the client tier.

  • Check the availability of the active user session, that corresponds to the session identifier transferred from the client.

  • Log unhandled middleware exceptions.

In addition, it is recommended to perform user authorization in the service layer, i.e. to check their rights for a particular functionality.

The objectives common to all services are handled as follows:

  • Checking the availability of the user session and logging exceptions are performed by the ServiceInterceptor, class which intercepts the execution of each service method using Spring AOP.

  • The remote interface to access the service through Spring HTTP Invoker is created by the RemoteServicesBeanCreator, bean, which is configured in the remoting-spring.xml file of the core module.

MiddlewareServices
Figure 14. The Service Class Diagram