Jiri Ondrusek created CAMEL-21746:
-------------------------------------
Summary: When starting camel in standalone mode,
configureVaultRefresh is called twice (thus refresh task is started twice)
Key: CAMEL-21746
URL: https://issues.apache.org/jira/browse/CAMEL-21746
Project: Camel
Issue Type: Bug
Components: camel-main
Affects Versions: 4.10.0
Reporter: Jiri Ondrusek
I was debugging some unstable tests for azure-key-vault in CQ (tests covering
context reload), which involve
[EventhubsReloadTriggerTask|https://github.com/apache/camel/blob/main/components/camel-azure/camel-azure-key-vault/src/main/java/org/apache/camel/component/azure/key/vault/EventhubsReloadTriggerTask.java]
.
I noticed that the task is started twice, which is not necessary and I'd say
also not intended.
* When CQ starts, the method
[DefaultConfigurationConfigurer.afterConfigure(camelContext);|https://github.com/apache/camel/blob/main/core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java#L1209]
is called. From that method, the vaultRefresh is called for the first time
([see line
632|https://github.com/apache/camel/blob/main/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationConfigurer.java#L632]).
* For the second time, the same method is called again from [BaseMainSupport
l1570|https://github.com/apache/camel/blob/main/core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java#L1570]
The first call makes more sense, as this code block is solving related vault
configurations.
I think that the second call can be removed.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)