joerghoh commented on code in PR #43:
URL:
https://github.com/apache/sling-org-apache-sling-event/pull/43#discussion_r2079997261
##########
src/main/java/org/apache/sling/event/impl/jobs/config/JobManagerConfiguration.java:
##########
@@ -199,6 +202,34 @@ static JobManagerConfiguration
newForTest(ResourceResolverFactory resourceResolv
/** The topology capabilities. */
private volatile TopologyCapabilities topologyCapabilities;
+ /** The condition that determines if the job manager is enabled. */
+ @Reference(
+ target = "(osgi.condition.id=true)",
Review Comment:
Is this referencing the "true" condition? In that case the condition will
always be true, and that's not what we want. We need to check for a more
specific condition here, which is only true if the system is ready.
##########
src/main/java/org/apache/sling/event/impl/jobs/config/JobManagerConfiguration.java:
##########
@@ -199,6 +202,34 @@ static JobManagerConfiguration
newForTest(ResourceResolverFactory resourceResolv
/** The topology capabilities. */
private volatile TopologyCapabilities topologyCapabilities;
+ /** The condition that determines if the job manager is enabled. */
+ @Reference(
+ target = "(osgi.condition.id=true)",
+ cardinality = ReferenceCardinality.OPTIONAL,
+ policy = ReferencePolicy.DYNAMIC
+ )
+ private volatile Condition condition;
Review Comment:
does it have to be volatile?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]