OSGi DS component lifecycle and references -


I have the following setup (on Fellix OSGI Framework 4.4.0):

A bundle b one DS component C which is a service on a reference R (aQute.bnd.annotation.comforeent.Reference) (some other bundles have been provided).

When B starts, a new component starts up and the reference is properly injected ...

Then I stop the Bundle B, hope If I start it again, then:

(A) A new component is injected into 'immediately and RC' or

(B) The existing component C is reused and injected into RC.

What happens is that I have a mixture (A) and (B) which does not work:

A new component C starts with but r c , not c '.

My questions are:

  • Do I expect (A) or (b) to be?
  • Or: can there be something else?
  • Is this - possibly - a bug in the structure?
  • Or: did I do something wrong for the first time?

    The thing is, my code is very complicated for a simple example, but I need someone to point me in the right direction ... In this particular case, I explain the problems OSGi specs about declaratory services are also defined whether a new instance (component C) is to be made or the old can be reused?

    Thanks in advance for any indication!

    The correct behavior (A) is that you feel like you do not have to implement your DS implementation Need to enter a bug.

    When a bundle is closed, all its components should be disabled and it will never be used again. Therefore, when the bundle has to be restarted, the DS infrastructure should be made a new component example.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -