0

in osgi, i have this setup: Bundle A has Service S registered. Bundle B processes Bundle A and should remove Service S from it. can it be done? or is it conceptually nonsense? i didnot find any method for removing the service as i did not registered it (and therefore does not have the serviceRegistration object).

To make it more complicated: Service S actually stems from Bundle B. The goal is to remove S after a restart from B and add a new instance of S. So i could also implement a S.removeYourself() method... is this possible?

wrm
  • 1,898
  • 13
  • 24

1 Answers1

0

You must use the ServiceRegistration object to unregister the service. So you would need some means for Bundle B to inform Bundle A to unregister the service when it is no longer necessary.

BJ Hargrave
  • 9,324
  • 1
  • 19
  • 27
  • ah.. i didnt see it back than but i just hand the ServiceRegistration to S, so it can deregister itself... – wrm Aug 31 '12 at 14:24