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 2021/03/17 14:33:19 UTC
[camel] branch master updated (46aaf59 -> ecbd4b4)
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git.
from 46aaf59 Camel-AWS-Secrets-Manager: Moving integration test to localstack
new 61dd5f7 CAMEL-116340: Ensure components are started when CamelContext is starting.
new ecbd4b4 Add ignore
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../camel/impl/engine/AbstractCamelContext.java | 33 ++++++++++------------
core/camel-componentdsl/.gitignore | 1 +
core/camel-endpointdsl/.gitignore | 1 +
3 files changed, 17 insertions(+), 18 deletions(-)
create mode 100644 core/camel-componentdsl/.gitignore
create mode 100644 core/camel-endpointdsl/.gitignore
[camel] 02/02: Add ignore
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
commit ecbd4b4ebdbbd84a537ec686fb1abac2310b0976
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Mar 17 15:31:21 2021 +0100
Add ignore
---
core/camel-componentdsl/.gitignore | 1 +
core/camel-endpointdsl/.gitignore | 1 +
2 files changed, 2 insertions(+)
diff --git a/core/camel-componentdsl/.gitignore b/core/camel-componentdsl/.gitignore
new file mode 100644
index 0000000..bf16d50
--- /dev/null
+++ b/core/camel-componentdsl/.gitignore
@@ -0,0 +1 @@
+*.jfr
\ No newline at end of file
diff --git a/core/camel-endpointdsl/.gitignore b/core/camel-endpointdsl/.gitignore
new file mode 100644
index 0000000..bf16d50
--- /dev/null
+++ b/core/camel-endpointdsl/.gitignore
@@ -0,0 +1 @@
+*.jfr
\ No newline at end of file
[camel] 01/02: CAMEL-116340: Ensure components are started when
CamelContext is starting.
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 61dd5f7e185297d462ae900f2b8730b42faad525
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Mar 17 15:31:11 2021 +0100
CAMEL-116340: Ensure components are started when CamelContext is starting.
---
.../camel/impl/engine/AbstractCamelContext.java | 33 ++++++++++------------
1 file changed, 15 insertions(+), 18 deletions(-)
diff --git a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
index c638bd5..d86be48 100644
--- a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
+++ b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
@@ -2830,20 +2830,8 @@ public abstract class AbstractCamelContext extends BaseService
startDate = System.currentTimeMillis();
stopWatch.restart();
- // ensure components are started
- for (Map.Entry<String, Component> entry : components.entrySet()) {
- StartupStep step = startupStepRecorder.beginStep(Component.class, entry.getKey(), "Start Component");
- try {
- ServiceHelper.startService(entry.getValue());
- } catch (Exception e) {
- throw new FailedToStartComponentException(entry.getKey(), e.getMessage(), e);
- } finally {
- startupStepRecorder.endStep(step);
- }
- }
-
// Start the route controller
- ServiceHelper.startService(this.routeController);
+ startService(this.routeController);
doNotStartRoutesOnFirstStart = !firstStartDone && !isAutoStartup();
@@ -3067,7 +3055,7 @@ public abstract class AbstractCamelContext extends BaseService
if (!lifecycleStrategies.isEmpty()) {
StartupStep subStep
= startupStepRecorder.beginStep(CamelContext.class, getName(), "LifecycleStrategy onContextStarting");
- ServiceHelper.startService(lifecycleStrategies);
+ startServices(lifecycleStrategies);
for (LifecycleStrategy strategy : lifecycleStrategies) {
try {
strategy.onContextStarting(this);
@@ -3086,6 +3074,18 @@ public abstract class AbstractCamelContext extends BaseService
startupStepRecorder.endStep(subStep);
}
+ // ensure components are started
+ for (Map.Entry<String, Component> entry : components.entrySet()) {
+ StartupStep step = startupStepRecorder.beginStep(Component.class, entry.getKey(), "Start Component");
+ try {
+ startService(entry.getValue());
+ } catch (Exception e) {
+ throw new FailedToStartComponentException(entry.getKey(), e.getMessage(), e);
+ } finally {
+ startupStepRecorder.endStep(step);
+ }
+ }
+
if (!startupListeners.isEmpty()) {
StartupStep subStep
= startupStepRecorder.beginStep(CamelContext.class, getName(), "StartupListener onCamelContextStarting");
@@ -3109,9 +3109,6 @@ public abstract class AbstractCamelContext extends BaseService
// must let some bootstrap service be started before we can notify the starting event
EventHelper.notifyCamelContextStarting(this);
- // start components
- startServices(components.values());
-
if (isUseDataType()) {
// log if DataType has been enabled
LOG.info("Message DataType is enabled on CamelContext: {}", getName());
@@ -3468,7 +3465,7 @@ public abstract class AbstractCamelContext extends BaseService
aware.setCamelContext(getCamelContextReference());
}
- service.start();
+ ServiceHelper.startService(service);
}
private void startServices(Collection<?> services) throws Exception {