camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-11382) Creating IgniteComponent from Ignite Instance throws IllegalStateException
Date Wed, 07 Jun 2017 09:03:18 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-11382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16040545#comment-16040545
] 

ASF GitHub Bot commented on CAMEL-11382:
----------------------------------------

Github user garyhodgson closed the pull request at:

    https://github.com/apache/camel/pull/1742


> Creating IgniteComponent from Ignite Instance throws IllegalStateException
> --------------------------------------------------------------------------
>
>                 Key: CAMEL-11382
>                 URL: https://issues.apache.org/jira/browse/CAMEL-11382
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-ignite
>    Affects Versions: 2.19.0
>            Reporter: Gary Hodgson
>            Priority: Minor
>
> 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|https://github.com/apache/camel/blob/master/components/camel-ignite/src/main/java/org/apache/camel/component/ignite/AbstractIgniteComponent.java#L77]
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.
> {code}
>   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;
>        }
>    
>        /**
> {code}
> (github pull request to follow)



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message