You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by jl...@apache.org on 2018/12/07 12:42:36 UTC
[14/18] tomee git commit: TOMEE-2291 - Fault Tolerance Microprofile
example for @Retry #240
TOMEE-2291 - Fault Tolerance Microprofile example for @Retry #240
Added mp-faulttolerance-retry to the examples/pom.xml file
Made variables counterStatusOfDay, counterStatusOfWeek and counterStatusOfWeekend from WeatherGateway final.
Change parent excetion of WeatherGatewayBusyServiceException, WeatherGatewayTimeoutException from FaultToleranceException to RuntimeException
Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/9e182c09
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/9e182c09
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/9e182c09
Branch: refs/heads/master
Commit: 9e182c09cc5b7a29f12f8c007c9e9294b7509b4e
Parents: 52f8606
Author: josehenriqueventura <J2705hvq*>
Authored: Wed Dec 5 21:28:18 2018 +0000
Committer: josehenriqueventura <jo...@protonmail.com>
Committed: Wed Dec 5 22:51:40 2018 +0000
----------------------------------------------------------------------
.../java/org/superbiz/rest/WeatherGateway.java | 6 +++---
.../rest/WeatherGatewayBusyServiceException.java | 4 +---
.../rest/WeatherGatewayTimeoutException.java | 4 +---
examples/pom.xml | 17 +++++++++++++----
4 files changed, 18 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tomee/blob/9e182c09/examples/mp-faulttolerance-retry/src/main/java/org/superbiz/rest/WeatherGateway.java
----------------------------------------------------------------------
diff --git a/examples/mp-faulttolerance-retry/src/main/java/org/superbiz/rest/WeatherGateway.java b/examples/mp-faulttolerance-retry/src/main/java/org/superbiz/rest/WeatherGateway.java
index 1b50071..87bda2a 100644
--- a/examples/mp-faulttolerance-retry/src/main/java/org/superbiz/rest/WeatherGateway.java
+++ b/examples/mp-faulttolerance-retry/src/main/java/org/superbiz/rest/WeatherGateway.java
@@ -47,9 +47,9 @@ public class WeatherGateway {
*/
private static final int DEFAULT_MAX_RETRY = 3;
- private AtomicInteger counterStatusOfDay = new AtomicInteger();
- private AtomicInteger counterStatusOfWeek = new AtomicInteger();
- private AtomicInteger counterStatusOfWeekend = new AtomicInteger();
+ private final AtomicInteger counterStatusOfDay = new AtomicInteger();
+ private final AtomicInteger counterStatusOfWeek = new AtomicInteger();
+ private final AtomicInteger counterStatusOfWeekend = new AtomicInteger();
private Instant statusOfWeekendInstant = null;
private Instant statusOfMonthInstant = null;
http://git-wip-us.apache.org/repos/asf/tomee/blob/9e182c09/examples/mp-faulttolerance-retry/src/main/java/org/superbiz/rest/WeatherGatewayBusyServiceException.java
----------------------------------------------------------------------
diff --git a/examples/mp-faulttolerance-retry/src/main/java/org/superbiz/rest/WeatherGatewayBusyServiceException.java b/examples/mp-faulttolerance-retry/src/main/java/org/superbiz/rest/WeatherGatewayBusyServiceException.java
index d598f5d..78535bc 100644
--- a/examples/mp-faulttolerance-retry/src/main/java/org/superbiz/rest/WeatherGatewayBusyServiceException.java
+++ b/examples/mp-faulttolerance-retry/src/main/java/org/superbiz/rest/WeatherGatewayBusyServiceException.java
@@ -16,7 +16,5 @@
*/
package org.superbiz.rest;
-import org.eclipse.microprofile.faulttolerance.exceptions.FaultToleranceException;
-
-public class WeatherGatewayBusyServiceException extends FaultToleranceException {
+public class WeatherGatewayBusyServiceException extends RuntimeException {
}
http://git-wip-us.apache.org/repos/asf/tomee/blob/9e182c09/examples/mp-faulttolerance-retry/src/main/java/org/superbiz/rest/WeatherGatewayTimeoutException.java
----------------------------------------------------------------------
diff --git a/examples/mp-faulttolerance-retry/src/main/java/org/superbiz/rest/WeatherGatewayTimeoutException.java b/examples/mp-faulttolerance-retry/src/main/java/org/superbiz/rest/WeatherGatewayTimeoutException.java
index e519c14..4b13fd5 100644
--- a/examples/mp-faulttolerance-retry/src/main/java/org/superbiz/rest/WeatherGatewayTimeoutException.java
+++ b/examples/mp-faulttolerance-retry/src/main/java/org/superbiz/rest/WeatherGatewayTimeoutException.java
@@ -16,8 +16,6 @@
*/
package org.superbiz.rest;
-import org.eclipse.microprofile.faulttolerance.exceptions.FaultToleranceException;
-
-public class WeatherGatewayTimeoutException extends FaultToleranceException {
+public class WeatherGatewayTimeoutException extends RuntimeException {
}
http://git-wip-us.apache.org/repos/asf/tomee/blob/9e182c09/examples/pom.xml
----------------------------------------------------------------------
diff --git a/examples/pom.xml b/examples/pom.xml
index 9a19500..80d5c68 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -174,6 +174,7 @@ BROKEN, see TOMEE-2140
<module>mp-metrics-counted</module>
<module>mp-metrics-timed</module>
<module>websocket-tls-basic-auth</module>
+ <module>mp-faulttolerance-retry</module>
</modules>
<dependencies>
@@ -216,11 +217,19 @@ BROKEN, see TOMEE-2140
<profile>
<id>java9</id>
<activation>
- <jdk>[9,)</jdk>
+ <jdk>9</jdk>
</activation>
- <modules>
- <module>java-modules</module>
- </modules>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration> <!-- requires saaj-impl 1.4 but cxf is not yet ready -->
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</profile>
</profiles>
</project>