You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2018/02/15 08:41:42 UTC
[camel] 05/13: CAMEL-12268 - Camel-AWS: Lets call shutdown on the
clients while stopping endpoints - AWS CW
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 5172476c76bf5186237b1b123ee2a3d9ffac457e
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Feb 15 09:30:18 2018 +0100
CAMEL-12268 - Camel-AWS: Lets call shutdown on the clients while stopping endpoints - AWS CW
---
.../main/java/org/apache/camel/component/aws/cw/CwEndpoint.java | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/cw/CwEndpoint.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/cw/CwEndpoint.java
index 735131f..fa016ff 100644
--- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/cw/CwEndpoint.java
+++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/cw/CwEndpoint.java
@@ -74,6 +74,14 @@ public class CwEndpoint extends DefaultEndpoint {
cloudWatchClient = configuration.getAmazonCwClient() != null ? configuration.getAmazonCwClient() : createCloudWatchClient();
}
+
+ @Override
+ public void doStop() throws Exception {
+ if (cloudWatchClient != null) {
+ cloudWatchClient.shutdown();
+ }
+ super.doStop();
+ }
public CwConfiguration getConfiguration() {
return configuration;
--
To stop receiving notification emails like this one, please contact
acosentino@apache.org.