1

In ONOS on karaf 3.0.2, I wish to get current bundle's BundleContext instance for tracking bundle's status and configuring it. But ONOS uses declarative service, so I cannot use function like BundleContext.getServiceReference() to get it. Could anyone help me ?

闫伯元
  • 445
  • 1
  • 4
  • 9

1 Answers1

6

You can inject the BundleContext in an @Activate method when using DS.

Christian Schneider
  • 19,420
  • 2
  • 39
  • 64