On 11/10/11 4:39, [email protected] wrote:
Hi,

Yes,
A component requires (wants) only 2 services among n available.
<requires .... cardinality="0..2" aggregate="true" ... >

Way back when we first started this in Service Binder, we thought about whether or not it made sense to have other cardinalities, but never could come up with use cases that made sense.

I'm still not convinced it make much sense, but it is certainly do-able. I assume you mean that you'd take the first N in the sorted order, where N is the cardinality value. What if N aren't available?

Personally, I think the use cases for this are fairly limited, so I wouldn't be inclined to believe it is worth adding any extra complexity to support this. You can definitely work around it in other ways.

-> richard


Best Regards
Denis


Clement Escoffier <[email protected]> a écrit :

Hi,

On 10.11.2011, at 10:04, [email protected] wrote:

Hi,

Related to the iPojo "Service Dependancy management"


Actually
Thanks to "requires.filters" property it is possible to override the
filter attribute for a <requires ..>.

Thanks to the policy attribute it is possible to define the binding
policy, but it not possible to override the attribut "policy".

Thanks to the "comparator" attribute it is possible to override the
default implementation for sorting a service provider.


IPojo manages the non-functionalies for requiring and 'aggregating' services.
But the cardinality (non functional propertie) is not managed, and
must be implemented by the "pojo".

What is your opinion to add/improve , features here after
i) The binding policy is overridable (taken eexample as requires.filters)

This can be tricky is you set the policy to 'static'. Indeed, that would mean that whoever was already injected it must be frozen. If we decide to 'reset' the set of injected services, then it should be ok.

ii) The "requires" manages the cardinality , and the cardinality is overridable too. iii) Having the cardinality feature, the "Dynamic-priority" policy would also be improved in order to respect the cardinality . This would be proposed as a new attribute by example.

As Richard, I'm a bit lost here. Do you mean that a component can specify it wants only 2 services (instead of n) ?

Regards,

Clement


Best regards
Denis

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]





---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to