Bug 256866 - [console] Query bundles publishing a particular service
Summary: [console] Query bundles publishing a particular service
Status: RESOLVED WORKSFORME
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Framework (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: equinox.framework-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2008-11-28 05:05 EST by Frederic Conrotte CLA
Modified: 2009-01-05 09:13 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.