Hi, BJ Hargrave schrieb: > If the updated service properties do not change the status of the > service as a target service, there is nothing to be done. > > While it might be ok to rebind the service if the reference is dynamic, > it is not ok if the reference is static.
Thanks. So, let me throw in another hat ... Considering, that the bind method may convey the service registration properties of a referenced service to the component, wouldn't it be expected for SCR to provide updated service registration properties ? Let me use an example: we have a servlet manager which takes care of servlets registered as services. To be able to arrange the servlets in the URL space we use service registration properties. The servlet manager is a DS component with a dynamic 1..n reference. If a servlet decides to locate itself at a different location, the servlet service may do as simple as call ServiceRegistration.setProperties(Dictionary). Now, for the servlet manager (and the overall application) it would be crucial to have this change propagated. WDYT of an extension (for a future release of DS) to allow a component to define an updated method (much like the bind/unbind methods) to be called if properties of a bound service have been modified ? Of course some limitations would apply: e.g. if the service ceases to be a target, the updated method would not be called but the service would be unbound. Would that make sense ? I could report a bug for that. Regards Felix > -- > > *BJ Hargrave* > Senior Technical Staff Member, IBM > OSGi Fellow and CTO of the _OSGi Alliance_ <http://www.osgi.org/>_ > [email protected]_ <mailto:[email protected]> > > office: +1 386 848 1781 > mobile: +1 386 848 3788 > > > > > From: Felix Meschberger <[email protected]> > To: OSGi Developer Mail List <[email protected]> > Date: 2009/11/05 13:09 > Subject: [osgi-dev] [DS] How to react to ServiceEvent.MODIFIED event > Sent by: [email protected] > > > ------------------------------------------------------------------------ > > > > Hi, > > In the latest DS specification (1.1 in Compendium 4.2) I can only find > limited information on how a DS implementation is intended to react to > ServiceEvent.MODIFIED event: If a service registration is modified and > ceases to be a target service, the binding has to be broken. > > But what happens if a service registration changes without the service > ceasing to be a target for the component ? > > My first impression would be that we would have to re-bind the service > to inform the component that the registration has changed -- the > component might use some service registration properties for some tasks > ... (e.g. a servlet registration). > > For example in the Felix implementation we (intend to) unbind the > service and bind it again. But there are some problems with this > implementation (see FELIX-1841[1]). > > Thanks for any information. > > Regards > Felix > > [1] https://issues.apache.org/jira/browse/FELIX-1841 > _______________________________________________ > 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
