Skip to main content

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

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??

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. 
I'll append my patch asap.

Hope to get your feedback and ideas on this!

Cheers
André

-- 
André Dietisheim
Head of Eclipse Development

Puzzle ITC GmbH 
www.puzzle.ch 

Telefon +41 31 370 22 00 
Fax     +41 31 370 22 01 
Mobile  +41 76 423 03 02

Abonnieren Sie unsere News: 
<http://www.puzzle.ch/follow-us>

Attachment: signature.asc
Description: This is a digitally signed message part


Back to the top