Skip to content

Commit 13c3431

Browse files
committed
fix: Changes needed to have ConfigProperty injection working in Jakarta
1 parent dc604d4 commit 13c3431

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

server-common/src/main/java/io/a2a/server/util/async/AsyncExecutorProducer.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
import jakarta.annotation.PreDestroy;
1313
import jakarta.enterprise.context.ApplicationScoped;
1414
import jakarta.enterprise.inject.Produces;
15+
import jakarta.inject.Inject;
16+
1517
import org.eclipse.microprofile.config.inject.ConfigProperty;
1618
import org.slf4j.Logger;
1719
import org.slf4j.LoggerFactory;
@@ -21,14 +23,17 @@ public class AsyncExecutorProducer {
2123

2224
private static final Logger LOGGER = LoggerFactory.getLogger(AsyncExecutorProducer.class);
2325

26+
@Inject // Needed to work in standard Jakarta runtimes (Quarkus skips this)
2427
@ConfigProperty(name = "a2a.executor.core-pool-size", defaultValue = "5")
2528
int corePoolSize;
2629

30+
@Inject // Needed to work in standard Jakarta runtimes (Quarkus skips this)
2731
@ConfigProperty(name = "a2a.executor.max-pool-size", defaultValue = "50")
2832
int maxPoolSize;
2933

34+
@Inject // Needed to work in standard Jakarta runtimes (Quarkus skips this)
3035
@ConfigProperty(name = "a2a.executor.keep-alive-seconds", defaultValue = "60")
31-
long keepAliveSeconds;
36+
int keepAliveSeconds;
3237

3338
private ExecutorService executor;
3439

0 commit comments

Comments
 (0)