Foundation Services
Scenario: Remote-accessible ServicesTo enable applications to access remote services, one application must deploy the remote services. (The application that deploys the remote services can then access the services as local services). Instead of deploying their own set of local services, other applications can access the remote services. To access the remote service deployment, applications locate the deploying application's remote Discovery Service in order to locate and access the deployed remote services. This scenario is useful if one or more client applications need to use the same set of services. In this scenario, Application 1 deploys the remote services and accesses them as local services. Applications 2, 3, and 4 locate Application 1's remote Discovery Service in order to access the remote services. Note that Applications 2 and 3 are Web client applications that run in the same servlet container and each deploy their own local services for their own exclusive use. To deploy remote services, Application 1 does the following:
To locate the remote-accessible services (that were deployed by Application 1), Applications 2, 3, and 4 do the following:
When Application 1 exits, it terminates its local Discovery Service; the local Discovery Service then terminates all locally instantiated services. After all services are terminated, no services are available to any other applications. |