Hey,
I am using maven-scr-plugin to create a Component.
@Component
public class MyComponent {
//@Reference
private ComponentContext context;
private BundleContenxt bundleContext;
}
How can I initialize MyComponent.context ?
In project's pom.xml, I can specify Bundle-Activator:
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.3.6</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-Activator>
my.Activator
</Bundle-Activator>
....
In my.Activator, I have
@Override
public void start(BundleContext context) throws Exception {
//would like to get reference of MyComponent so that I can pass
context to it.
}