//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

=== DOSGi and Transport

DOSGi (Distributed OSGi) enables the distribution of OSGi services across the Cellar nodes.

The purpose of the Cellar DOSGi is to leverage the Cellar resources (Hazelcast instances, distributed map, etc), and
to be very easy to use.

DOSGi is provided by installing the optional feature `cellar-dosgi`.

To be available and visible for the others nodes, the OSGi service should only have the service.exported.interfaces
property:

----
<service ref="MyService" interface="my.interface">
  <service-properties>
    <entry key="service.exported.interfaces" value="*"/>
  </service-properties>
</service>
----

You can see all OSGi services "flagged" as distributed (available for the nodes) using the `cluster:list-service` command:

----
karaf@root()> cluster:service-list
----

A "client" bundle could use this service. If the service is not available locally, Cellar will "route" the service call
to the remote remote containing the service.