Apache Sling Scheduler + OSGI annotations on 6.1

Avatar

Avatar

kristofv3501920

Avatar

kristofv3501920

kristofv3501920

24-10-2017

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K
smacdonald2008

24-10-2017

This should be supported if you setup the POM dependencies, etc. This Github project was build for AEM. There is no reason why these annotations would not work.

Answers (1)

Answers (1)

Avatar

Avatar

kristofv3501920

Avatar

kristofv3501920

kristofv3501920

24-10-2017

Ok, it does work. My class has a configuration to configure property "scheduler.period". The mistake I made was that I had the following properties as part of the @Component annotation

"scheduler.concurrent=false",
"scheduler.immediate=true",
"scheduler.runOn=SINGLE"

So apparently you cannot spread scheduler properties between a config class and the Component annotation. But then how can you make those 3 properties private i.e. non-configurable while still have the ability to configure property "scheduler.period"?