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:39 UTC
[camel] 02/13: CAMEL-12268 - Camel-AWS: Lets call shutdown on the
clients while stopping endpoints - AWS SES
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.