[tomee-tck] branch master updated: Switch back to Jakarta EE 8 after installing ant on AMI
This is an automated email from the ASF dual-hosted git repository. jlmonteiro pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomee-tck.git The following commit(s) were added to refs/heads/master by this push: new ef04ec7 Switch back to Jakarta EE 8 after installing ant on AMI ef04ec7 is described below commit ef04ec7ebdff099e24c55371ee059f4f14f73213 Author: Jean-Louis Monteiro AuthorDate: Wed Jan 30 23:04:12 2019 +0100 Switch back to Jakarta EE 8 after installing ant on AMI --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 92e0d20..07044ab 100644 --- a/pom.xml +++ b/pom.xml @@ -48,8 +48,8 @@ -${javaee6.cts.home} -${javaee6.ri.home} +${javaee8.cts.home} +${javaee8.ri.home} 8.0a ${settings.localRepository}
[tomee-tck] branch master updated: Typo in Java EE 6CTS link
This is an automated email from the ASF dual-hosted git repository. jlmonteiro pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomee-tck.git The following commit(s) were added to refs/heads/master by this push: new 32de475 Typo in Java EE 6CTS link 32de475 is described below commit 32de475c02303569c2a5ebf9366e80ce1f29d910 Author: Jean-Louis Monteiro AuthorDate: Wed Jan 30 22:49:40 2019 +0100 Typo in Java EE 6CTS link --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 642eab4..92e0d20 100644 --- a/pom.xml +++ b/pom.xml @@ -48,8 +48,8 @@ -${javaee.cts.home} -${javaee.ri.home} +${javaee6.cts.home} +${javaee6.ri.home} 8.0a ${settings.localRepository}
[tomee-tck] branch master updated: Switch back to Java EE 6 for some tests
This is an automated email from the ASF dual-hosted git repository. jlmonteiro pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomee-tck.git The following commit(s) were added to refs/heads/master by this push: new aacf36e Switch back to Java EE 6 for some tests aacf36e is described below commit aacf36e02ac6e4f51a468ce5c15631e8cc66fa64 Author: Jean-Louis Monteiro AuthorDate: Wed Jan 30 22:36:33 2019 +0100 Switch back to Java EE 6 for some tests --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 07044ab..642eab4 100644 --- a/pom.xml +++ b/pom.xml @@ -48,8 +48,8 @@ -${javaee8.cts.home} -${javaee8.ri.home} +${javaee.cts.home} +${javaee.ri.home} 8.0a ${settings.localRepository}
[tomee-tck] branch master updated: Split tomee version and JDK version
This is an automated email from the ASF dual-hosted git repository. jlmonteiro pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomee-tck.git The following commit(s) were added to refs/heads/master by this push: new af590de Split tomee version and JDK version af590de is described below commit af590def487ee52abaa5d63426c2d90b00534113 Author: Jean-Louis Monteiro AuthorDate: Wed Jan 30 19:14:40 2019 +0100 Split tomee version and JDK version --- ec2jdk10 | 4 +--- ec2jdk11 | 4 +--- ec2jdk9 | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/ec2jdk10 b/ec2jdk10 index 32dad35..f6bbc1e 100644 --- a/ec2jdk10 +++ b/ec2jdk10 @@ -3,7 +3,5 @@ # for the runner source "$(dirname $(readlink -f $0))/ec2jdk7" -tomee_version=7.0.4 - # for the standalone tomee -export MAVEN_OPTS="-Dtck.java.home=$HOME/jdk10 -Dtck.java.version=10 -Dopenejb.groupId=org.apache.tomee -Dopenejb.version=$tomee_version -Dtomee.version=$tomee_version" +export MAVEN_OPTS="-Dtck.java.home=$HOME/jdk10 -Dtck.java.version=10.0 $MAVEN_OPTS" diff --git a/ec2jdk11 b/ec2jdk11 index 208dcf9..d11a2b1 100644 --- a/ec2jdk11 +++ b/ec2jdk11 @@ -3,7 +3,5 @@ # for the runner source "$(dirname $(readlink -f $0))/ec2jdk7" -tomee_version=7.0.4 - # for the standalone tomee -export MAVEN_OPTS="-Dtck.java.home=$HOME/jdk11 -Dtck.java.version=11 -Dopenejb.groupId=org.apache.tomee -Dopenejb.version=$tomee_version -Dtomee.version=$tomee_version" +export MAVEN_OPTS="-Dtck.java.home=$HOME/jdk11 -Dtck.java.version=11.0 $MAVEN_OPTS" diff --git a/ec2jdk9 b/ec2jdk9 index 28a12d1..a8437b3 100644 --- a/ec2jdk9 +++ b/ec2jdk9 @@ -3,7 +3,5 @@ # for the runner source "$(dirname $(readlink -f $0))/ec2jdk7" -tomee_version=7.0.4 - # for the standalone tomee -export MAVEN_OPTS="-Dtck.java.home=$HOME/jdk9 -Dtck.java.version=1.9 -Dopenejb.groupId=org.apache.tomee -Dopenejb.version=$tomee_version -Dtomee.version=$tomee_version" +export MAVEN_OPTS="-Dtck.java.home=$HOME/jdk9 -Dtck.java.version=1.9 $MAVEN_OPTS"
[tomee] branch master updated: TOMEE-2462 - MicroProfile Configuration ConfigSource Example.
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 The following commit(s) were added to refs/heads/master by this push: new c69eec4 TOMEE-2462 - MicroProfile Configuration ConfigSource Example. c69eec4 is described below commit c69eec4917c897292ea5dd890bde1527c373dd0c Author: Roberto Cortez AuthorDate: Wed Jan 30 15:45:55 2019 + TOMEE-2462 - MicroProfile Configuration ConfigSource Example. --- examples/mp-config-source-database/README.adoc | 14 ++ examples/mp-config-source-database/pom.xml | 144 + .../config/source/database/ApplicationBean.java| 47 +++ .../source/database/DatabaseConfigSource.java | 93 + ...rg.eclipse.microprofile.config.spi.ConfigSource | 17 +++ .../src/main/tomee/conf/tomee.xml | 21 +++ .../tomee/lib/import-config-source-database.sql| 19 +++ .../source/database/DatabaseConfigSourceTest.java | 55 .../src/test/resources/arquillian.xml | 37 ++ examples/pom.xml | 1 + 10 files changed, 448 insertions(+) diff --git a/examples/mp-config-source-database/README.adoc b/examples/mp-config-source-database/README.adoc new file mode 100644 index 000..98db897 --- /dev/null +++ b/examples/mp-config-source-database/README.adoc @@ -0,0 +1,14 @@ += MicroProfile Configuration ConfigSource Database +:index-group: MicroProfile +:jbake-type: page +:jbake-status: published + +This is an example on how to implement a custom MicroProfile Configuration ConfigSource. The custom ConfigSource is +going to read configuration values from a Database. + +== Run the application: + +[source,bash] + +mvn clean install tomee:run + diff --git a/examples/mp-config-source-database/pom.xml b/examples/mp-config-source-database/pom.xml new file mode 100644 index 000..2528f82 --- /dev/null +++ b/examples/mp-config-source-database/pom.xml @@ -0,0 +1,144 @@ + + +http://maven.apache.org/POM/4.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd;> + 4.0.0 + + org.superbiz + mp-config-source-database + 8.0.0-SNAPSHOT + war + + MicroProfile :: Examples :: Config Source Database + + +8.0 +2.0.1 +1.1.13.Final + + + + + org.apache.tomee + javaee-api + ${version.javaee-api} + provided + + + + org.eclipse.microprofile + microprofile + ${version.microprofile} + pom + provided + + + + commons-dbutils + commons-dbutils + 1.7 + + + + org.apache.tomee + apache-tomee + ${project.version} + zip + microprofile + test + + + + org.jboss.arquillian.junit + arquillian-junit-container + ${version.arquillian} + test + + + + org.apache.tomee + ziplock + ${project.version} + test + + + + org.jboss.shrinkwrap.resolver + shrinkwrap-resolver-impl-maven + 2.1.0 + test + + + + org.apache.tomee + arquillian-tomee-remote + ${project.version} + test + + + + junit + junit + 4.11 + test + + + + + + +maven-war-plugin + + false + + + + +org.apache.tomee.maven +tomee-maven-plugin +${project.version} + + microprofile + ${project.artifactId} + + + +org.apache.maven.plugins +maven-compiler-plugin + + 1.8 + 1.8 + + + + + + + + + localhost + file://${basedir}/target/repo/ + + + localhost + file://${basedir}/target/snapshot-repo/ + + + diff --git a/examples/mp-config-source-database/src/main/java/org/superbiz/microprofile/config/source/database/ApplicationBean.java b/examples/mp-config-source-database/src/main/java/org/superbiz/microprofile/config/source/database/ApplicationBean.java new file mode 100644 index 000..88a3ca4 --- /dev/null +++ b/examples/mp-config-source-database/src/main/java/org/superbiz/microprofile/config/source/database/ApplicationBean.java @@ -0,0 +1,47 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + *
[jira] [Created] (TOMEE-2462) MicroProfile Configuration ConfigSource Example
Roberto Cortez created TOMEE-2462: - Summary: MicroProfile Configuration ConfigSource Example Key: TOMEE-2462 URL: https://issues.apache.org/jira/browse/TOMEE-2462 Project: TomEE Issue Type: Sub-task Components: Examples and Documentation Reporter: Roberto Cortez Assignee: Roberto Cortez Fix For: 8.0.0-M3 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[tomee] 07/07: closes apache/tomee#382 *Merged*
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 fa535a7cd9d4b6f771e37b68f18c1091f8823b86 Author: Roberto Cortez AuthorDate: Wed Jan 30 12:22:14 2019 + closes apache/tomee#382 *Merged*
[tomee] 06/07: 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
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 AuthorDate: Mon Jan 28 14:39:07 2019 + 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."); }
[tomee] 04/07: Update README.adoc
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 b661a3bf979eeb6f432c9a0d278783a56e6527a9 Author: Jose Henrique Ventura AuthorDate: Sat Jan 26 22:08:14 2019 + Update README.adoc --- examples/mp-faulttolerance-timeout/README.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/mp-faulttolerance-timeout/README.adoc b/examples/mp-faulttolerance-timeout/README.adoc index 933b47f..8017381 100644 --- a/examples/mp-faulttolerance-timeout/README.adoc +++ b/examples/mp-faulttolerance-timeout/README.adoc @@ -90,7 +90,7 @@ Beautiful day! [discrete] -= Running the test +=== Running the test You can also try it out using the link:src/test/java/org/superbiz/rest/WeatherServiceTest.java[WeatherServiceTest.java]
[tomee] 05/07: Update README.adoc
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 f055a81b1e26c82b7115a747ae1f25bb4516c397 Author: Jose Henrique Ventura AuthorDate: Sat Jan 26 22:09:47 2019 + Update README.adoc --- examples/mp-faulttolerance-timeout/README.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/mp-faulttolerance-timeout/README.adoc b/examples/mp-faulttolerance-timeout/README.adoc index 8017381..348d8f7 100644 --- a/examples/mp-faulttolerance-timeout/README.adoc +++ b/examples/mp-faulttolerance-timeout/README.adoc @@ -31,7 +31,7 @@ mvn clean install tomee:run [discrete] -=== How does it works? +=== How does it work? The method `statusOfDayByAccuWeather` fails when the threshold of `@Timeout` annotation is reached due to a long execution of `longProcessingTask` method. To respond to the request nicely, a fallback method will take place to complete the request
[tomee] 03/07: Update README.adoc
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 f0e35841ba9b9f1fe223eaa479cbf3e609ebf189 Author: Jose Henrique Ventura AuthorDate: Sat Jan 26 22:07:22 2019 + Update README.adoc --- examples/mp-faulttolerance-timeout/README.adoc | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/examples/mp-faulttolerance-timeout/README.adoc b/examples/mp-faulttolerance-timeout/README.adoc index c54fcf6..933b47f 100644 --- a/examples/mp-faulttolerance-timeout/README.adoc +++ b/examples/mp-faulttolerance-timeout/README.adoc @@ -25,9 +25,10 @@ Timeout annotation allows to configure : [discrete] === Run the application - +[source,text] + mvn clean install tomee:run - + [discrete] === How does it works? @@ -68,9 +69,10 @@ public class WeatherGateway { Day status call - +[source,text] + GET http://localhost:8080/mp-faulttolerance-retry/weather/day/status - + Server log
[tomee] 01/07: Example of how to use Fault Tolerance Timeout
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 36eed58098252a5c40733d0a13a882c0c1732ced Author: josehenriqueventura AuthorDate: Sat Jan 26 21:25:05 2019 + Example of how to use Fault Tolerance Timeout --- examples/mp-faulttolerance-timeout/README.adoc | 98 ++ examples/mp-faulttolerance-timeout/pom.xml | 93 .../java/org/superbiz/rest/WeatherGateway.java | 49 +++ .../java/org/superbiz/rest/WeatherService.java | 39 + .../java/org/superbiz/rest/WeatherServiceTest.java | 66 +++ .../src/test/resources/arquillian.xml | 30 +++ .../src/test/resources/beans.xml | 7 ++ examples/pom.xml | 1 + 8 files changed, 383 insertions(+) diff --git a/examples/mp-faulttolerance-timeout/README.adoc b/examples/mp-faulttolerance-timeout/README.adoc new file mode 100644 index 000..f4bfc36 --- /dev/null +++ b/examples/mp-faulttolerance-timeout/README.adoc @@ -0,0 +1,98 @@ += MicroProfile Fault Tolerance - Timeout +:index-group: MicroProfile +:jbake-type: page +:jbake-status: published + +This is an example of how to use Microprofile @Timeout in TomEE. + +== Timeout Feature + +Fault Tolerance Timeout allow to specify how long a task can take to complete its execution and aborting it +in case of timeout. Timeout feature can be used along with another annotations to guide the execution and result of a task. +Check the +https://download.eclipse.org/microprofile/microprofile-fault-tolerance-1.1/microprofile-fault-tolerance-spec.html#_timeout_usage[specification] +for more details. + +Timeout annotation allows to configure : + +* *value:* the timeout value +* *unit:* the timeout unit + +== Examples + +=== Run the application + + +mvn clean install tomee:run + + +=== Example 1 + +The method `statusOfDayByAccuWeather` fails when threshold of `@Timeout` annotation is reached due to a long execution of +`longProcessingTask` method. To respond the request nicely, a fallback method will be activated to complete the request +successfully by the annotation `@Fallback`. + +[source,java] + +@RequestScoped +public class WeatherGateway { + +private static final Logger LOGGER = Logger.getLogger(WeatherGateway.class.getName()); + +@Timeout(1000) +@Fallback(fallbackMethod = "statusOfWeekByMetEireann") +public String statusOfDayByAccuWeather(){ +return longProcessingTask(); +} + +public String statusOfWeekByMetEireann(){ +LOGGER.log(Level.WARNING, "MetEireann backup service has been requested due to AccuWeather timeout"); +return "Beautiful day"; +} + +private String longProcessingTask(){ +try { +Thread.sleep(1100); +} catch (InterruptedException e) { +LOGGER.log(Level.WARNING,"AccuWeather task has been interrupted."); +} +return null; +} +... +} + + +Day status call + + +GET http://localhost:8080/mp-faulttolerance-retry/weather/day/status + + +Server log + + +WARNING AccuWeather task has been interrupted. +WARNING MetEireann backup service has been requested due to AccuWeather timeout + + +Response + + +Beautiful day! + + +=== Run the tests + +You can also try it out using the +link:src/test/java/org/superbiz/rest/WeatherServiceTest.java[WeatherServiceTest.java] +available in the project. + + +mvn clean test + + + +[INFO] Results: +[INFO] +[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 + diff --git a/examples/mp-faulttolerance-timeout/pom.xml b/examples/mp-faulttolerance-timeout/pom.xml new file mode 100644 index 000..88e2c02 --- /dev/null +++ b/examples/mp-faulttolerance-timeout/pom.xml @@ -0,0 +1,93 @@ + +http://maven.apache.org/POM/4.0.0; + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd;> +4.0.0 + +org.superbiz +mp-faulttolerance-timeout +8.0.0-SNAPSHOT +war +OpenEJB :: Examples :: Microprofile Fault Tolerance :: Timeout + + + 1.0 + 1.4.0.Final +3.7.0 +3.1.0 +${project.version} +8.0 +4.12 +1.8 +1.8 + + + + +org.apache.tomee +javaee-api +${javaee-api.version} +provided + + +org.eclipse.microprofile.fault-tolerance +microprofile-fault-tolerance-api +${microprofile-fault-tolerance-api.version} +provided + + +junit +junit +${junit.version} +test + + +org.apache.tomee +openejb-cxf-rs +
[tomee] 02/07: Improvement of README.adoc which had things related with a .md file format.
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 afbbf72677925cf2874fc576ad003b0f6ecc67f0 Author: josehenriqueventura AuthorDate: Sat Jan 26 21:52:00 2019 + Improvement of README.adoc which had things related with a .md file format. --- examples/mp-faulttolerance-timeout/README.adoc | 40 +++--- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/examples/mp-faulttolerance-timeout/README.adoc b/examples/mp-faulttolerance-timeout/README.adoc index f4bfc36..c54fcf6 100644 --- a/examples/mp-faulttolerance-timeout/README.adoc +++ b/examples/mp-faulttolerance-timeout/README.adoc @@ -5,10 +5,11 @@ This is an example of how to use Microprofile @Timeout in TomEE. +[discrete] == Timeout Feature Fault Tolerance Timeout allow to specify how long a task can take to complete its execution and aborting it -in case of timeout. Timeout feature can be used along with another annotations to guide the execution and result of a task. +in case of timeout. Timeout feature can be used along with other annotations to guide the execution and result of a task. + Check the https://download.eclipse.org/microprofile/microprofile-fault-tolerance-1.1/microprofile-fault-tolerance-spec.html#_timeout_usage[specification] for more details. @@ -18,19 +19,22 @@ Timeout annotation allows to configure : * *value:* the timeout value * *unit:* the timeout unit -== Examples +[discrete] +== Example +[discrete] === Run the application mvn clean install tomee:run -=== Example 1 +[discrete] +=== How does it works? -The method `statusOfDayByAccuWeather` fails when threshold of `@Timeout` annotation is reached due to a long execution of -`longProcessingTask` method. To respond the request nicely, a fallback method will be activated to complete the request -successfully by the annotation `@Fallback`. +The method `statusOfDayByAccuWeather` fails when the threshold of `@Timeout` annotation is reached due to a long execution of +`longProcessingTask` method. To respond to the request nicely, a fallback method will take place to complete the request +successfully. The fallback method is determined by @Fallback annotation. [source,java] @@ -70,29 +74,33 @@ GET http://localhost:8080/mp-faulttolerance-retry/weather/day/status Server log - +[source,text] + WARNING AccuWeather task has been interrupted. -WARNING MetEireann backup service has been requested due to AccuWeather timeout - +WARNING MetEireann fallback service has been requested due to AccuWeather timeout. + Response - +[source,text] + Beautiful day! - + -=== Run the tests +[discrete] += Running the test You can also try it out using the link:src/test/java/org/superbiz/rest/WeatherServiceTest.java[WeatherServiceTest.java] available in the project. - +[source,text] + mvn clean test - + - + [INFO] Results: [INFO] [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 - +
[tomee] branch master updated (b9bd69b -> fa535a7)
This is an automated email from the ASF dual-hosted git repository. radcortez pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/tomee.git. from b9bd69b closes apache/tomee#376 *Merged* new 36eed58 Example of how to use Fault Tolerance Timeout new afbbf72 Improvement of README.adoc which had things related with a .md file format. new f0e3584 Update README.adoc new b661a3b Update README.adoc new f055a81 Update README.adoc new f773194 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 new fa535a7 closes apache/tomee#382 *Merged* The 7 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: examples/mp-faulttolerance-timeout/README.adoc | 108 + .../pom.xml| 25 ++--- .../java/org/superbiz/rest/WeatherGateway.java}| 47 - .../java/org/superbiz/rest/WeatherService.java}| 20 ++-- .../java/org/superbiz/rest/WeatherServiceTest.java | 10 +- .../src/test/resources/arquillian.xml | 0 .../src/test/resources/beans.xml | 0 examples/pom.xml | 1 + 8 files changed, 141 insertions(+), 70 deletions(-) create mode 100644 examples/mp-faulttolerance-timeout/README.adoc copy examples/{mp-faulttolerance-retry => mp-faulttolerance-timeout}/pom.xml (82%) copy examples/{mp-faulttolerance-fallback/src/main/java/org/superbiz/rest/WeatherService.java => mp-faulttolerance-timeout/src/main/java/org/superbiz/rest/WeatherGateway.java} (55%) copy examples/{mp-custom-healthcheck/src/main/java/org/superbiz/WeatherEndpoint.java => mp-faulttolerance-timeout/src/main/java/org/superbiz/rest/WeatherService.java} (72%) copy examples/{mp-faulttolerance-fallback => mp-faulttolerance-timeout}/src/test/java/org/superbiz/rest/WeatherServiceTest.java (82%) copy examples/{mp-opentracing-traced => mp-faulttolerance-timeout}/src/test/resources/arquillian.xml (100%) copy examples/{mp-faulttolerance-retry => mp-faulttolerance-timeout}/src/test/resources/beans.xml (100%)