Details
-
Type:
Bug
-
Status: Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 2.19.0
-
Component/s: camel-ignite
-
Labels:None
-
Estimated Complexity:Unknown
Description
Creating an IgniteComponent from configuration works fine, but when I try and create one from an existing Ignite instance it throws an IllegalStateException when starting the component: "No configuration resource or IgniteConfiguration was provided to the Ignite component."
Looking at the code here it appears the lifecycleMode is ignored as it is only set to COMPONENT_MANAGED and cannot be altered outside of the class.
The following patch sets the lifecycleMode USER_MANAGED when an ignite instance is set, which appears to resolve the problem.
diff --git a/components/camel-ignite/src/main/java/org/apache/camel/component/ignite/AbstractIgniteComponent.java b/components/camel-ignite/src/main/java/org/apache/camel/component/ignite/AbstractIgniteComponent.java
index eaf6583..e9efc79 100644
--- a/components/camel-ignite/src/main/java/org/apache/camel/component/ignite/AbstractIgniteComponent.java
+++ b/components/camel-ignite/src/main/java/org/apache/camel/component/ignite/AbstractIgniteComponent.java
@@ -121,6 +108,7 @@
*/
public void setIgnite(Ignite ignite) {
this.ignite = ignite;
+ lifecycleMode = IgniteLifecycleMode.USER_MANAGED;
}
/**
(github pull request to follow)
Attachments
Issue Links
- links to