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:37 UTC

[camel] branch master updated (4eb0a75 -> 257c4c8)

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git.


    from 4eb0a75  CAMEL-12267: Make CometD transport properties c...
     new b39e2d0  CAMEL-12268 - Camel-AWS: Lets call shutdown on the clients while stopping endpoints - AWS S3
     new 017fc1b  CAMEL-12268 - Camel-AWS: Lets call shutdown on the clients while stopping endpoints - AWS SES
     new febe6fd  CAMEL-12268 - Camel-AWS: Lets call shutdown on the clients while stopping endpoints - AWS SNS
     new ea15816  CAMEL-12268 - Camel-AWS: Lets call shutdown on the clients while stopping endpoints - AWS SQS
     new 5172476  CAMEL-12268 - Camel-AWS: Lets call shutdown on the clients while stopping endpoints - AWS CW
     new 0a34a3c  CAMEL-12268 - Camel-AWS: Lets call shutdown on the clients while stopping endpoints - AWS DDB
     new 2cbacb1  CAMEL-12268 - Camel-AWS: Lets call shutdown on the clients while stopping endpoints - AWS DDB Stream
     new c4edfb2  CAMEL-12268 - Camel-AWS: Lets call shutdown on the clients while stopping endpoints - AWS EC2
     new dd9a212  CAMEL-12268 - Camel-AWS: Lets call shutdown on the clients while stopping endpoints - AWS Kinesis Firehose
     new 418bfb9  CAMEL-12268 - Camel-AWS: Lets call shutdown on the clients while stopping endpoints - AWS Kinesis
     new a2d5a39   CAMEL-12268 - Camel-AWS: Lets call shutdown on the clients while stopping endpoints - AWS KMS
     new c217d1c  CAMEL-12268 - Camel-AWS: Lets call shutdown on the clients while stopping endpoints - AWS Lambda
     new 257c4c8  CAMEL-12268 - Camel-AWS: Lets call shutdown on the clients while stopping endpoints - AWS MQ

The 13 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../java/org/apache/camel/component/aws/cw/CwEndpoint.java     |  8 ++++++++
 .../java/org/apache/camel/component/aws/ddb/DdbEndpoint.java   |  8 ++++++++
 .../camel/component/aws/ddbstream/DdbStreamEndpoint.java       |  8 ++++++++
 .../java/org/apache/camel/component/aws/ec2/EC2Endpoint.java   |  8 ++++++++
 .../camel/component/aws/firehose/KinesisFirehoseEndpoint.java  |  8 ++++++++
 .../apache/camel/component/aws/kinesis/KinesisEndpoint.java    |  8 ++++++++
 .../java/org/apache/camel/component/aws/kms/KMSEndpoint.java   |  8 ++++++++
 .../org/apache/camel/component/aws/lambda/LambdaEndpoint.java  |  8 ++++++++
 .../java/org/apache/camel/component/aws/mq/MQEndpoint.java     |  8 ++++++++
 .../java/org/apache/camel/component/aws/s3/S3Endpoint.java     |  8 ++++++++
 .../java/org/apache/camel/component/aws/ses/SesEndpoint.java   | 10 ++++++++--
 .../java/org/apache/camel/component/aws/sns/SnsEndpoint.java   |  9 ++++++++-
 .../java/org/apache/camel/component/aws/sqs/SqsEndpoint.java   |  7 +++++--
 13 files changed, 101 insertions(+), 5 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
acosentino@apache.org.

[camel] 11/13: CAMEL-12268 - Camel-AWS: Lets call shutdown on the clients while stopping endpoints - AWS KMS

Posted by ac...@apache.org.
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 a2d5a3905a374bd95e8a0338ffd7c0bcb285a234
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Feb 15 09:35:13 2018 +0100

     CAMEL-12268 - Camel-AWS: Lets call shutdown on the clients while stopping endpoints - AWS KMS
---
 .../main/java/org/apache/camel/component/aws/kms/KMSEndpoint.java | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/kms/KMSEndpoint.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/kms/KMSEndpoint.java
