=David
--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On Nov 19, 2016, at 9:03 AM, David Leangen <david....@bioscene.co.jp> wrote:
Ok, thanks! Yes, this is indeed putting me on the right track. Just trying to understand it and get it set up now.If anybody has Java Money set up using a different method, would be great to hear about it. :-)Cheers,=David
On Nov 18, 2016, at 8:27 PM, David Bosschaert <david.bo...@gmail.com> wrote:
Hi David,Not sure if this is what you're looking for, but http://aries.apache.org/modules/spi-fly.html is an implementation of the ServiceLoader Mediator specificationHTH,David
Hi,
(Hope this is still the place to ask questions about enRoute…)
I could be asking a naive question because I have never had to use this before, but (assuming it is in the enRoute Distro) which bundle contains the ServiceMediator implementation?
I am trying to load Java Money, and from what I understand, I need to use this service.
Thanks!
�vid
--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.
On 19 Nov 2016, at 06:58, David Leangen <david....@gmail.com> wrote:
Hi!So I am able to resolve Java Money at compile time.After adding the required dependencies to one of my repositories, I “augmented” the bundle in my enroute-distro.bnd file like this:-augment.jx_mn: \org.javamoney.moneta.core; \requirement: "osgi.extender;filter:='(osgi.extender=osgi.serviceloader.registrar)'"; \capability:= "osgi.serviceloader;osgi.serviceloader=javax.money.spi.ServiceProvider"In my consumer bundle, I added this to the manifest:Require-Capability: \osgi.extender;\filter:="(osgi.extender=osgi.serviceloader.processor)",\osgi.serviceloader;\filter:="(osgi.serviceloader=javax.money.spi.ServiceProvider)";\cardinality:=multipleHowever, at runtime, I get this:Unresolved requirement: Require-Capability: osgi.serviceloader; filter:="(osgi.serviceloader=javax.money.spi.ServiceProvider)"; cardinality:="multiple"What to do?I think this may have been explained to me already, but why does something that resolves fine at compile time not resolve at runtime if all the same bundles are made available? Is it possible that the “augment” above does not work at runtime? In that case, what would be the best course of action?
Probably the best thing to do is add an effective directive to the Req-Cap in your bundle. For example if you add “effective:=active” then the requirement is ignored by the OSGi Framework. But it is still used by the Bndtools resolver, as long as you have "-resolve.effective: active” in your bndrun file.