Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse Communications Framework (ECF) » ECF Run-As OSGi Framework(Running ECF as an OSGi framework)
ECF Run-As OSGi Framework [message #639274] Mon, 15 November 2010 20:53 Go to next message
Nick is currently offline NickFriend
Messages: 4
Registered: November 2010
Location: Waukesha, WI
Junior Member

I was curious as to why running an Eclipse Communication Framework project as an OSGi Framework gives no console output? I've been playing around with ECF for about a month now with no real progress. I only recently found out that to see console output, the project needed to be run as an Eclipse application rather then OSGi Framework. Why is this?

Also, when running as an Eclipse application, if the Host application is stopped, and then started again, no registration message is printed to the console again. It seems to me that everytime the service is started, it'd notify the console of registration.
Re: ECF Run-As OSGi Framework [message #639332 is a reply to message #639274] Tue, 16 November 2010 07:21 Go to previous messageGo to next message
Markus Kuppe is currently offline Markus KuppeFriend
Messages: 177
Registered: July 2009
Senior Member
On 11/15/2010 09:54 PM, Nick wrote:
> I was curious as to why running an Eclipse Communication Framework
> project as an OSGi Framework gives no console output? I've been playing
> around with ECF for about a month now with no real progress. I only
> recently found out that to see console output, the project needed to be
> run as an Eclipse application rather then OSGi Framework. Why is this?
>
> Also, when running as an Eclipse application, if the Host application is
> stopped, and then started again, no registration message is printed to
> the console again. It seems to me that everytime the service is started,
> it'd notify the console of registration.

Hi Nick,

just add "-console -consoleLog" to your OSGi Framework launch config.
That will get you the same output you see as with the Eclipse App launch.

Markus
Re: ECF Run-As OSGi Framework [message #639504 is a reply to message #639332] Tue, 16 November 2010 18:53 Go to previous messageGo to next message
Nick is currently offline NickFriend
Messages: 4
Registered: November 2010
Location: Waukesha, WI
Junior Member

The -consoleLog -console are already in my launch configuration. Here's the steps I took from beginning to end.

Download Helios 3.6.1
Install ECF 3.4
Create a new OSGi Framework launch configuration
Select org.eclipse.ecf.examples.remoteservices.hello.host
Add Required Bundles
Apply
Run

This is my Program Arguments:
-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog -console

This is my VM arguments
-Declipse.ignoreApp=true -Dosgi.noShutdown=true

The only output on the console is the OSGi input:
osgi>
Re: ECF Run-As OSGi Framework [message #639525 is a reply to message #639504] Tue, 16 November 2010 19:26 Go to previous messageGo to next message
Markus Kuppe is currently offline Markus KuppeFriend
Messages: 177
Registered: July 2009
Senior Member
On 11/16/2010 07:53 PM, Nick wrote:
> The -consoleLog -console are already in my launch configuration. Here's
> the steps I took from beginning to end.
>
> Download Helios 3.6.1
> Install ECF 3.4
> Create a new OSGi Framework launch configuration
> Select org.eclipse.ecf.examples.remoteservices.hello.host
> Add Required Bundles
> Apply
> Run
>
> This is my Program Arguments:
> -os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl}
> -consoleLog -console
>
> This is my VM arguments
> -Declipse.ignoreApp=true -Dosgi.noShutdown=true
>
> The only output on the console is the OSGi input:
> osgi>

Hi Nick,

ok, so the problem is not that output is not shown on the console, but
that no output gets created.
This is due to the fact that ECFs architecture builds upon providers
which provide implementations for each ECF apis. The purpose is that
client code is completely decoupled from a concrete provider
implementation. However this comes at the cost that "require-bundle"
does not select a provider for you automatically. From its POV all
requirements are satisfied by including the api.

In your case you will have to manually select bundle
"org.eclipse.ecf.provider.remoteservices" as an ECF distribution
provider (this one works in most scenarios) as well as one discovery
provider. Depending on your network topology you should either select a
LAN based provider (e.g. org.eclipse.ecf.provider.jmdns or
org.eclipse.ecf.provider.jslp) or one that supports wide area discovery
(org.eclipse.ecf.provider.zookeeper or org.eclipse.ecf.provider.dnssd).
The latter usually require manual setup on the server side though.
Don't forget to hit "require-bundles" again afterwards as the providers
might drag in additional dependencies.

HTH
Markus
Re: ECF Run-As OSGi Framework [message #639539 is a reply to message #639525] Tue, 16 November 2010 20:17 Go to previous messageGo to next message
Nick is currently offline NickFriend
Messages: 4
Registered: November 2010
Location: Waukesha, WI
Junior Member

That answers a lot of questions. I'm still not getting any output when using any combination of those providers and discoverers, but I get why the output wasn't being created when run as an OSGi framework vs an Eclipse Application.

As for what I'm trying to do. Right now I'm just trying to get a working example so that I can play around with it before moving on to more complex items. My network right now is just a typical wifi network. I don't care if it's a local remote connection, or a over the network one.
Re: ECF Run-As OSGi Framework [message #639549 is a reply to message #639539] Tue, 16 November 2010 20:51 Go to previous messageGo to next message
Scott Lewis is currently offline Scott LewisFriend
Messages: 1038
Registered: July 2009
Senior Member
Perhaps you are already doing this, but it might help to consult/run/examine the remote services example code described here

http://wiki.eclipse.org/Getting_Started_with_ECF%27s_OSGi_Re mote_Services_Implementation

Note that the ECF source code references on this page are to CVS source control...they haven't yet been updated since we've moved to git for version control (recently happened). Here's the git repo for ECF: http://git.eclipse.org/c/ecf/org.eclipse.ecf.git/

Re: ECF Run-As OSGi Framework [message #639807 is a reply to message #639549] Wed, 17 November 2010 21:30 Go to previous message
Nick is currently offline NickFriend
Messages: 4
Registered: November 2010
Location: Waukesha, WI
Junior Member

Thanks for pointing me back to that page Scott. I'd read over it a couple times but it made me pull the code back up and realize that I was making a very simple mistake.

When I was trying to run the examples as an OSGi Framework, I didn't realize that the plug-in activator wasn't calling any of the code inside the bundle. However, when I run it as an Eclipse application, the default or selected product would be loaded and run. Moving this code over to the Activator, ran the code examples perfectly as an OSGi Framework launch.

Thanks for the help!
Previous Topic:ECF as TCP Socket Server ?
Next Topic:Back reading forum
Goto Forum:
  


Current Time: Fri Oct 11 15:39:04 GMT 2024

Powered by FUDForum. Page generated in 0.04011 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top