Accessing BundleContext with Felix dependency manager

203 Views Asked by At

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?

1

There are 1 best solutions below

4
On

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