index ec3f91b..2d6a61f 100644
--- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/kms/KMSEndpoint.java
+++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/kms/KMSEndpoint.java
@@ -67,6 +67,14 @@ public class KMSEndpoint extends ScheduledPollEndpoint {
 
         kmsClient = configuration.getKmsClient() != null ? configuration.getKmsClient() : createKMSClient();
     }
+    
+    @Override
+    public void doStop() throws Exception {
+        if (kmsClient != null) {
+            kmsClient.shutdown();
+        }
+        super.doStop();
+    }
 
     public KMSConfiguration getConfiguration() {
         return configuration;

-- 
To stop receiving notification emails like this one, please contact
acosentino@apache.org.

[camel] 07/13: CAMEL-12268 - Camel-AWS: Lets call shutdown on the clients while stopping endpoints - AWS DDB Stream

Posted by ac...@apache.org.
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 2cbacb16bb6eb50eb7d23d6a8c072d8e313d60ff
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Feb 15 09:31:41 2018 +0100

    CAMEL-12268 - Camel-AWS: Lets call shutdown on the clients while stopping endpoints - AWS DDB Stream
---
 .../apache/camel/component/aws/ddbstream/DdbStreamEndpoint.java   | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/ddbstream/DdbStreamEndpoint.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/ddbstream/DdbStreamEndpoint.java
index a4887b6..662c8ec 100644
--- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/ddbstream/DdbStreamEndpoint.java
+++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/ddbstream/DdbStreamEndpoint.java
@@ -79,6 +79,14 @@ public class DdbStreamEndpoint extends ScheduledPollEndpoint {
         ddbStreamClient = configuration.getAmazonDynamoDbStreamsClient() != null ? configuration.getAmazonDynamoDbStreamsClient()
             : createDdbStreamClient();
     }
+    
+    @Override
+    public void doStop() throws Exception {
+        if (ddbStreamClient != null) {
+            ddbStreamClient.shutdown();
+        }
+        super.doStop();
+    }
 
     @Override
     public boolean isSingleton() {

-- 
To stop receiving notification emails like this one, please contact
acosentino@apache.org.

[camel] 12/13: CAMEL-12268 - Camel-AWS: Lets call shutdown on the clients while stopping endpoints - AWS Lambda

Posted by ac...@apache.org.
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 c217d1c37a50ed63ffe43673d84915a04f10083c
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Feb 15 09:35:47 2018 +0100

    CAMEL-12268 - Camel-AWS: Lets call shutdown on the clients while stopping endpoints - AWS Lambda
---
 .../org/apache/camel/component/aws/lambda/LambdaEndpoint.java     | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/lambda/LambdaEndpoint.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/lambda/LambdaEndpoint.java
index 35a2d91..5d57793 100644
--- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/lambda/LambdaEndpoint.java
+++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/lambda/LambdaEndpoint.java
@@ -66,6 +66,14 @@ public class LambdaEndpoint extends DefaultEndpoint {
         super.doStart();
         awsLambdaClient = configuration.getAwsLambdaClient() != null ? configuration.getAwsLambdaClient() : createLambdaClient();
     }
+    
+    @Override
+    public void doStop() throws Exception {
+        if (awsLambdaClient != null) {
+            awsLambdaClient.shutdown();
+        }
+        super.doStop();
+    }
 
     public LambdaConfiguration getConfiguration() {
         return configuration;

-- 
To stop receiving notification emails like this one, please contact
acosentino@apache.org.

[camel] 05/13: CAMEL-12268 - Camel-AWS: Lets call shutdown on the clients while stopping endpoints - AWS CW

Posted by ac...@apache.org.
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.

[camel] 09/13: CAMEL-12268 - Camel-AWS: Lets call shutdown on the clients while stopping endpoints - AWS Kinesis Firehose

Posted by ac...@apache.org.
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 dd9a212600bfe812aaf7ebd5338113f758d547e6
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Feb 15 09:33:47 2018 +0100

    CAMEL-12268 - Camel-AWS: Lets call shutdown on the clients while stopping endpoints - AWS Kinesis Firehose
---
 .../camel/component/aws/firehose/KinesisFirehoseEndpoint.java     | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/firehose/KinesisFirehoseEndpoint.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/firehose/KinesisFirehoseEndpoint.java
index 3f5fafe..7bed819 100644
--- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/firehose/KinesisFirehoseEndpoint.java
+++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/firehose/KinesisFirehoseEndpoint.java
@@ -66,6 +66,14 @@ public class KinesisFirehoseEndpoint extends DefaultEndpoint {
             : createKinesisFirehoseClient();
                
     }
+    
+    @Override
+    public void doStop() throws Exception {
+        if (kinesisFirehoseClient != null) {
+            kinesisFirehoseClient.shutdown();
+        }
+        super.doStop();
+    }
 
     @Override
     public boolean isSingleton() {

-- 
To stop receiving notification emails like this one, please contact
acosentino@apache.org.

[camel] 03/13: CAMEL-12268 - Camel-AWS: Lets call shutdown on the clients while stopping endpoints - AWS SNS

Posted by ac...@apache.org.
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 febe6fdf7fd9799c8bf1ff06f757f7213a421357
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Feb 15 09:28:31 2018 +0100

    CAMEL-12268 - Camel-AWS: Lets call shutdown on the clients while stopping endpoints - AWS SNS
---
 .../java/org/apache/camel/component/aws/sns/SnsEndpoint.java     | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsEndpoint.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsEndpoint.java
index 352ebb4..0576914 100644
--- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsEndpoint.java
+++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsEndpoint.java
@@ -22,7 +22,6 @@ import com.amazonaws.auth.AWSCredentials;
 import com.amazonaws.auth.AWSCredentialsProvider;
 import com.amazonaws.auth.AWSStaticCredentialsProvider;
 import com.amazonaws.auth.BasicAWSCredentials;
-import com.amazonaws.client.builder.AwsClientBuilder.EndpointConfiguration;
 import com.amazonaws.regions.Regions;
 import com.amazonaws.services.sns.AmazonSNS;
 import com.amazonaws.services.sns.AmazonSNSClientBuilder;
@@ -153,6 +152,14 @@ public class SnsEndpoint extends DefaultEndpoint implements HeaderFilterStrategy
         }
         
     }
+    
+    @Override
+    public void doStop() throws Exception {
+        if (snsClient != null) {
+            snsClient.shutdown();
+        }
+        super.doStop();
+    }
 
     public SnsConfiguration getConfiguration() {
         return configuration;

-- 
To stop receiving notification emails like this one, please contact
acosentino@apache.org.

[camel] 04/13: CAMEL-12268 - Camel-AWS: Lets call shutdown on the clients while stopping endpoints - AWS SQS

Posted by ac...@apache.org.
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 ea15816790f16a60085ad743a00253241b0d0926
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Feb 15 09:29:41 2018 +0100

    CAMEL-12268 - Camel-AWS: Lets call shutdown on the clients while stopping endpoints - AWS SQS
---
 .../main/java/org/apache/camel/component/aws/sqs/SqsEndpoint.java  | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/sqs/SqsEndpoint.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/sqs/SqsEndpoint.java
index 7a7281e..fda087e 100644
--- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/sqs/SqsEndpoint.java
+++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/sqs/SqsEndpoint.java
@@ -220,8 +220,11 @@ public class SqsEndpoint extends ScheduledPollEndpoint implements HeaderFilterSt
     }
 
     @Override
-    protected void doStop() throws Exception {
-        client = null;
+    public void doStop() throws Exception {
+        if (client != null) {
+            client.shutdown();
+        }
+        super.doStop();
     }
 
     public Exchange createExchange(com.amazonaws.services.sqs.model.Message msg) {

-- 
To stop receiving notification emails like this one, please contact
acosentino@apache.org.

[camel] 01/13: CAMEL-12268 - Camel-AWS: Lets call shutdown on the clients while stopping endpoints - AWS S3

Posted by ac...@apache.org.
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 b39e2d04bd4c12e52fea112ce5a4ccdb56fe85f5
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Feb 15 09:26:37 2018 +0100

    CAMEL-12268 - Camel-AWS: Lets call shutdown on the clients while stopping endpoints - AWS S3
---
 .../main/java/org/apache/camel/component/aws/s3/S3Endpoint.java   | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Endpoint.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Endpoint.java
index 4684100..ae4c9ec 100644
--- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Endpoint.java
+++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Endpoint.java
@@ -146,6 +146,14 @@ public class S3Endpoint extends ScheduledPollEndpoint {
             LOG.trace("Bucket policy updated");
         }
     }
+    
+    @Override
+    public void doStop() throws Exception {
+        if (s3Client != null) {
+            s3Client.shutdown();
+        }
+        super.doStop();
+    }
 
     public Exchange createExchange(S3Object s3Object) {
         return createExchange(getExchangePattern(), s3Object);

-- 
To stop receiving notification emails like this one, please contact
acosentino@apache.org.

[camel] 13/13: CAMEL-12268 - Camel-AWS: Lets call shutdown on the clients while stopping endpoints - AWS MQ

Posted by ac...@apache.org.
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 257c4c81011e98b4e665f251334688224b2b9f18
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Feb 15 09:36:25 2018 +0100

    CAMEL-12268 - Camel-AWS: Lets call shutdown on the clients while stopping endpoints - AWS MQ
---
 .../main/java/org/apache/camel/component/aws/mq/MQEndpoint.java   | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/mq/MQEndpoint.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/mq/MQEndpoint.java
index 67a2d31..cb44848 100644
--- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/mq/MQEndpoint.java
+++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/mq/MQEndpoint.java
@@ -68,6 +68,14 @@ public class MQEndpoint extends ScheduledPollEndpoint {
 
         mqClient = configuration.getAmazonMqClient() != null ? configuration.getAmazonMqClient() : (AmazonMQClient)createMQClient();
     }
+    
+    @Override
+    public void doStop() throws Exception {
+        if (mqClient != null) {
+            mqClient.shutdown();
+        }
+        super.doStop();
+    }
 
     public MQConfiguration getConfiguration() {
         return configuration;

-- 
To stop receiving notification emails like this one, please contact
acosentino@apache.org.

[camel] 06/13: CAMEL-12268 - Camel-AWS: Lets call shutdown on the clients while stopping endpoints - AWS DDB

Posted by ac...@apache.org.
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 0a34a3ccfdf487b2e855c0ed567b479a49bcd51e
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Feb 15 09:31:04 2018 +0100

    CAMEL-12268 - Camel-AWS: Lets call shutdown on the clients while stopping endpoints - AWS DDB
---
 .../main/java/org/apache/camel/component/aws/ddb/DdbEndpoint.java | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/ddb/DdbEndpoint.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/ddb/DdbEndpoint.java
index b10cecd..fa8f45e 100644
--- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/ddb/DdbEndpoint.java
+++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/ddb/DdbEndpoint.java
@@ -111,6 +111,14 @@ public class DdbEndpoint extends ScheduledPollEndpoint {
             LOG.trace("Table [{}] created", tableName);
         }
     }
+    
+    @Override
+    public void doStop() throws Exception {
+        if (ddbClient != null) {
+            ddbClient.shutdown();
+        }
+        super.doStop();
+    }
 
     private TableDescription createTable(String tableName) {
         CreateTableRequest createTableRequest = new CreateTableRequest().withTableName(tableName)

-- 
To stop receiving notification emails like this one, please contact
acosentino@apache.org.

[camel] 10/13: CAMEL-12268 - Camel-AWS: Lets call shutdown on the clients while stopping endpoints - AWS Kinesis

Posted by ac...@apache.org.
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 418bfb9285eedb9df48855111b4c23fd70af4e42
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Feb 15 09:34:23 2018 +0100

    CAMEL-12268 - Camel-AWS: Lets call shutdown on the clients while stopping endpoints - AWS Kinesis
---
 .../org/apache/camel/component/aws/kinesis/KinesisEndpoint.java   | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/kinesis/KinesisEndpoint.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/kinesis/KinesisEndpoint.java
index 127cdd6..6e12682 100644
--- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/kinesis/KinesisEndpoint.java
+++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/kinesis/KinesisEndpoint.java
@@ -64,6 +64,14 @@ public class KinesisEndpoint extends ScheduledPollEndpoint {
             throw new IllegalArgumentException("Sequence Number must be specified with iterator Types AFTER_SEQUENCE_NUMBER or AT_SEQUENCE_NUMBER");
         }
     }
+    
+    @Override
+    public void doStop() throws Exception {
+        if (kinesisClient != null) {
+            kinesisClient.shutdown();
+        }
+        super.doStop();
+    }
 
     @Override
     public Producer createProducer() throws Exception {

-- 
To stop receiving notification emails like this one, please contact
acosentino@apache.org.

[camel] 02/13: CAMEL-12268 - Camel-AWS: Lets call shutdown on the clients while stopping endpoints - AWS SES

Posted by ac...@apache.org.
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 017fc1b48ea7143ddbc6dc7c0504b8ac2cda80e6
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Feb 15 09:27:46 2018 +0100

    CAMEL-12268 - Camel-AWS: Lets call shutdown on the clients while stopping endpoints - AWS SES
---
 .../java/org/apache/camel/component/aws/ses/SesEndpoint.java   | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/ses/SesEndpoint.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/ses/SesEndpoint.java
index b4f5dbc..d071d7e 100644
--- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/ses/SesEndpoint.java
+++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/ses/SesEndpoint.java
@@ -21,10 +21,8 @@ import com.amazonaws.auth.AWSCredentials;
 import com.amazonaws.auth.AWSCredentialsProvider;
 import com.amazonaws.auth.AWSStaticCredentialsProvider;
 import com.amazonaws.auth.BasicAWSCredentials;
-import com.amazonaws.client.builder.AwsClientBuilder.EndpointConfiguration;
 import com.amazonaws.regions.Regions;
 import com.amazonaws.services.simpleemail.AmazonSimpleEmailService;
-import com.amazonaws.services.simpleemail.AmazonSimpleEmailServiceClient;
 import com.amazonaws.services.simpleemail.AmazonSimpleEmailServiceClientBuilder;
 
 import org.apache.camel.CamelContext;
@@ -65,6 +63,14 @@ public class SesEndpoint extends DefaultEndpoint {
             ? configuration.getAmazonSESClient()
             : createSESClient();
     }
+    
+    @Override
+    public void doStop() throws Exception {
+        if (sesClient != null) {
+            sesClient.shutdown();
+        }
+        super.doStop();
+    }
 
     public Consumer createConsumer(Processor processor) throws Exception {
         throw new UnsupportedOperationException("You cannot receive messages from this endpoint");

-- 
To stop receiving notification emails like this one, please contact
acosentino@apache.org.

[camel] 08/13: CAMEL-12268 - Camel-AWS: Lets call shutdown on the clients while stopping endpoints - AWS EC2

Posted by ac...@apache.org.
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 c4edfb29ffe84cf0c14ce1fcc6e5f71133bf9940
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Feb 15 09:32:59 2018 +0100

    CAMEL-12268 - Camel-AWS: Lets call shutdown on the clients while stopping endpoints - AWS EC2
---
 .../main/java/org/apache/camel/component/aws/ec2/EC2Endpoint.java | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/ec2/EC2Endpoint.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/ec2/EC2Endpoint.java
index bd00ee9..0b440c5 100644
--- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/ec2/EC2Endpoint.java
+++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/ec2/EC2Endpoint.java
@@ -69,6 +69,14 @@ public class EC2Endpoint extends ScheduledPollEndpoint {
         
         ec2Client = configuration.getAmazonEc2Client() != null ? configuration.getAmazonEc2Client() : (AmazonEC2Client) createEc2Client();
     }
+    
+    @Override
+    public void doStop() throws Exception {
+        if (ec2Client != null) {
+            ec2Client.shutdown();
+        }
+        super.doStop();
+    }
 
     public EC2Configuration getConfiguration() {
         return configuration;

-- 
To stop receiving notification emails like this one, please contact
acosentino@apache.org.