You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2019/09/02 14:46:00 UTC

[jira] [Resolved] (CAMEL-13475) Camel with Olingo4 not shutting down

     [ https://issues.apache.org/jira/browse/CAMEL-13475?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-13475.
---------------------------------
    Resolution: Fixed

> Camel with Olingo4 not shutting down
> ------------------------------------
>
>                 Key: CAMEL-13475
>                 URL: https://issues.apache.org/jira/browse/CAMEL-13475
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-olingo4
>    Affects Versions: 2.23.2
>            Reporter: Remco Schoen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 3.0.0, 3.0.0.RC2
>
>
> I'm using the Olingo4 component and I want my Camel to run as a cron job. After my exchange is completed I stop the camel context, but the jvm doesn’t close and keeps running. I found out that there still was a thread running with a httpAsyncClient.
> I checked the code for the component and found in the class Olingo4AppImpl that there by default a CloseableHttpAsyncClient is started, but not closed when camel is being shut down.
> I added this to close method and now the jvm process is stopping:
> @Override
> public void close() {
>    if (client instanceof CloseableHttpAsyncClient) {
>        try {
>            client.close();
>        }
>        catch (IOException e) {
>            throw new RuntimeException(e);
>        }
>    }
> }
> Not sure what should happen when somebody uses their own httpAsyncClientBuilder.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)