Spring emails: modifications in Spring queue capacity.
authorGustavo Martin Morcuende <gu.martinm@gmail.com>
Fri, 25 Mar 2016 21:35:14 +0000 (22:35 +0100)
committerGustavo Martin Morcuende <gu.martinm@gmail.com>
Fri, 25 Mar 2016 21:35:14 +0000 (22:35 +0100)
I am not sure what is it for.

SpringJava/Emails/spring-emails-web-client/src/main/java/de/spring/webservices/rest/controller/EmailController.java
SpringJava/Emails/spring-emails-web-client/src/main/resources/spring-configuration/spring-configuration.xml

index 25bebd5..583e66a 100644 (file)
@@ -42,7 +42,7 @@ public class EmailController {
                this.emailMakerVelocityService = emailMakerVelocityService;
        }
 
-       @RequestMapping(method = RequestMethod.GET)
+       @RequestMapping(method = RequestMethod.POST)
     @ResponseStatus(HttpStatus.OK)
     public void emails() throws MessagingException {
                final String emailSubject = emailMakerVelocityService.getSubject(SUBJECT_MESSAGE_KEY, Locale.getDefault());
index 5bd90ec..4589e60 100644 (file)
@@ -12,7 +12,7 @@
                       http://www.springframework.org/schema/util 
                       http://www.springframework.org/schema/util/spring-util.xsd
                       http://www.springframework.org/schema/task
-                                 http://www.springframework.org/schema/task/spring-task-3.0.xsd">
+                                 http://www.springframework.org/schema/task/spring-task.xsd">
 
     <!--
        Searches for beans in packages (instead of XML configuration we can use
@@ -23,8 +23,8 @@
     
     <!--  Enable Asynchronous Spring Tasks -->
        <task:annotation-driven />
-       <task:executor id="asyncEmailSender" pool-size="0-2" keep-alive="60"
-               queue-capacity="2" rejection-policy="CALLER_RUNS" />
+       <task:executor id="asyncEmailSender" pool-size="1-10" keep-alive="60"
+               queue-capacity="10" rejection-policy="CALLER_RUNS" />
        
 
        <bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">