Java Reference
In-Depth Information
Figure 10.15
Using your new Jetty port
Before describing the details of configuring remote endpoints in Distributed OSG i, we
feel that it's important to say that configuration isn't always required. A number of dis-
covery services can be used to automatically locate endpoints, but these aren't part of
the OSG i standards. What you'll do is use part of an OSG i standard called the Remote
Service Admin Service Specification. This specification has an odd-looking name, but
effectively it's a standard describing a common configuration and management model
for different Remote Services Specification implementations.
You'll provide your configuration using the Endpoint Description Extender For-
mat. This is a standard way of providing remote services endpoint configuration inside
a bundle using the Remote Services Admin Service, and an alternative to dynamic dis-
covery. To start with, you'll need a basic manifest, as shown in the following listing.
Listing 10.4
A remote services endpoint configuration bundle manifest
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: fancyfoods.remote.config
Bundle-Version: 1.0.0
Remote-Service: OSGI-INF/remote-service/*.xml
The new and interesting entry in your manifest is the Remote-Service header. This
header signals to the extender that this bundle should be processed for remote ser-
vice endpoint descriptions. The value of the header is a comma-separated list of XML
endpoint descriptions, potentially including wildcards.
Other than its manifest, your bundle will only contain one file, OSGI-INF /remote-
service/remote-services.xml. This file matches the wildcard description described in
the Remote-Service header of the bundle's manifest. This file uses a standard XML
namespace to describe one or more endpoints that should be exposed by the remote
services implementation. As a result, this file could be used with any remote services
implementation, not just Distributed OSG i, as follows.
Listing 10.5
A remote services endpoint configuration file
<endpoint-descriptions xmlns="">
Search WWH ::

Custom Search