On 13/06/16 18:54, David Jencks wrote:
> Well, as long as you are willing to either accept that it’s unreliable
> (time gaps where not all the references are established) or assure that
That is kind of the point of DYNAMIC, isn't it?
> the components start in the correct order by explicitly enabling them in
> that order, ok. My conclusion is that it’s worth a lot of effort to
> eliminate cycles. Having your components work simply and reliably
> without hard to understand tweaking is worth a lot.
>
> david jencks
>
>> On Jun 13, 2016, at 9:27 AM, Neil Bartlett <
njbar...@gmail.com
>> <mailto:
njbar...@gmail.com>> wrote:
>>
>> David,
>>
>> I disagree with this advice. It's perfectly acceptable to have a cycle
>> so long as one leg is optional-dynamic.
>>
>> This is a common use case where you want to be the client of a service
>> and also listen with a service-specific listener interface, whiteboard
>> style.
>>
>> Neil
>>
>> On 13 Jun 2016 5:08 p.m., "David Jencks" <
david.a...@gmail.com
>> <mailto:
david.a...@gmail.com>> wrote:
>>
>> Well, you definitely have a cycle. One of the links is optional
>> and dynamic so I’d expect that DS would eventually set all the
>> references in the cycle. As noted in FELIX-5197, that particular
>> error message comes from the frameworks ServiceRegistry which is
>> required to emit errors when a thread loops around and tries to
>> get a service that is already being gotten. I suppose DS could
>> check the thread-local list of service references each time before
>> it tries to get a service to avoid even trying the getService call
>> that emits this error. I’m a bit reluctant to implement this
>> since IMO the best conclusion from all this is, “DON”T HAVE
>> CYCLES!”. At best there’s going to be a delay between all the
>> components being activated and the final link established, as this
>> has to occur on a separate thread; it turned out that FELIX-4417
>> was the test missing a “delay()” so there was time to reliably
>> establish the link. So I very strongly recommend reexamining
>> your design and eliminating all the cycles.
>>
>> thanks
>> david jencks
>>
>>> On Jun 13, 2016, at 8:34 AM, Christian Schneider
>>> <
ch...@die-schneider.net <mailto:
ch...@die-schneider.net>> wrote:
>>>
>>> Hi David,
>>>
>>> in my case there is(should be) no cycle.
>>>
>>> Component IRC (exported as ChatListener) has a mandatory
>>> reference to ChatBroker.
>>> ChatBroker has a 0..n reference to ChatListener.
>>>
>>> The intent here is that ChatBroker always comes up. So there
>>> should be no cycle. Still I get the exception.
>>> This is the line produced by the build:
>>> <reference name="listeners" cardinality="0..n" policy="dynamic"
>>> interface="net.lr.demo.chat.service.ChatListener"
>>> field="listeners" field-collection-type="service"/>
>>>
>>> I think this should be treated as an optional reference that
>>> breaks a loop. Does that make sense?
>>>
>>> Christian
>>>
>>>
>>>
>>> On 13.06.2016 17:25, David Jencks wrote:
>>>> FWIW as far as I can tell both of these issues are invalid.
>>>>
>>>> One of them is complaining about framework logging which isn’t
>>>> even something DS can do anything about.
>>>>
>>>> I have recently improved the circular reference logging to try
>>>> to tell you what the components in the cycle are, so you might
>>>> try DS trunk.
>>>>
>>>> david jencks
>>>>
>>>>> On Jun 13, 2016, at 7:00 AM, Ferry Huberts <
mail...@hupie.com
>>>>> <mailto:
mail...@hupie.com>> wrote:
>>>>>
>>>>>
>>>>>
>>>>>
https://issues.apache.org/jira/browse/FELIX-4417
>>>>>
https://issues.apache.org/jira/browse/FELIX-5197
>>>>>
>>>>> On 13/06/16 15:38, Christian Schneider wrote:
>>>>>> Can you point me to the issue number?
>>>>>>
>>>>>> I now get the exception even when setting all the options like
>>>>>> described. Interestingly it still work.
>>>>>> I assume that maybe this depends on which component is
>>>>>> processed first.
>>>>>>
>>>>>> Christian
>>>>>>
>>>>>> On 13.06.2016 14:57, Ferry Huberts wrote:
>>>>>>>
>>>>>>>
>>>>>>> On 13/06/16 14:14, Christian Schneider wrote:
>>>>>>>> Does anyone have an idea why I get this error and if I can
>>>>>>>> fix it?
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> This is a known bug in Felix SCR
>>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> Ferry Huberts
>>>>>
>>>>> --
>>>>> 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 <mailto:
bndtools-user...@googlegroups.com>
bndtools-user...@googlegroups.com
>>>>> <mailto:
bndtools-user...@googlegroups.com>.
>>>>> For more options,
>>>>> visit <
https://groups.google.com/d/optout>
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
>>>> <mailto:
bndtools-user...@googlegroups.com>.
>>>
http://www.liquid-reality.de <
http://www.liquid-reality.de/>
>>>
>>> Open Source Architect
>>>
http://www.talend.com <
http://www.talend.com/>
>>>
>>> --
>>> 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
>>> <mailto:
bndtools-user...@googlegroups.com>.
>> <mailto:
bndtools-user...@googlegroups.com>.
>> <mailto:
bndtools-user...@googlegroups.com>.
> <mailto:
bndtools-user...@googlegroups.com>.
Ferry Huberts