[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ecf-dev] DS and zookeeper

Hi Mike,

On 4/27/2011 4:07 AM, mike howard wrote:
hi Bryan,

thanks for the help.

i don't know the plugin that need to have   "Activate this plug-in when one of its classes is loaded".

Although the use cases can be complex, I've found that when you have a plugin that implements BundleActivator (i.e. has an Activator class), that having the plugin activate when one of its classes is loaded is the right thing to do. 

Incidently...I've discovered that the lazy start was *not* previously set in the hello example bundle (i.e. org.eclipse.ecf.examples.remoteservices.hello).  This may have been the actual cause of the start problem discussed in this thread [1].

In any event, I've opened a new bug to fix this in the hello example [2].  I will fix this quickly...and in subsequent builds (and ECF releases, of course) I'm hopeful that it will also deal with the problem discussed in [1].  That issue seems to be limited to Equinox 3.6.2 (and does not show itself on 3.7), but in any event...like I said I'm hopeful that it will permanently deal with the issue [1] on 3.6.2...and I will find the time to test on 3.6.2 to verify.

Anyway i have been managed to run the hello example, but i need to change some things in launch configuration.

the plugins that need parameter autostart=true in the host side are:
  • org.eclipse.ecf
  • plugins that contains DS component definition
  • org.eclipse.ecf.osgi.service.distribution
  • org.eclipse.ecf.osgi.service.remoteserviceadmin
  • org.eclipse.equinox.common
  • org.eclipse.equinox.ds

Ds plugin need to define autostart level greater than plugins that contains DS component.i use level 5 for ds plugin and default level 4 for DS component definition plugins.

One resource for this information is the product config:

/org.eclipse.ecf.examples.remoteservices.hello.ds.host/products/Hello Service DS Host (zeroconf,generic).product

i.e. here's the <configuration> for that product:

      <plugin id="org.eclipse.ecf" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.ecf.examples.remoteservices.hello.ds.host" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.ecf.osgi.services.distribution" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.ecf.osgi.services.remoteserviceadmin" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="2" />
      <plugin id="org.eclipse.equinox.ds" autoStart="true" startLevel="2" />

I recognize that we need to make this information much more available/transparent, however.  To do this, I suggest that we

1) Add to the documentation on this wiki page [3] (or with a link on this page to a new page(s)...with information from the configuration sections of the various product configs.  This can/could be considered part of the ECF documentation project [4], and we can track it there.

2) I would like to create more product configurations...e.g. one for zookeeper,generic for the DS host and consumer (e.g. Hello Service DS Host (zookeeper,generic).product, Hello Service DS Consumer (zookeeper, generic)...it would also be nice to have ones for rosgi as well...e.g. Hello Service DS Host (zookeeper, rosgi).product, Hello Service DS Consumer (zookeeper, rosgi).product.  I created an enhancement request for this here [5].  Nice bug number, don't you think?  :)

if i'm using generic distribution provider, how can i define port and server address. I don't see this parameters in launch configuration or in the properties of DS component. I guess it is using default parameters, but if i want to change it, where must define server address?

There's an example of doing this with service registration properties (i.e. using DS):


In this file are several service properties...i.e.

   <property name="service.exported.interfaces" type="String" value="*"/>
   <property name="service.exported.configs" type="String" value="ecf.generic.server"/>
   <property name="ecf.exported.containerfactoryargs" type="String" value="ecftcp://localhost:3787/server"/>

The last one (ecf.exported.containerfactoryargs) provides a single argument that specifies the server's ID/URI...including the hostname, the port (3787), and the path (/server).

There are other ways (e.g. programmatically...or using config admin) to configure things for the generic provider (incidently, in case it's not clear, in general every provider has it's own configuration).  And we need more documentation on this (i.e. a configuration wiki page for every distribution provider...and for that matter every discovery provider).  If anyone can provide some contributions for this as well, please consider helping out/contributing...and coordinate via the ECF documentation project bug [4].



[1]  http://dev.eclipse.org/mhonarc/lists/ecf-dev/msg05222.html
[2] https://bugs.eclipse.org/bugs/show_bug.cgi?id=343992
[3] http://wiki.eclipse.org/EIG:Getting_Started_with_OSGi_Remote_Services#Running_the_Example_Hello_Service_Host
 and http://wiki.eclipse.org/EIG:Getting_Started_with_OSGi_Remote_Services#Running_the_Example_Hello_Service_Consumer
[4] https://bugs.eclipse.org/bugs/show_bug.cgi?id=329124
[5] https://bugs.eclipse.org/bugs/show_bug.cgi?id=344000

2011/4/26 Bryan Hunt <bhunt@xxxxxxx>
There a couple of simple things to check ...

  1. Make sure org.eclipse.ecf.osgi.services.distribution is in the ACTIVE state (I set Auto-Start to true in my launch configuration)
  2. Make sure org.eclipse.update.configurator is not in your launch configuration
  3. Make sure you have "Activate this plug-in when one of its classes is loaded" checked in the MANIFEST.MF


On Apr 26, 2011, at 6:26 AM, mike howard wrote:

Hi all,

i'm trying to configure the hello service example using declarative service, but using zookeeper instead of zeroconf.
To do this, i have clone the launch configuration of Hello DS host (zerocong, generic) and change plugin org.eclipse.ecf.provider.jmdns by plugins org.apache.hadoop.zookeeper and org.eclipse.ecf.provider.zookeeper (both with autostart=true). i also change launch configuration to add new parameters -Dzoodiscovery.dataDir=zookeeperdata2

when i launch new Hello DS host configuration, i can see that zooDiscovery is started ( trace ZooDiscovery> Discovery Service Activated ), but when i check hello service status, it's configured but no bundle is using it.

i did the same thing with the client configuration (launch parameters -Dzoodiscovery.autoStart=true; -Dzoodiscovery.flavor=zoodiscovery.flavor.standalone=localhost:2001;clientPort=2002), but when i launch it, it doesn't work.

need additional parameters, or zoodiscovey doen't work with DS?

thanks in advance.
ecf-dev mailing list

ecf-dev mailing list

_______________________________________________ ecf-dev mailing list ecf-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/ecf-dev