However, if you are using DS annotations rather than writing the XML file yourself, then you have no controls over the order of reference elements bnd will write to the generated XML file. --
BJ Hargrave Senior Technical Staff Member, IBM OSGi Fellow and CTO of the OSGi Alliance [email protected] office: +1 386 848 1781 mobile: +1 386 848 3788 From: Felix Meschberger <[email protected]> To: OSGi Developers List <[email protected]> Date: 2013/10/29 06:58 Subject: Re: [osgi-dev] Defining binding order for servises with DS Sent by: [email protected] Hi According to the latest (DS 1.2) specification, the references are processed in the order they are declared in the descriptor. So you the best you can do is (a) declare the logging reference first and (b) make sure the logging reference is mandatory (to make sure, the logging service is really bound). This way, when your services are being bound your logging service should already be bound. Nevertheless, in the interest of stability, I still suggest you check for the availability of the log service in other bind method before actually using it. Regards Felix — Felix Meschberger | Principal Scientist | Adobe Am 29.10.2013 um 11:26 schrieb Ewgenij Sokolovski <[email protected]>: > Hello, community. I asked about service binding order on stackoverflow > > http://stackoverflow.com/questions/19589622/order-of-service-binding-with-declarative-services > > The answer was that it is not possible to define it with DS. However, in some cases it is essential to know or to set this order. So, why is it not possible? Is there a specific reason for that behaviour? > > Maybe the feature is worth to be added to OSGI specification? > > Best regards from Germany > Ewgenij > _______________________________________________ > OSGi Developer Mail List > [email protected] > https://mail.osgi.org/mailman/listinfo/osgi-dev _______________________________________________ OSGi Developer Mail List [email protected] https://mail.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________ OSGi Developer Mail List [email protected] https://mail.osgi.org/mailman/listinfo/osgi-dev
