This is an automated email from the ASF dual-hosted git repository. radcortez pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomee.git
commit f77319429eacea0044544d1ddc2a8b97f5eb6683 Author: josehenriqueventura <jose.vent...@protonmail.com> AuthorDate: Mon Jan 28 14:39:07 2019 +0000 WeatherGateway * Changed the Timeout value from 1000 to 50 * Changed longProcessingTask sleep time from 1100 to 80 README.adoc * Updated the snippet code to reflect what was changed in WeatherGateway.java plus the URL to point to the correct endpoint --- examples/mp-faulttolerance-timeout/README.adoc | 6 +++--- .../src/main/java/org/superbiz/rest/WeatherGateway.java | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/mp-faulttolerance-timeout/README.adoc b/examples/mp-faulttolerance-timeout/README.adoc index 348d8f7..7916229 100644 --- a/examples/mp-faulttolerance-timeout/README.adoc +++ b/examples/mp-faulttolerance-timeout/README.adoc @@ -44,7 +44,7 @@ public class WeatherGateway { private static final Logger LOGGER = Logger.getLogger(WeatherGateway.class.getName()); - @Timeout(1000) + @Timeout(50) @Fallback(fallbackMethod = "statusOfWeekByMetEireann") public String statusOfDayByAccuWeather(){ return longProcessingTask(); @@ -57,7 +57,7 @@ public class WeatherGateway { private String longProcessingTask(){ try { - Thread.sleep(1100); + Thread.sleep(80); } catch (InterruptedException e) { LOGGER.log(Level.WARNING,"AccuWeather task has been interrupted."); } @@ -71,7 +71,7 @@ Day status call [source,text] ---- -GET http://localhost:8080/mp-faulttolerance-retry/weather/day/status +GET http://localhost:8080/mp-faulttolerance-timeout/weather/day/status ---- Server log diff --git a/examples/mp-faulttolerance-timeout/src/main/java/org/superbiz/rest/WeatherGateway.java b/examples/mp-faulttolerance-timeout/src/main/java/org/superbiz/rest/WeatherGateway.java index c9dd379..821e8d1 100644 --- a/examples/mp-faulttolerance-timeout/src/main/java/org/superbiz/rest/WeatherGateway.java +++ b/examples/mp-faulttolerance-timeout/src/main/java/org/superbiz/rest/WeatherGateway.java @@ -27,7 +27,7 @@ public class WeatherGateway { private static final Logger LOGGER = Logger.getLogger(WeatherGateway.class.getName()); - @Timeout(1000) + @Timeout(50) @Fallback(fallbackMethod = "statusOfWeekByMetEireann") public String statusOfDayByAccuWeather(){ return longProcessingTask(); @@ -40,7 +40,7 @@ public class WeatherGateway { private String longProcessingTask(){ try { - Thread.sleep(1100); + Thread.sleep(80); } catch (InterruptedException e) { LOGGER.log(Level.WARNING,"AccuWeather task has been interrupted."); }