Skip to content
Remote Services Distribution Provider based upon Apache Dubbo
Java
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.settings
build
bundles
examples
features/org.eclipse.ecf.provider.dubbo.feature
releng/org.eclipse.ecf.provider.dubbo.target
.gitignore
.project
.travis.yml
LICENSE
README.md
pom.xml

README.md

DubboProvider - Remote Service Distribution Provider

ECF OSGi R7 Remote Services Distribution Provider based upon Apache Dubbo

ECF is an Eclipse Foundation project that implements OSGi R7 version of the Remote Services and Remote Service Admin specifications.

ECF Home page
ECF Wiki
ECF Download page
ECF Distribution Providers
ECF Discovery Providers

Install

Install into Karaf

1 Start Karaf

2 At karaf@root()> prompt, to add ECF SDK Feature repo and DubboProvider Feature repo

karaf@root()> feature:repo-add ecf

3 Add Dubbo Provider Features repo by typing:

karaf@root()> feature:repo-add https://raw.githubusercontent.com/ECF/DubboProvider/master/build/karaf-features.xml

4 Install Dubbo Server feature by typing:

karaf@root()> feature:install -v ecf-rs-distribution-dubbo-server

This will produce output showing the installation and start of multiple bundles, and complete with:

...multiple lines of output...
  org.eclipse.ecf.osgi.services.remoteserviceadmin.console/1.2.0.v20180713-1805
Done.
karaf@root()>

The Dubbo Remote Services Distribution Provider Server is now installed!

To install the Dubbo Remote Services Distribution Provider Client on either the same or some other Karaf instance

1 Do 1-3 above to add ECF SDK Feature repo and DubboProvider Feature repo 4 Install Dubbo Client feature by typing:

karaf@root()> feature:install -v ecf-rs-distribution-dubbo-client

This will produce output showing the installation and start of multiple bundles, and complete with:

...multiple lines of output...
Starting bundles:
  org.eclipse.ecf.provider.dubbo.client/1.0.0.201908301123
Done.
karaf@root()>

Installing and Running Demo Remote Service in Karaf

Demo Remote Service Host

To install, start, and export the DubboProvider Demo Remote Service Host (avalable in project here) type:

karaf@root()> feature:install -v ecf-rs-distribution-dubbo-demo-host

This should produce output similar to the following

karaf@root()> feature:install -v ecf-rs-distribution-dubbo-demo-host
Adding features: ecf-rs-distribution-dubbo-demo-host/[1.0.0,1.0.0]
Changes to perform:
  Region: root
    Bundles to install:
      https://raw.githubusercontent.com/ECF/DubboProvider/master/build/plugins/org.eclipse.ecf.examples.provider.dubbo.demo.api_1.0.0.201908301123.jar
      https://raw.githubusercontent.com/ECF/DubboProvider/master/build/plugins/org.eclipse.ecf.examples.provider.dubbo.demo.impl_1.0.0.201908301123.jar
Installing bundles:
  https://raw.githubusercontent.com/ECF/DubboProvider/master/build/plugins/org.eclipse.ecf.examples.provider.dubbo.demo.api_1.0.0.201908301123.jar
  https://raw.githubusercontent.com/ECF/DubboProvider/master/build/plugins/org.eclipse.ecf.examples.provider.dubbo.demo.impl_1.0.0.201908301123.jar
Starting bundles:
  org.eclipse.ecf.examples.provider.dubbo.demo.api/1.0.0.201908301123
  org.eclipse.ecf.examples.provider.dubbo.demo.impl/1.0.0.201908301123
16:32:52.127;EXPORT_REGISTRATION;exportedSR=[org.eclipse.ecf.examples.provider.dubbo.demo.api.DemoService];cID=URIID [uri=dubbo://192.168.0.52:20880/org.eclipse.ecf.examples.provider.dubbo.demo.api.DemoService?anyhost=true&application=ecf-remoteservice-application&bind.ip=192.168.0.52&bind.port=20880&deprecated=false&dubbo=2.0.2&dynamic=true&generic=false&interface=org.eclipse.ecf.examples.provider.dubbo.demo.api.DemoService&methods=sayHello&pid=19968®ister=true&release=&side=provider×tamp=1568590371666];rsId=1
--Endpoint Description---

  
    
    
    
    
    
    
    
    
    
      
        org.eclipse.ecf.examples.provider.dubbo.demo.api.DemoService
      
    
    
      
        ecf.dubbo.server
      
    
    
      
        osgi.basic
        passByValue
        exactlyOnce
        ordered
        osgi.async
        osgi.private
        dubbo
      
    
    
    
      
        ecf.dubbo.server
      
    
  

---End Endpoint Description
Done.
karaf@root()> 

The output above indicates that the DubboProvider demo Remote Service host bundle was installed and started, and that the Remote Service was exported (EXPORT_REGISTRATION), producing the endpoint-description xml shown in the console output above.

Remote Service Consumer (same or separate Karaf instance)

To install and start the DubboProvider Demo Remote Service Consumer (avalable in project here) type:

karaf@root()> feature:install -v ecf-rs-distribution-dubbo-demo-consumer

Install into Eclipse or Target Platform

The ECF Remote Service SDK must be installed first to use of this distribution provider. See ECF download page to install the ECF Remote Services SDK into Eclipse or Target Platform.

To install into Eclipse or Target Platform:

P2 Repo URL: https://raw.githubusercontent.com/ECF/DubboProvider/master/build/

Once installed, type the following importservice ECF RSA console command to discover and import the remote service

karaf@root()> importservice
Waiting for console input.  To complete enter an empty line...

Then copy all lines between --Endpoint Description--- and ---End Endpoint Description into the clipboard, paste into the console and enter empty an empty line. This should result in output like the following:

osgi> importservice
Waiting for console input.   To complete enter an empty line...
<much debug output deleted>
osgi provider responds: Hello osgi consumer, response from provider
<more debug output deleted>
osgi> 

The output indicates that the DemoService was discovered and imported by the client runtime, injected into the DemoConsumer class courtesy of Declarative Services and the DemoConsumer.bindDemoService method, and the DemoService sayHello remote method was called and returned to print out: osgi provider responds: Hello osgi consumer, response from provider

You can’t perform that action at this time.