2

I am using Apache Felix dependency manager in my project. In the service activation method

@org.apache.felix.dm.annotation.api.Start
public void activate() {
// Need BundleContext here
}

I need an access to BundleContext or Bundle. How can I achieve this?

user1278890
  • 643
  • 8
  • 22

1 Answers1

1

You can make a volatile BundleContext field in your class and the dependency manager will inject it.

Jeroen
  • 413
  • 1
  • 4
  • 16