Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 256866

Summary: [console] Query bundles publishing a particular service
Product: [Eclipse Project] Equinox Reporter: Frederic Conrotte <frederic>
Component: FrameworkAssignee: equinox.framework-inbox <equinox.framework-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: enhancement    
Priority: P3 CC: ekke, jeffmcaffer, njbartlett, tjwatson
Version: unspecifiedKeywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Frederic Conrotte CLA 2008-11-28 05:05:28 EST
in the Equinox console, tt would be useful to be able to query bundles publishing a particular service using the service interface

for example: services javax.transaction

would list bundle having currently registered service(s) using this interface.

If you could point me to relevant CVS bundle(s) and classes, I could propose a patch for this feature request.

Frederic
Comment 1 Jeff McAffer CLA 2008-11-28 12:26:29 EST
The console code is in the Equinox bundle
dev.eclipse.org/cvsroot/rt/org.eclipse.equinox/framework/bundles/org.eclipse.osgi

Look for the class called FrameworkCommandProvider

Note that you might also want to look at the app console commands. Tehy do a flavor of what you are suggesting. Perhaps there is some code that can be reused or the app console could be improved.

the app stuff is in 
dev.eclipse.org/cvsroot/rt/org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.app
Look for AppCommands

Thanks for looking at this.
Comment 2 Neil Bartlett CLA 2008-12-30 12:59:14 EST
(In reply to comment #0)
> in the Equinox console, tt would be useful to be able to query bundles
> publishing a particular service using the service interface
> 
> for example: services javax.transaction

You can sort-of already do this, albeit with some extra typing, because the parameter to the services command is an LDAP filter:

  services (objectClass=org.eclipse.osgi.service.runnable.ApplicationLauncher
  services (objectClass=*ApplicationLauncher)
  services (objectClass=org.eclipse*)
  services (objectClass=javax.transaction*)

Neil
Comment 3 Frederic Conrotte CLA 2008-12-30 13:53:45 EST
Good point Neil. I didn't know it.

I think this functionnality is sufficiently close to the request to mark it as fixed.

Fred
Comment 4 Thomas Watson CLA 2009-01-05 09:13:44 EST
Marking as worksforme instead of fixed.