This is an automated email from the ASF dual-hosted git repository.

jamesnetherton pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git


The following commit(s) were added to refs/heads/main by this push:
     new 841a88472f Change how CamelQuartzRecorder looks up scheduler beans to 
account for cases with composite scheduler
841a88472f is described below

commit 841a88472ff128c814c8d5b1ff684d0dbcbe95f2
Author: Matej Novotny <[email protected]>
AuthorDate: Tue Feb 17 14:30:56 2026 +0100

    Change how CamelQuartzRecorder looks up scheduler beans to account for 
cases with composite scheduler
    
    Fixes #8306
---
 .../apache/camel/quarkus/component/quartz/CamelQuartzRecorder.java  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/extensions/quartz/runtime/src/main/java/org/apache/camel/quarkus/component/quartz/CamelQuartzRecorder.java
 
b/extensions/quartz/runtime/src/main/java/org/apache/camel/quarkus/component/quartz/CamelQuartzRecorder.java
index b8078e5410..585ac4a4fb 100644
--- 
a/extensions/quartz/runtime/src/main/java/org/apache/camel/quarkus/component/quartz/CamelQuartzRecorder.java
+++ 
b/extensions/quartz/runtime/src/main/java/org/apache/camel/quarkus/component/quartz/CamelQuartzRecorder.java
@@ -27,8 +27,8 @@ import io.quarkus.quartz.runtime.QuartzSchedulerImpl;
 import io.quarkus.runtime.RuntimeValue;
 import io.quarkus.runtime.annotations.Recorder;
 import jakarta.enterprise.inject.AmbiguousResolutionException;
+import jakarta.enterprise.inject.Any;
 import org.apache.camel.CamelContext;
-import org.apache.camel.Component;
 import org.apache.camel.Ordered;
 import org.apache.camel.VetoCamelContextStartException;
 import org.apache.camel.component.quartz.QuartzComponent;
@@ -90,8 +90,8 @@ public class CamelQuartzRecorder {
                         //Scheduler may be null in several cases, which would 
cause an exception in traditional autowiring
                         //see 
https://github.com/quarkusio/quarkus/issues/27929 for more details
                         if 
(handle.getBean().getBeanClass().equals(QuartzSchedulerImpl.class)) {
-                            Scheduler scheduler = 
Arc.container().select(QuartzScheduler.class).getHandle().get()
-                                    .getScheduler();
+                            Scheduler scheduler = 
Arc.container().select(QuartzScheduler.class, Any.Literal.INSTANCE)
+                                    .getHandle().get().getScheduler();
                             if (scheduler != null) {
                                 //scheduler is added only if is not null
                                 foundSchedulers.add(scheduler);

Reply via email to