Hi, Sorry I reread my post... http://community.jboss.org/thread/174057 the title is correct but the text in the message is wrong. Sorry for the confusion. The issue I am experiencing now with the new prototype is that unbind is called before bind (on JBOSS OSGi). In a previous prototype on equinox (slightly different code) the bind method was called before unbind which is what I am expecting.
Giuseppe. -----Original Message----- From: osgi-dev-boun...@mail.osgi.org [mailto:osgi-dev-boun...@mail.osgi.org] On Behalf Of David Bosschaert Sent: 26 October 2011 15:10 To: OSGi Developer Mail List Subject: Re: [osgi-dev] Bind and unbind sequence is DS service update. Hi Guiseppe, I'm a little bit confused. In http://community.jboss.org/thread/174057 you mention as the issue is that 'the unbind method is called after bind' but here you say that your original prototype called bind() before unbind(). Isn't that the same? Cheers, David On 26 October 2011 14:58, Giuseppe Sarno <giuseppe.sa...@genband.com> wrote: > Hello, > > I was playing with JBOSS 7.0 and trying to implement a prototype of a > DS service which automatically (dynamically) binds other DS services. > > I had done similar prototype some time ago but using the equinox container. > With the original prototype I believe the container did call the "bind" > method before the "unbind" upon update. I think this is what I read > through the line of the OSGI spec and the OSGI in practise book from > Neil B.. This way I had the chance to automatically and transparently > replace a service without affecting the run time processing. I did not > have similar behaviour using the JBOSS container (code is slightly > different so the change might have triggered the different behaviour). > The post is at http://community.jboss.org/thread/174057. My goal is to > replace a service while the system is running and there are calls to > the service. Can anybody please help to understand correct behaviour > and anything I should do to achieve the goal ? > > > > Thanks for your help. > > > > Attached below is the xml descriptor of the DS service. Should the > setDictionary method on DictionaryService implementation be called > before unsetDictionary upon update? > > > > <?xml version="1.0" encoding="UTF-8"?> > > <scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" > name="osgi.example.service.broker"> > > <implementation > class="osgi.example.service.broker.DictionaryServiceImpl"/> > > <service> > > <provide > interface="osgi.example.service.broker.interf.DictionaryService"/> > > </service> > > <reference bind="setDictionary" cardinality="1..n" > interface="osgi.example.service.Dictionary" name="Dictionary" > policy="dynamic" unbind="unsetDictionary"/> > > </scr:component> > > > > > > _______________________________________________ > OSGi Developer Mail List > osgi-dev@mail.osgi.org > https://mail.osgi.org/mailman/listinfo/osgi-dev > _______________________________________________ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev _______________________________________________ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev