2016-04-29 6 views
0

私は、既存のRCPアプリケーション(Marsベース)で動作するリモートOSGiサービスを取得しようとしています。しかし、それは動作していないようです - 私のアプリケーションの2つのインスタンスは、他のインスタンスで公開されたサービスを見ません。Eclipse ECFで動作するリモートOSGiサービスを取得する方法

ターゲットプラットフォームに最新のECF SDKを追加しました。以下のバンドルを製品ランタイムに追加しました。

  • org.eclipse.ecf.discovery
  • org.eclipse.ecf.provider
  • org.eclipse.ecf.provider.remoteservice
  • org.eclipse.ecf.sharedobject
  • 組織。 eclipse.equinox.concurrent
  • org.eclipse.ecf.osgi.services.remoteserviceadmin.proxy
  • org.eclipse.osgi.services.remoteserviceadmin
  • org.eclipse.ecf.osgi.services.distribution
  • org.eclipse.ecf.provider.jmdns
  • CHorg.eclipse.ecf.remoteservice.asyncproxy
  • org.eclipse.ecf.remoteservice .ethz.iks.r_osgi.remote
  • org.eclipse.ecf.provider.r_osgi
  • org.eclipse.ecf.console
  • org.eclipse.ecf.provider.dnssd
  • org.xbill.dns
  • 私のバンドル活性剤の一つで
  • org.eclipse.ecf.provider.discovery

、私は

ServiceTracker _containerManagerServiceTracker = new ServiceTracker(_context, IContainerManager.class.getName(), null); 
_containerManagerServiceTracker.open(); 

IContainerManager containerManager = (IContainerManager) _containerManagerServiceTracker.getService(); 

IContainer container = containerManager.getContainerFactory().createContainer("ecf.r_osgi.peer"); 


IMyService myService = new MyService(); 
Properties props = new Properties(); 
props.put(IDistributionConstants.SERVICE_EXPORTED_INTERFACES, IDistributionConstants.SERVICE_EXPORTED_INTERFACES_WILDCARD); 
props.put(IDistributionConstants.SERVICE_EXPORTED_CONFIGS, "ecf.r_osgi.peer"); 
// register remote service 
context.registerService(IMyService.class, myService, props); 

)(startメソッドで私のサービスを登録するには、次のしている私が何かを知っている 2番目のインスタンスレポートとして機能しています。

"WARNING: Port 9278 already in use. This instance of R-OSGi is running on port 9279" 

zeroconfブラウザに「_ECFOSGIRSVC」という1つのレコードが表示されています。

多くのチュートリアルは、このサービスが魔法のように他のインスタンスで利用可能になるはずであることを示しているようです。しかし何も表示されません(アプリケーションコンソールで実行されている「サービス」はローカルサービスのみを表示します)。いくつかの質問;

  • これは本当に必要なのでしょうか?
  • これはどのようにデバッグできますか?
    • サービスが実際にエクスポートされているかどうかを確認するにはどうすればよいですか?
    • 他のインスタンスが実際にそれを検索しているかどうか知るにはどうすればよいですか?
  • a)コンテナのエンドポイントを報告し、他のインスタンスと「手動で」接続することは可能ですか?

「HelloService」チュートリアルは、非常に混乱し始めているのと全く同じ内容ではありません。

答えて

0

try Riena Communicationリモートサービスの公開とバインドにはそれほど複雑ではありません。これは、通信プロトコルとしてhessianを使用します。そのバイナリベースのプロトコル(xmlではない)以来soapとco。に比べて本当に速いです

私はこれが役立つことを望みます。

関連する問題