Hi All,
Can someone please let me know on this.
Any sample snippet of code/references will be helpful.
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
Activator.java can be used to initialize(start) things.
headwire provides an excellent open source project that uses Activator.java to initialize logging:
Thanks,
Peter
Hi,
Activator.java can be used to initialize(start) things.
headwire provides an excellent open source project that uses Activator.java to initialize logging:
Thanks,
Peter
Thanks
Hello,
As far as name is concern you can use any name for activation class (Need not have to be Activator.java), you just have to mention that in your bundle configuration as
Bundle-Activator:fully-qualified-activator-class-name
Please use this only if you want to do some initialization at bundle level. For Service level initialization use something like this (This will get called when your service get initialized)
@Activate protected final void activate(final ComponentContext componentContext) { }
Yogesh
Hi Yogesh,
So does it mean that bundle activator class is optional for AEM OSGI bundles and i assume i can live fine by using @Activate/@Deactivate at service level and there will not be any bundle activator class at all in bundle. Here i assume that felix framework will initialize the bundle without any activator class with caveat that i am not doing any initialization at bundle level which we usually do not do.
It would be helpful if i can get reference to docs describing this.
Regards.