To answer my own question, after looking at both the spec, and felix scr, there is not.
Wishful thinking that even felix scr would support something like: @Reference(target = "(service.bundleid=${bundle.id})") OR @Reference(target = "(context.path=${Web-ContextPath})") etc. Seems in felix this would be trivially simple. - Ray On Sun, Mar 8, 2015 at 10:49 AM, Raymond Auge <raymond.a...@liferay.com> wrote: > Hey all, > > I have a need for a component to get a service created on behalf of the > bundle by an extender. There are many such services in the system so what I > really need is to get a bundle with a filter like so: > > Filter filter = bundleContext.createFilter( > "(&(objectClass=" + ExtenderCreatedService.class.getName() + > ")(service.bundleid=" + bundle.getBundleId() + "))"); > > i.e. get the one created which has my bundleId. > > Is there any trick to doing this besides a ServiceTracker which the > component must manually create and start? > > Note the component can't know it's own bundleId at the time of generating > the XML. > > Is there any property parsing happening in the component XML files or > anything? > > -- > *Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile> > (@rotty3000) > Senior Software Architect *Liferay, Inc.* <http://www.liferay.com> > (@Liferay) > Board Member & EEG Co-Chair, OSGi Alliance <http://osgi.org> > (@OSGiAlliance) > -- *Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile> (@rotty3000) Senior Software Architect *Liferay, Inc.* <http://www.liferay.com> (@Liferay) Board Member & EEG Co-Chair, OSGi Alliance <http://osgi.org> (@OSGiAlliance)
_______________________________________________ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev