Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ecf-dev] DS for ResourceRepresentations

Hi Andre,

I've been quite busy...sorry about the slow reply.

André Dietisheim wrote:
Hi Scott, Hi Holger I started elaborating the is approach. I check programmatically if DS is running by getting references to the
ConfigurationListener-Service. I looked through the DS implementation
and to my understanding, the main DS Service is registered this way:

org.eclipse.equinox.ds:
Activator#initSCR():

// add the configuration listener - we to receive CM events to restart
// components
cmTrackerReg = bc.registerService(ConfigurationListener.class.getName(),
scrManager, null);

My current implementation that checks whether DS is running looks like
this:

private boolean isDSRunning(BundleContext context) {
	ServiceReference[] serviceReferences = null;
	try {
		serviceReferences =
			context.getServiceReferences(
			ConfigurationListener.class.getName(), null);
	} catch (InvalidSyntaxException e) {
		// ignore
	}
return serviceReferences != null && serviceReferences.length > 0;
}

Any thought on this??

Isn't it possible for there to be a ConfigurationListener that is not registered by DS?

My current approach it marked org.eclipse.equinox.ds as optional
dependency. I kept the DS configurations and check programmatically if
DS is running. If it is not, the factory-service is registered
programmatically and the resource-factory tracks bundles
programmatically. It looks like everything's running fine even without
DS running.

OK, sounds good. I saw that the new patch was attached to the bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=285294

Thanks for doing that. The patch will be addressed, but Holger probably has to do it, and I imagine he has other items to deal with as well (just FYI).

Scott



Back to the top