I noticed an inconvenient behaviour on optional service reference. In order
to get optional service reference working, I have to create a
reference-listener to identify whether the service is available or not. For
optional reference-list, I don't need to have a reference listener as I can
just check whether the injection is null or not.

e.g. <reference id="ref1" interface="a.b.aService" availablity="optional"/>

In order to get the above working, I have to create a reference listener to
track the optional service. Otherwise, the client will wait for the above
service a.b.aService until blueprint timeout(treat as mandatory service
dependency).

However, the reference-list for optional service reference works without the
need of using reference listener to track for the optional services.

The blueprint specification did not specify this behaviour changes between
optional service reference and reference list. Have I missed something?


-- 
Thanks
Emily
=================
Emily Jiang
[email protected]

Reply via email to