You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2023/04/02 12:34:02 UTC
[camel] branch main updated: Defer lookup vertx to doStart
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 11076e47371 Defer lookup vertx to doStart
11076e47371 is described below
commit 11076e473714980d87a033369cc2567c9fbd19a3
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sun Apr 2 14:33:52 2023 +0200
Defer lookup vertx to doStart
---
.../org/apache/camel/reactive/vertx/VertXThreadPoolFactory.java | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/components/camel-threadpoolfactory-vertx/src/main/java/org/apache/camel/reactive/vertx/VertXThreadPoolFactory.java b/components/camel-threadpoolfactory-vertx/src/main/java/org/apache/camel/reactive/vertx/VertXThreadPoolFactory.java
index e0c1d5801cd..5dd384c150e 100644
--- a/components/camel-threadpoolfactory-vertx/src/main/java/org/apache/camel/reactive/vertx/VertXThreadPoolFactory.java
+++ b/components/camel-threadpoolfactory-vertx/src/main/java/org/apache/camel/reactive/vertx/VertXThreadPoolFactory.java
@@ -57,19 +57,14 @@ public class VertXThreadPoolFactory extends DefaultThreadPoolFactory implements
}
@Override
- protected void doInit() throws Exception {
- super.doInit();
+ protected void doStart() throws Exception {
+ super.doStart();
if (vertx == null) {
Set<Vertx> set = getCamelContext().getRegistry().findByType(Vertx.class);
if (set.size() == 1) {
vertx = set.iterator().next();
}
}
- }
-
- @Override
- protected void doStart() throws Exception {
- super.doStart();
if (vertx == null) {
throw new IllegalArgumentException("VertX instance must be configured.");
}