Re: osgicheck-maven-plugin and checkGreedyReferences()

2018-09-26 Thread Raymond Auge
I also agree with GREEDY as a general rule for any STATIC unary references. On top of the reasons proposed by Carsten and David, what a developer often overlooks is the "plugability" of the system. Whenever you use OSGi services, the natural assumption is that the "best" service will be used base

Re: osgicheck-maven-plugin and checkGreedyReferences()

2018-09-25 Thread David Jencks
If you've bothered to set the service ranking, then in theory it matters which one you get :-) I like the default of preferring greedy in order to get reproducible results. Configurable choices would be ok for experts :-) David Jencks > On Sep 25, 2018, at 11:14 PM, Carsten Ziegeler wrote: >

Re: osgicheck-maven-plugin and checkGreedyReferences()

2018-09-25 Thread Carsten Ziegeler
As a general remark: I guess all current checks in that plugin are debatable. It currently contains checks that we found useful. And I think we'll make them configurable in a future version of the plugin. For this specific check, it's there to ensure a reproducible system regardless of in which o

Re: osgicheck-maven-plugin and checkGreedyReferences()

2018-09-25 Thread David Jencks
I’m not quite sure exactly what you are asking, and I don’t know what policy preference this plugin thinks is a good idea but... If a static reference goes away, of course the component instance will get deactivated, and if there’s another suitable service available a new instance will get activ

osgicheck-maven-plugin and checkGreedyReferences()

2018-09-25 Thread Mark Derricutt
Hey all, A question on checkGreedyReferences() in the new osgicheck-maven-plugin, we got a lot of warnings about our static @Reference's needing to be greedy. From the `ReferecePolicy.STATIC` java doc: > If a target service is available to replace the bound service which became > unavailable,