Modified: tomee/site/trunk/content/tomee-8.0/examples/mp-metrics-counted.html
URL: 
http://svn.apache.org/viewvc/tomee/site/trunk/content/tomee-8.0/examples/mp-metrics-counted.html?rev=1866975&r1=1866974&r2=1866975&view=diff
==============================================================================
--- tomee/site/trunk/content/tomee-8.0/examples/mp-metrics-counted.html 
(original)
+++ tomee/site/trunk/content/tomee-8.0/examples/mp-metrics-counted.html Sun Sep 
15 22:59:06 2019
@@ -98,54 +98,70 @@
                 <div id="preamble">
 <div class="sectionbody">
 <div class="paragraph">
-<p>This is an example on how to use microprofile metrics in TomEE.  The 
project includes a docker profile which can be used to create a Docker 
image.</p>
+<p>This is an example of how to use microprofile metrics in TomEE.  The project
+includes a docker profile which can be used to create a Docker image.</p>
 </div>
 </div>
 </div>
 <div class="sect1">
 <h2 id="_run_the_application">Run the application:</h2>
 <div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
 <div class="content">
-<pre>mvn clean install tomee:run</pre>
+<pre class="highlight"><code class="language-bash" data-lang="bash">$ mvn 
clean install tomee:run</code></pre>
 </div>
 </div>
+<div class="admonitionblock note">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-note" title="Note"></i>
+</td>
+<td class="content">
+Alternatively, build and run the application via Docker (note the use of the 
docker profile):
+</td>
+</tr>
+</table>
 </div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-bash" data-lang="bash">$ mvn 
-Pdocker docker:build</code></pre>
 </div>
-<div class="sect1">
-<h2 
id="_alternatively_build_and_run_the_application_via_docker_note_the_use_of_the_docker_profile">Alternatively
 build and run the application via Docker (note the use of the docker 
profile):</h2>
-<div class="sectionbody">
-<div class="literalblock">
+</div>
+<div class="listingblock">
 <div class="content">
-<pre>mvn -Pdocker docker:build
-docker run -it --rm \
-       -p 8080:8080 \
-       --name=tomee-mp-metrics-counted \
-       tomee/mp-metrics-counted</pre>
+<pre class="highlight"><code class="language-bash" data-lang="bash">$ docker 
run -it --rm -p 8080:8080 --name=tomee-mp-metrics-counted 
tomee/mp-metrics-counted</code></pre>
 </div>
 </div>
 <div class="paragraph">
-<p>Within the application there is an endpoint that will give you weather
+<p>Within the application, there is an endpoint that will give you weather
 status for the day and week.</p>
 </div>
 </div>
 </div>
 <div class="sect1">
-<h2 id="_for_the_day_status_call">For the day status call:</h2>
+<h2 id="_get_the_weather_for_the_week">Get the weather for the week:</h2>
 <div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
 <div class="content">
-<pre>GET http://localhost:8080/mp-metrics-counted/weather/week/status</pre>
+<pre class="highlight"><code class="language-bash" data-lang="bash">$ curl -X 
GET http://localhost:8080/mp-metrics-counted/weather/week/status</code></pre>
 </div>
 </div>
+<div class="admonitionblock important">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-important" title="Important"></i>
+</td>
+<td class="content">
+If running via Docker, because the application is installed as the ROOT 
application, remove the application name from the URL:
+</td>
+</tr>
+</table>
 </div>
-</div>
-<div class="sect1">
-<h2 
id="_if_running_via_docker_because_the_application_is_installed_as_the_root_application_remove_the_application_name_such_as">If
 running via Docker, because the application is installed as the ROOT 
application, remove the application name such as:</h2>
-<div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
 <div class="content">
-<pre>GET http://localhost:8080/weather/week/status</pre>
+<pre class="highlight"><code class="language-bash" data-lang="bash">$ curl -X 
GET http://localhost:8080/weather/week/status</code></pre>
 </div>
 </div>
 </div>
@@ -153,9 +169,9 @@ status for the day and week.</p>
 <div class="sect1">
 <h2 id="_response">Response:</h2>
 <div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
 <div class="content">
-<pre>Hi, today is a sunny day!</pre>
+<pre class="highlight"><code class="language-text" data-lang="text">Hi, today 
is a sunny day!</code></pre>
 </div>
 </div>
 </div>
@@ -169,11 +185,11 @@ a service.</p>
 </div>
 <div class="paragraph">
 <p>To use this feature you need to annotate the JAX-RS resource method with
-@Counted.</p>
+<code>@Counted</code>.</p>
 </div>
-<div class="literalblock">
+<div class="listingblock">
 <div class="content">
-<pre>@Path("/weather")
+<pre class="highlight"><code class="language-java" 
data-lang="java">@Path("/weather")
 @Produces(MediaType.APPLICATION_JSON)
 @Consumes(MediaType.APPLICATION_JSON)
 @ApplicationScoped
@@ -187,36 +203,34 @@ public class WeatherService {
         return "Hi, today is a sunny day!";
     }
 ...
-}</pre>
+}</code></pre>
 </div>
 </div>
 <div class="paragraph">
-<p>There are some configurations, as part of @Counted, that you need to
-know:</p>
+<p>There are some configurations, as part of <code>@Counted</code>, that you 
need to know:</p>
 </div>
 <div class="paragraph">
-<p><strong>String name</strong> Optional. Sets the name of the metric. If not 
explicitly
-given the name of the annotated object is used.</p>
+<p><strong>String name</strong> Optional. Sets the name of the metric. If not 
explicitly given
+the name of the annotated object is used.</p>
 </div>
 <div class="paragraph">
-<p><strong>boolean absolute</strong> If true, uses the given name as the 
absolute name of
-the metric. If false, prepends the package name and class name before
-the given name. Default value is false.</p>
+<p><strong>boolean absolute</strong> If true, uses the given name as the 
absolute name of the
+metric. If false, prepends the package name and class name before the given
+name. Default value is false.</p>
 </div>
 <div class="paragraph">
-<p><strong>String displayName</strong> Optional. A human-readable display name 
for
-metadata.</p>
+<p><strong>String displayName</strong> Optional. A human-readable display name 
for metadata.</p>
 </div>
 <div class="paragraph">
 <p><strong>String description</strong> Optional. A description of the 
metric.</p>
 </div>
 <div class="paragraph">
-<p><strong>String[] tags</strong> Optional. Array of Strings in the = format 
to supply
-special tags to a metric.</p>
+<p><strong>String[] tags</strong> Optional. Array of Strings in the = format 
to supply special
+tags to a metric.</p>
 </div>
 <div class="paragraph">
-<p><strong>boolean reusable</strong> Denotes if a metric with a certain name 
can be
-registered in more than one place. Does not apply to gauges.</p>
+<p><strong>boolean reusable</strong> Denotes if a metric with a certain name 
can be registered in
+more than one place. Does not apply to <code>@Gauge</code>.</p>
 </div>
 </div>
 </div>
@@ -228,35 +242,43 @@ registered in more than one place. Does
 </div>
 <div class="sect2">
 <h3 id="_prometheus_format">Prometheus format:</h3>
-<div class="literalblock">
+<div class="listingblock">
 <div class="content">
-<pre>GET 
http://localhost:8080/mp-metrics-counted/metrics/application/weather_day_status</pre>
+<pre class="highlight"><code class="language-bash" data-lang="bash">$ curl -X 
GET 
http://localhost:8080/mp-metrics-counted/metrics/application/weather_day_status</code></pre>
 </div>
 </div>
 </div>
 <div class="sect2">
-<h3 id="_response_2">Response:</h3>
-<div class="literalblock">
+<h3 id="_prometheus_response">Prometheus Response:</h3>
+<div class="listingblock">
 <div class="content">
-<pre># TYPE application:weather_day_status counter
-application:weather_day_status 1.0</pre>
+<pre class="highlight"><code class="language-text" data-lang="text"># TYPE 
application:weather_day_status counter
+application:weather_day_status 1.0</code></pre>
 </div>
 </div>
 </div>
 <div class="sect2">
 <h3 id="_json_format">JSON Format:</h3>
 <div class="paragraph">
-<p>For json format add the header <em>Accept=application/json</em> to the 
request.</p>
+<p>For json format add the header <code>Accept: application/json</code> to the 
HTTP request.</p>
 </div>
-<div class="literalblock">
+<div class="listingblock">
 <div class="content">
-<pre>{
+<pre class="highlight"><code class="language-bash" data-lang="bash">$ curl -X 
GET -H "Accept: application/json" 
http://localhost:8080/mp-metrics-counted/metrics/application/weather_day_status</code></pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_json_response">JSON Response:</h3>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-javascript" 
data-lang="javascript">{
     "weather_day_status": {
         "delegate": {},
         "unit": "none",
         "count": 1
     }
-}</pre>
+}</code></pre>
 </div>
 </div>
 </div>
@@ -266,25 +288,25 @@ application:weather_day_status 1.0</pre>
 <h2 id="_metric_metadata">Metric metadata</h2>
 <div class="sectionbody">
 <div class="paragraph">
-<p>A metric will have a metadata so you can know more information about it,
-like displayName, description, tags e etc.</p>
+<p>A metric will have metadata so you can know more information about it,
+like <code>displayName</code>, <code>description</code>, <code>tags</code>, 
etc.</p>
 </div>
 <div class="paragraph">
-<p>Check the metric metadata doing a <em>OPTIONS</em> request:</p>
+<p>Check the metric metadata doing a <em>OPTIONS</em> HTTP request:</p>
 </div>
 <div class="sect2">
-<h3 id="_request">Request</h3>
-<div class="literalblock">
+<h3 id="__em_options_em_http_request"><em>OPTIONS</em> HTTP Request</h3>
+<div class="listingblock">
 <div class="content">
-<pre>OPTIONS 
http://localhost:8080/mp-metrics-counted/metrics/application/weather_day_status</pre>
+<pre class="highlight"><code class="language-bash" data-lang="bash">$ curl -X 
OPTIONS 
http://localhost:8080/mp-metrics-counted/metrics/application/weather_day_status</code></pre>
 </div>
 </div>
 </div>
 <div class="sect2">
-<h3 id="_response_3">Response:</h3>
-<div class="literalblock">
+<h3 id="_response_2">Response:</h3>
+<div class="listingblock">
 <div class="content">
-<pre>{
+<pre class="highlight"><code class="language-javascript" 
data-lang="javascript">{
     "weather_day_status": {
         "unit": "none",
         "displayName": "Weather Day Status",
@@ -306,12 +328,12 @@ like displayName, description, tags e et
         "reusable": false,
         "tags": ""
     }
-}</pre>
+}</code></pre>
 </div>
 </div>
 <div class="paragraph">
-<p>You can also try it out using the WeatherServiceTest.java available in
-the project.</p>
+<p>You can also try it out using the WeatherServiceTest.java available in the
+project.</p>
 </div>
 </div>
 </div>

Modified: tomee/site/trunk/content/tomee-8.0/examples/mp-metrics-histogram.html
URL: 
http://svn.apache.org/viewvc/tomee/site/trunk/content/tomee-8.0/examples/mp-metrics-histogram.html?rev=1866975&r1=1866974&r2=1866975&view=diff
==============================================================================
--- tomee/site/trunk/content/tomee-8.0/examples/mp-metrics-histogram.html 
(original)
+++ tomee/site/trunk/content/tomee-8.0/examples/mp-metrics-histogram.html Sun 
Sep 15 22:59:06 2019
@@ -88,7 +88,7 @@
           <div class="col-md-12">
             <div class='page-header'>
               
-              <h1>MicroProfile Metrics Histogram</h1>
+              <h1>MicroProfile Metrics <code>@Histogram</code></h1>
             </div>
           </div>
         </div>
@@ -105,9 +105,9 @@
 <div class="sect1">
 <h2 id="_run_the_application">Run the application:</h2>
 <div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
 <div class="content">
-<pre>mvn clean install tomee:run</pre>
+<pre class="highlight"><code class="language-bash" data-lang="bash">$ mvn 
clean install tomee:run</code></pre>
 </div>
 </div>
 <div class="paragraph">
@@ -119,9 +119,9 @@ histogram of the most recent New York Ci
 <div class="sect1">
 <h2 id="_request">Request:</h2>
 <div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
 <div class="content">
-<pre>curl -X GET 
http://localhost:8080/mp-metrics-histogram/weather/histogram</pre>
+<pre class="highlight"><code class="language-bash" data-lang="bash">$ curl -X 
GET http://localhost:8080/mp-metrics-histogram/weather/histogram</code></pre>
 </div>
 </div>
 </div>
@@ -129,9 +129,9 @@ histogram of the most recent New York Ci
 <div class="sect1">
 <h2 id="_response">Response:</h2>
 <div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
 <div class="content">
-<pre>{
+<pre class="highlight"><code class="language-javascript" 
data-lang="javascript">{
     "count":15,
     "max":55,
     "mean":44.4,
@@ -144,7 +144,7 @@ histogram of the most recent New York Ci
     "p999":54.0,
     "stddev":7.0710678118654755,
     "unit":"degrees F"
-}</pre>
+}</code></pre>
 </div>
 </div>
 </div>
@@ -156,12 +156,12 @@ histogram of the most recent New York Ci
 <p>Microprofile metrics has a feature create a histogram of data.</p>
 </div>
 <div class="paragraph">
-<p>To use this feature, inject a MetricRegistry, register the Histogram,
-and add data to the histogram as shown below.</p>
+<p>To use this feature, inject a <code>MetricRegistry</code>, register the 
Histogram, and add
+data to the histogram as shown below.</p>
 </div>
-<div class="literalblock">
+<div class="listingblock">
 <div class="content">
-<pre>@Inject
+<pre class="highlight"><code class="language-java" data-lang="java">@Inject
 private MetricRegistry registry;
 
 @Inject
@@ -181,54 +181,51 @@ public Histogram getTemperatures() {
         histogram.update(temp);
     }
     return histogram;
-}</pre>
+}</code></pre>
 </div>
 </div>
 <div class="paragraph">
-<p>There are some Histogram configurations defined in the @Metric
-annotation:</p>
+<p>There are some Histogram configurations defined in the <code>@Metric</code> 
annotation:</p>
 </div>
 <div class="paragraph">
-<p><strong>String name</strong> Optional. The name of the metric. If not 
explicitly given
-the name of the annotated object is used.</p>
+<p><strong>String name</strong> Optional. The name of the metric. If not 
explicitly given the
+name of the annotated object is used.</p>
 </div>
 <div class="paragraph">
-<p><strong>String displayName</strong> Optional. A human readable display name 
for
-metadata.</p>
+<p><strong>String displayName</strong> Optional. A human readable display name 
for metadata.</p>
 </div>
 <div class="paragraph">
 <p><strong>String description</strong> Optional. A description of the 
metric.</p>
 </div>
 <div class="paragraph">
-<p><strong>String[] tags</strong> Optional. An array of Strings in the = 
format to supply
-special tags to a metric.</p>
+<p><strong>String[] tags</strong> Optional. An array of Strings in the = 
format to supply special
+tags to a metric.</p>
 </div>
 <div class="paragraph">
-<p><strong>boolean reusable</strong> Denotes if a metric with a certain name 
can be
-registered in more than one place. Does not apply to gauges or
-histograms.</p>
+<p><strong>boolean reusable</strong> Denotes if a metric with a certain name 
can be registered in
+more than one place. Does not apply to gauges or histograms.</p>
 </div>
 <div class="sect2">
 <h3 id="_for_the_histogram_status">For the histogram status:</h3>
-<div class="literalblock">
+<div class="listingblock">
 <div class="content">
-<pre>GET 
http://localhost:8080/mp-metrics-histogram/weather/histogram/status</pre>
+<pre class="highlight"><code class="language-bash" data-lang="bash">$ curl -X 
GET 
http://localhost:8080/mp-metrics-histogram/weather/histogram/status</code></pre>
 </div>
 </div>
 </div>
 <div class="sect2">
 <h3 id="_reponse">Reponse:</h3>
-<div class="literalblock">
+<div class="listingblock">
 <div class="content">
-<pre> Here are the most recent New York City temperatures.</pre>
+<pre class="highlight"><code class="language-bash" data-lang="bash"> Here are 
the most recent New York City temperatures.</code></pre>
 </div>
 </div>
 </div>
 <div class="sect2">
 <h3 id="_expected_prometheus_format">Expected Prometheus format:</h3>
-<div class="literalblock">
+<div class="listingblock">
 <div class="content">
-<pre>    # TYPE application:temperatures_degrees F summary histogram
+<pre class="highlight"><code class="language-text" data-lang="text">    # TYPE 
application:temperatures_degrees F summary histogram
     # TYPE application:temperatures_degrees F_count histogram
     application:temperatures_degrees F_count 15.0
     # TYPE application:temperatures_min_degrees F histogram
@@ -273,23 +270,23 @@ histograms.</p>
     # TYPE application:org_superbiz_histogram_weather_service_temperatures 
histogram
     
application:org_superbiz_histogram_weather_service_temperatures{quantile="0.99"}
 0.0
     # TYPE application:org_superbiz_histogram_weather_service_temperatures 
histogram
-    
application:org_superbiz_histogram_weather_service_temperatures{quantile="0.999"}
 0.0</pre>
+    
application:org_superbiz_histogram_weather_service_temperatures{quantile="0.999"}
 0.0</code></pre>
 </div>
 </div>
 </div>
 <div class="sect2">
 <h3 id="_request_2">Request:</h3>
-<div class="literalblock">
+<div class="listingblock">
 <div class="content">
-<pre>curl -X GET 
http://localhost:8080/mp-metrics-histogram/metrics/application</pre>
+<pre class="highlight"><code class="language-bash" data-lang="bash">$ curl -X 
GET http://localhost:8080/mp-metrics-histogram/metrics/application</code></pre>
 </div>
 </div>
 </div>
 <div class="sect2">
 <h3 id="_response_2">Response:</h3>
-<div class="literalblock">
+<div class="listingblock">
 <div class="content">
-<pre>{
+<pre class="highlight"><code class="language-javascript" 
data-lang="javascript">{
     "org.superbiz.histogram.WeatherService.temperatures": {
         "count":0,
         "max":0,
@@ -303,7 +300,7 @@ histograms.</p>
         "stddev":0.0,
         "unit":"none"
     }
-}</pre>
+}</code></pre>
 </div>
 </div>
 </div>
@@ -314,21 +311,21 @@ histograms.</p>
 <div class="sectionbody">
 <div class="paragraph">
 <p>A metric will have a metadata to provide information about it such as
-displayName, description, tags, etc.</p>
+<code>displayName</code>, <code>description</code>, <code>tags</code>, etc.</p>
 </div>
 <div class="sect2">
 <h3 id="_request_3">Request:</h3>
-<div class="literalblock">
+<div class="listingblock">
 <div class="content">
-<pre>curl -X OPTIONS 
http://localhost:8080/mp-metrics-histogram/metrics/application</pre>
+<pre class="highlight"><code class="language-bash" data-lang="bash">$ curl -X 
OPTIONS 
http://localhost:8080/mp-metrics-histogram/metrics/application</code></pre>
 </div>
 </div>
 </div>
 <div class="sect2">
 <h3 id="_response_3">Response:</h3>
-<div class="literalblock">
+<div class="listingblock">
 <div class="content">
-<pre>{
+<pre class="highlight"><code class="language-javascript" 
data-lang="javascript">{
     "org.superbiz.histogram.WeatherService.temperatures": {
         "description": "A histogram metrics example.",
         "displayName":"Histogram of Recent New York Temperatures",
@@ -339,15 +336,15 @@ displayName, description, tags, etc.</p>
         "typeRaw":"HISTOGRAM",
         "unit":"none"
     }
-}</pre>
+}</code></pre>
 </div>
 </div>
 </div>
 <div class="sect2">
 <h3 id="_test_the_application">Test the application:</h3>
-<div class="literalblock">
+<div class="listingblock">
 <div class="content">
-<pre>mvn test</pre>
+<pre class="highlight"><code class="language-bash" data-lang="bash">$ mvn 
test</code></pre>
 </div>
 </div>
 </div>

Modified: tomee/site/trunk/content/tomee-8.0/examples/mp-metrics-metered.html
URL: 
http://svn.apache.org/viewvc/tomee/site/trunk/content/tomee-8.0/examples/mp-metrics-metered.html?rev=1866975&r1=1866974&r2=1866975&view=diff
==============================================================================
--- tomee/site/trunk/content/tomee-8.0/examples/mp-metrics-metered.html 
(original)
+++ tomee/site/trunk/content/tomee-8.0/examples/mp-metrics-metered.html Sun Sep 
15 22:59:06 2019
@@ -105,22 +105,23 @@
 <div class="sect1">
 <h2 id="_run_the_application">Run the application:</h2>
 <div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
 <div class="content">
-<pre>mvn clean install tomee:run</pre>
+<pre class="highlight"><code class="language-bash" data-lang="bash">$ mvn 
clean install tomee:run</code></pre>
 </div>
 </div>
 <div class="paragraph">
-<p>Within the application, there is an enpoint that will give you a weather 
weather status for the day and week.</p>
+<p>Within the application, there is an enpoint that will give you a weather 
status
+for the day and week.</p>
 </div>
 </div>
 </div>
 <div class="sect1">
 <h2 id="_for_the_day_status_call">For the day status call:</h2>
 <div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
 <div class="content">
-<pre>GET http://localhost:8080/mp-metrics-metered/weather/day/status</pre>
+<pre class="highlight"><code class="language-bash" data-lang="bash">$ curl -X 
GET http://localhost:8080/mp-metrics-metered/weather/day/status</code></pre>
 </div>
 </div>
 </div>
@@ -128,9 +129,9 @@
 <div class="sect1">
 <h2 id="_response">Response:</h2>
 <div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
 <div class="content">
-<pre>Hi, today is a sunny day!</pre>
+<pre class="highlight"><code class="language-text" data-lang="text">Hi, today 
is a sunny day!</code></pre>
 </div>
 </div>
 </div>
@@ -139,40 +140,48 @@
 <h2 id="_metered_feature">Metered Feature</h2>
 <div class="sectionbody">
 <div class="paragraph">
-<p>MicroProfile metrics has a feature that can be used to find the rate of 
requests to a service.</p>
+<p>MicroProfile metrics has a feature that can be used to find the rate of
+requests to a service.</p>
 </div>
 <div class="paragraph">
-<p>To use this feature you need to annotate the JAX-RS resource method with 
@Metered.</p>
+<p>To use this feature you need to annotate the JAX-RS resource method with
+<code>@Metered</code>.</p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code class="language-java" data-lang="java">    
@Path("/weather")
-    @Produces(MediaType.APPLICATION_JSON)
-    @Consumes(MediaType.APPLICATION_JSON)
-    @ApplicationScoped
-    public class WeatherService {
+<pre class="highlight"><code class="language-java" 
data-lang="java">@Path("/weather")
+@Produces(MediaType.APPLICATION_JSON)
+@Consumes(MediaType.APPLICATION_JSON)
+@ApplicationScoped
+public class WeatherService {
 
-        @Path("/day/status")
-        @Metered(name = "dailyStatus", unit = MetricUnits.MINUTES, description 
= "Metrics to daily weather status method", absolute = true)
-        @GET
-        @Produces(MediaType.TEXT_PLAIN)
-        public String dayStatus() {
-            return "Hi, today is a sunny day!";
-        }
-    ...
-    }</code></pre>
+    @Path("/day/status")
+    @Metered(name = "dailyStatus",
+             unit = MetricUnits.MINUTES,
+             description = "Metrics to daily weather status method",
+             absolute = true)
+    @GET
+    @Produces(MediaType.TEXT_PLAIN)
+    public String dayStatus() {
+        return "Hi, today is a sunny day!";
+    }
+...
+}</code></pre>
 </div>
 </div>
 <div class="paragraph">
-<p>There are some configurations, as part of @Metered, that you need to 
know:</p>
+<p>There are some configurations, as part of <code>@Metered</code>, that you 
need to know:</p>
 </div>
 <div class="paragraph">
 <p><strong>String name</strong>
-Optional. Sets the name of the metric. If not explicitly given the name of the 
annotated object is used.</p>
+Optional. Sets the name of the metric. If not explicitly given the name of the
+annotated object is used.</p>
 </div>
 <div class="paragraph">
 <p><strong>boolean absolute</strong>
-If true, uses the given name as the absolute name of the metric. If false, 
prepends the package name and class name before the given name. Default value 
is false.</p>
+If true, uses the given name as the absolute name of the metric. If false,
+prepends the package name and class name before the given name. Default value
+is false.</p>
 </div>
 <div class="paragraph">
 <p><strong>String displayName</strong>
@@ -184,15 +193,17 @@ Optional. A description of the metric.</
 </div>
 <div class="paragraph">
 <p><strong>String[] tags</strong>
-Optional. Array of Strings in the &lt;key&gt;=&lt;value&gt; format to supply 
special tags to a metric.</p>
+Optional. Array of Strings in the &lt;key&gt;=&lt;value&gt; format to supply 
special tags
+to a metric.</p>
 </div>
 <div class="paragraph">
 <p><strong>boolean reusable</strong>
-Denotes if a metric with a certain name can be registered in more than one 
place. Does not apply to gauges.</p>
+Denotes if a metric with a certain name can be registered in more than one
+place. Does not apply to gauges.</p>
 </div>
 <div class="paragraph">
 <p><strong>String unit</strong>
-Unit of the metric. Default for @Metered is nanoseconds.</p>
+Unit of the metric. Default for <code>@Metered</code> is nanoseconds.</p>
 </div>
 </div>
 </div>
@@ -207,9 +218,9 @@ Unit of the metric. Default for @Metered
 <div class="sect1">
 <h2 id="_prometheus_format">Prometheus format:</h2>
 <div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
 <div class="content">
-<pre>GET 
http://localhost:8080/mp-metrics-metered/metrics/application/dailyStatus</pre>
+<pre class="highlight"><code class="language-bash" data-lang="bash">$ curl -X 
GET 
http://localhost:8080/mp-metrics-metered/metrics/application/dailyStatus</code></pre>
 </div>
 </div>
 </div>
@@ -217,9 +228,9 @@ Unit of the metric. Default for @Metered
 <div class="sect1">
 <h2 id="_response_2">Response:</h2>
 <div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
 <div class="content">
-<pre># TYPE application:daily_status_seconds_count meter
+<pre class="highlight"><code class="language-text" data-lang="text"># TYPE 
application:daily_status_seconds_count meter
 application:daily_status_seconds_count 1.2E-7
 # TYPE application:daily_status_rate_per_second meter
 application:daily_status_rate_per_second 0.0
@@ -228,7 +239,7 @@ application:daily_status_one_min_rate_pe
 # TYPE application:daily_status_five_min_rate_per_second meter
 application:daily_status_five_min_rate_per_second 3.5942838529305413E-20
 # TYPE application:daily_status_fifteen_min_rate_per_second meter
-application:daily_status_fifteen_min_rate_per_second 
3.4665766454142955E-21</pre>
+application:daily_status_fifteen_min_rate_per_second 
3.4665766454142955E-21</code></pre>
 </div>
 </div>
 </div>
@@ -237,11 +248,11 @@ application:daily_status_fifteen_min_rat
 <h2 id="_json_format">JSON Format:</h2>
 <div class="sectionbody">
 <div class="paragraph">
-<p>For json format add the header <em>Accept=application/json</em> to the 
request.</p>
+<p>For json format add the header <code>Accept: application/json</code> to the 
request.</p>
 </div>
-<div class="literalblock">
+<div class="listingblock">
 <div class="content">
-<pre>{
+<pre class="highlight"><code class="language-javascript" 
data-lang="javascript">{
        "dailyStatus": {
                "count": 2,
                "fifteenMinRate": 5.77762774235716e-14,
@@ -250,7 +261,7 @@ application:daily_status_fifteen_min_rat
                "oneMinRate": 2.229333774034164e-12,
                "unit": "minutes"
        }
-}</pre>
+}</code></pre>
 </div>
 </div>
 </div>
@@ -259,7 +270,7 @@ application:daily_status_fifteen_min_rat
 <h2 id="_metric_metadata">Metric metadata</h2>
 <div class="sectionbody">
 <div class="paragraph">
-<p>A metric will have a metadata so you can know more information about it, 
like displayName, description, tags  etc.</p>
+<p>A metric will have a metadata so you can know more information about it, 
like <code>displayName</code>, <code>description</code>, <code>tags</code>, 
etc.</p>
 </div>
 <div class="paragraph">
 <p>Check the metric metadata doing a <em>OPTIONS</em> request:</p>
@@ -269,9 +280,9 @@ application:daily_status_fifteen_min_rat
 <div class="sect1">
 <h2 id="_request">Request</h2>
 <div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
 <div class="content">
-<pre>OPTIONS 
http://localhost:8080/mp-metrics-metered/metrics/application/dailyStatus</pre>
+<pre class="highlight"><code class="language-bash" data-lang="bash">$ curl -X 
OPTIONS 
http://localhost:8080/mp-metrics-metered/metrics/application/dailyStatus</code></pre>
 </div>
 </div>
 </div>
@@ -279,9 +290,9 @@ application:daily_status_fifteen_min_rat
 <div class="sect1">
 <h2 id="_response_3">Response:</h2>
 <div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
 <div class="content">
-<pre>{
+<pre class="highlight"><code class="language-javascript" 
data-lang="javascript">{
        "dailyStatus": {
                "description": "Metrics to daily weather status method",
                "displayName": "",
@@ -292,7 +303,7 @@ application:daily_status_fifteen_min_rat
                "typeRaw": "METERED",
                "unit": "minutes"
        }
-}</pre>
+}</code></pre>
 </div>
 </div>
 </div>
@@ -300,9 +311,9 @@ application:daily_status_fifteen_min_rat
 <div class="sect1">
 <h2 id="_test_the_application">Test the application:</h2>
 <div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
 <div class="content">
-<pre>mvn test</pre>
+<pre class="highlight"><code class="language-bash" data-lang="bash">$ mvn 
test</code></pre>
 </div>
 </div>
 </div>

Modified: tomee/site/trunk/content/tomee-8.0/examples/mp-metrics-timed.html
URL: 
http://svn.apache.org/viewvc/tomee/site/trunk/content/tomee-8.0/examples/mp-metrics-timed.html?rev=1866975&r1=1866974&r2=1866975&view=diff
==============================================================================
--- tomee/site/trunk/content/tomee-8.0/examples/mp-metrics-timed.html (original)
+++ tomee/site/trunk/content/tomee-8.0/examples/mp-metrics-timed.html Sun Sep 
15 22:59:06 2019
@@ -105,9 +105,9 @@
 <div class="sect1">
 <h2 id="_run_the_application">Run the application:</h2>
 <div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
 <div class="content">
-<pre>mvn clean install tomee:run</pre>
+<pre class="highlight"><code class="language-bash" data-lang="bash">$ mvn 
clean install tomee:run</code></pre>
 </div>
 </div>
 <div class="paragraph">
@@ -119,9 +119,9 @@ weather status for the day.</p>
 <div class="sect1">
 <h2 id="_for_the_day_status_call">For the day status call:</h2>
 <div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
 <div class="content">
-<pre>GET http://localhost:8080/mp-metrics-timed/weather/day/status</pre>
+<pre class="highlight"><code class="language-bash" data-lang="bash">$ curl -X 
GET http://localhost:8080/mp-metrics-timed/weather/day/status</code></pre>
 </div>
 </div>
 </div>
@@ -129,9 +129,9 @@ weather status for the day.</p>
 <div class="sect1">
 <h2 id="_response">Response:</h2>
 <div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
 <div class="content">
-<pre>Hi, today is a sunny day!</pre>
+<pre class="highlight"><code class="language-text" data-lang="text">Hi, today 
is a sunny day!</code></pre>
 </div>
 </div>
 </div>
@@ -144,11 +144,11 @@ weather status for the day.</p>
 </div>
 <div class="paragraph">
 <p>To use this feature you need to annotate the JAX-RS resource method with
-@Timed.</p>
+<code>@Timed</code>.</p>
 </div>
-<div class="literalblock">
+<div class="listingblock">
 <div class="content">
-<pre>@Path("/weather")
+<pre class="highlight"><code class="language-java" 
data-lang="java">@Path("/weather")
 @ApplicationScoped
 public class WeatherService {
 
@@ -162,11 +162,11 @@ public class WeatherService {
         return "Hi, today is a sunny day!";
     }
 ...
-}</pre>
+}</code></pre>
 </div>
 </div>
 <div class="paragraph">
-<p>There are some configurations, as part of @Timed, that you need to know:</p>
+<p>There are some configurations, as part of <code>@Timed</code>, that you 
need to know:</p>
 </div>
 <div class="paragraph">
 <p><strong>String name</strong> Optional. Sets the name of the metric. If not 
explicitly
@@ -189,7 +189,7 @@ metadata.</p>
 special tags to a metric.</p>
 </div>
 <div class="paragraph">
-<p><strong>String unit</strong> Unit of the metric. Default for @Timed is 
nanoseconds.</p>
+<p><strong>String unit</strong> Unit of the metric. Default for 
<code>@Timed</code> is nanoseconds.</p>
 </div>
 </div>
 </div>
@@ -201,17 +201,17 @@ special tags to a metric.</p>
 </div>
 <div class="sect2">
 <h3 id="_prometheus_format">Prometheus format:</h3>
-<div class="literalblock">
+<div class="listingblock">
 <div class="content">
-<pre>GET 
http://localhost:8080/mp-metrics-timed/metrics/application/weather_day_status</pre>
+<pre class="highlight"><code class="language-bash" data-lang="bash">$curl -X 
GET 
http://localhost:8080/mp-metrics-timed/metrics/application/weather_day_status</code></pre>
 </div>
 </div>
 </div>
 <div class="sect2">
 <h3 id="_response_2">Response:</h3>
-<div class="literalblock">
+<div class="listingblock">
 <div class="content">
-<pre># TYPE application:weather_day_status_seconds summary timer
+<pre class="highlight"><code class="language-text" data-lang="text"># TYPE 
application:weather_day_status_seconds summary timer
 # TYPE application:weather_day_status_seconds_count timer
 application:weather_day_status_seconds_count 1.0
 # TYPE application:weather_day_status_rate_per_second timer
@@ -241,18 +241,18 @@ application:weather_day_status_seconds{q
 # TYPE application:weather_day_status_seconds timer
 application:weather_day_status_seconds{quantile="0.99"} 48352.0
 # TYPE application:weather_day_status_seconds timer
-application:weather_day_status_seconds{quantile="0.999"} 48352.0</pre>
+application:weather_day_status_seconds{quantile="0.999"} 48352.0</code></pre>
 </div>
 </div>
 </div>
 <div class="sect2">
 <h3 id="_json_format">JSON Format:</h3>
 <div class="paragraph">
-<p>For json format add the header <em>Accept=application/json</em> to the 
request.</p>
+<p>For json format add the header <code>Accept: application/json</code> to the 
request.</p>
 </div>
-<div class="literalblock">
+<div class="listingblock">
 <div class="content">
-<pre>{
+<pre class="highlight"><code class="language-javascript" 
data-lang="javascript">{
     "weather_day_status": {
         "count": 1,
         "fifteenMinRate": 0,
@@ -270,7 +270,7 @@ application:weather_day_status_seconds{q
         "p999": 48352,
         "stddev": 0
     }
-}</pre>
+}</code></pre>
 </div>
 </div>
 </div>
@@ -281,24 +281,24 @@ application:weather_day_status_seconds{q
 <div class="sectionbody">
 <div class="paragraph">
 <p>A metric will have metadata so you can know more about it, like
-displayName, description, tags e etc.</p>
+<code>displayName</code>, <code>description</code>, <code>tags</code>, etc.</p>
 </div>
 <div class="paragraph">
 <p>Check the metric metadata doing a <em>OPTIONS</em> request:</p>
 </div>
 <div class="sect2">
 <h3 id="_request">Request</h3>
-<div class="literalblock">
+<div class="listingblock">
 <div class="content">
-<pre>OPTIONS 
http://localhost:8080/mp-metrics-timed/metrics/application/weather_day_status</pre>
+<pre class="highlight"><code class="language-bash" data-lang="bash">$ curl -X 
OPTIONS 
http://localhost:8080/mp-metrics-timed/metrics/application/weather_day_status</code></pre>
 </div>
 </div>
 </div>
 <div class="sect2">
 <h3 id="_response_3">Response:</h3>
-<div class="literalblock">
+<div class="listingblock">
 <div class="content">
-<pre>{
+<pre class="highlight"><code class="language-javascript" 
data-lang="javascript">{
     "weather_day_status": {
         "description": "This metric shows the weather status of the day.",
         "displayName": "Weather Day Status",
@@ -309,11 +309,11 @@ displayName, description, tags e etc.</p
         "typeRaw": "TIMER",
         "unit": "nanoseconds"
     }
-}</pre>
+}</code></pre>
 </div>
 </div>
 <div class="paragraph">
-<p>You can also try it out using the WeatherServiceTest.java available in
+<p>You can also try it out using the <code>WeatherServiceTest.java</code> 
available in
 the project.</p>
 </div>
 </div>

Modified: tomee/site/trunk/content/tomee-8.0/pt/examples/index.html
URL: 
http://svn.apache.org/viewvc/tomee/site/trunk/content/tomee-8.0/pt/examples/index.html?rev=1866975&r1=1866974&r2=1866975&view=diff
==============================================================================
--- tomee/site/trunk/content/tomee-8.0/pt/examples/index.html (original)
+++ tomee/site/trunk/content/tomee-8.0/pt/examples/index.html Sun Sep 15 
22:59:06 2019
@@ -103,6 +103,15 @@
             </ul>
           </div>
           <div class="col-md-4">
+            <div class="group-title">MicroProfile</div>
+            <ul class="group">
+              <li class="group-item"><span class="group-item-i" ><i class="fa 
fa-angle-right"></i></span><a href="mp-config-example.html">MicroProfile 
Config</a></li>
+              <li class="group-item"><span class="group-item-i" ><i class="fa 
fa-angle-right"></i></span><a href="mp-custom-healthcheck.html">MicroProfile 
Custom Health Check</a></li>
+              <li class="group-item"><span class="group-item-i" ><i class="fa 
fa-angle-right"></i></span><a 
href="mp-faulttolerance-fallback.html">MicroProfile Fault Tolerance - 
Fallback</a></li>
+              <li class="group-item"><span class="group-item-i" ><i class="fa 
fa-angle-right"></i></span><a href="mp-faulttolerance-retry.html">MicroProfile 
Fault Tolerance - Retry Policy</a></li>
+            </ul>
+          </div>
+          <div class="col-md-4">
             <div class="group-title">Testing Techniques</div>
             <ul class="group">
               <li class="group-item"><span class="group-item-i" ><i class="fa 
fa-angle-right"></i></span><a 
href="applicationcomposer-jaxws-cdi.html">Application Composer com JAX-WS and 
CDI</a></li>
@@ -110,6 +119,8 @@
               <li class="group-item"><span class="group-item-i" ><i class="fa 
fa-angle-right"></i></span><a href="alternate-descriptors.html">Descritores 
alternativos</a></li>
             </ul>
           </div>
+        </div>
+        <div class="row">
           <div class="col-md-4">
             <div class="group-title">Security</div>
             <ul class="group">
@@ -118,8 +129,6 @@
               <li class="group-item"><span class="group-item-i" ><i class="fa 
fa-angle-right"></i></span><a href="simple-remote-tomcatusers.html">Usuários 
remotos do Tomcat simples</a></li>
             </ul>
           </div>
-        </div>
-        <div class="row">
           <div class="col-md-4">
             <div class="group-title">JPA</div>
             <ul class="group">
@@ -136,13 +145,6 @@
               <li class="group-item"><span class="group-item-i" ><i class="fa 
fa-angle-right"></i></span><a href="async-methods.html">Métodos 
Assíncronos</a></li>
             </ul>
           </div>
-          <div class="col-md-4">
-            <div class="group-title">MicroProfile</div>
-            <ul class="group">
-              <li class="group-item"><span class="group-item-i" ><i class="fa 
fa-angle-right"></i></span><a href="mp-config-example.html">MicroProfile 
Config</a></li>
-              <li class="group-item"><span class="group-item-i" ><i class="fa 
fa-angle-right"></i></span><a 
href="mp-faulttolerance-fallback.html">MicroProfile Fault Tolerance - 
Fallback</a></li>
-            </ul>
-          </div>
         </div>
         <div class="row">
           <div class="col-md-4">

Added: tomee/site/trunk/content/tomee-8.0/pt/examples/mp-custom-healthcheck.html
URL: 
http://svn.apache.org/viewvc/tomee/site/trunk/content/tomee-8.0/pt/examples/mp-custom-healthcheck.html?rev=1866975&view=auto
==============================================================================
--- tomee/site/trunk/content/tomee-8.0/pt/examples/mp-custom-healthcheck.html 
(added)
+++ tomee/site/trunk/content/tomee-8.0/pt/examples/mp-custom-healthcheck.html 
Sun Sep 15 22:59:06 2019
@@ -0,0 +1,349 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+       <meta charset="UTF-8">
+       <meta http-equiv="X-UA-Compatible" content="IE=edge">
+       <meta name="viewport" content="width=device-width, initial-scale=1">
+       <title>Apache TomEE</title>
+       <meta name="description"
+                 content="Apache TomEE is a lightweight, yet powerful, JavaEE 
Application server with feature rich tooling." />
+       <meta name="keywords" 
content="tomee,asf,apache,javaee,jee,shade,embedded,test,junit,applicationcomposer,maven,arquillian"
 />
+       <meta name="author" content="Luka Cvetinovic for Codrops" />
+       <link rel="icon" href="../../../favicon.ico">
+       <link rel="icon"  type="image/png" href="../../../favicon.png">
+       <meta name="msapplication-TileColor" content="#80287a">
+       <meta name="theme-color" content="#80287a">
+       <link rel="stylesheet" type="text/css" 
href="../../../css/normalize.css">
+       <link rel="stylesheet" type="text/css" 
href="../../../css/bootstrap.css">
+       <link rel="stylesheet" type="text/css" href="../../../css/owl.css">
+       <link rel="stylesheet" type="text/css" href="../../../css/animate.css">
+       <link rel="stylesheet" type="text/css" 
href="../../../fonts/font-awesome-4.1.0/css/font-awesome.min.css">
+       <link rel="stylesheet" type="text/css" 
href="../../../fonts/eleganticons/et-icons.css">
+       <link rel="stylesheet" type="text/css" href="../../../css/jqtree.css">
+       <link rel="stylesheet" type="text/css" href="../../../css/idea.css">
+       <link rel="stylesheet" type="text/css" href="../../../css/cardio.css">
+
+       <script type="text/javascript">
+
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-2717626-1']);
+      _gaq.push(['_setDomainName', 'apache.org']);
+      _gaq.push(['_trackPageview']);
+
+      (function() {
+        var ga = document.createElement('script'); ga.type = 
'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 
'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; 
s.parentNode.insertBefore(ga, s);
+      })();
+
+    </script>
+</head>
+
+<body>
+    <div class="preloader">
+               <img src="../../../img/loader.gif" alt="Preloader image">
+       </div>
+           <nav class="navbar">
+               <div class="container">
+                 <div class="row">          <div class="col-md-12">
+
+                       <!-- Brand and toggle get grouped for better mobile 
display -->
+                       <div class="navbar-header">
+                               <button type="button" class="navbar-toggle 
collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
+                                       <span class="sr-only">Toggle 
navigation</span>
+                                       <span class="icon-bar"></span>
+                                       <span class="icon-bar"></span>
+                                       <span class="icon-bar"></span>
+                               </button>
+                               <a class="navbar-brand" href="/">
+                                   <span>
+
+                                   
+                        <img src="../../../img/logo-active.png">
+                    
+
+                    </span>
+                                   Apache TomEE
+                </a>
+                       </div>
+                       <!-- Collect the nav links, forms, and other content 
for toggling -->
+                       <div class="collapse navbar-collapse" 
id="bs-example-navbar-collapse-1">
+                               <ul class="nav navbar-nav navbar-right 
main-nav">
+                                       <li><a 
href="../../../docs.html">Documentation</a></li>
+                                       <li><a 
href="../../../community/index.html">Community</a></li>
+                                       <li><a 
href="../../../security/security.html">Security</a></li>
+                                       <li><a 
href="../../../download-ng.html">Downloads</a></li>
+                               </ul>
+                       </div>
+                       <!-- /.navbar-collapse -->
+                  </div></div>
+               </div>
+               <!-- /.container-fluid -->
+       </nav>
+
+
+    <div id="main-block" class="container main-block">
+        <div class="row title">
+          <div class="col-md-12">
+            <div class='page-header'>
+              
+              <h1>MicroProfile Custom Health Check</h1>
+            </div>
+          </div>
+        </div>
+        <div class="row">
+            
+            <div class="col-md-12">
+                <div class="paragraph">
+<p>Este é um exemplo de como usar MicroProfile Custom Health Check em 
TomEE.</p>
+</div>
+<h4 id="_health_feature" class="discrete">Health Feature</h4>
+<div class="paragraph">
+<p>Os links de status (Health checks) são usados para verificar os estados 
dos serviços e recursos que uma aplicação depende ou mesmo expor seus
+status. Por exemplo, em um ambiente de cluster, onde um nó não íntegro 
precisa ser descartado (terminated, shutdown) e eventualmente
+substituído por outra instância íntegra.</p>
+</div>
+<div class="paragraph">
+<p>Por padrão, <a 
href="https://github.com/eclipse/microprofile-health";>microprofile-health-api</a>
 proporciona a saida básica de um nó simplesmente
+acessando o endpoint <a href="http://host:port/health"; 
class="bare">http://host:port/health</a>.</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-json" 
data-lang="json">{"checks":[],"outcome":"UP","status":"UP"}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Para fornecer uma saída personalizada, digamos que temos uma API do tempo, 
e se o serviço se tornar indisponível,
+devemos relatar o serviço como inativo (DOWN).</p>
+</div>
+<div class="paragraph">
+<p>Para iniciar com uma saída personalizada, é necessário implementar a 
interface <a 
href="https://github.com/eclipse/microprofile-health/blob/master/api/src/main/java/org/eclipse/microprofile/health/HealthCheck.java";>HealthCheck</a>,
+transforme a classe em um bean gerenciado anotando-a com 
<code>@ApplicationScoped</code> e <code>@Health</code> para ativar a 
verificação personalizada.
+Veja mais detalhes aqui <a 
href="https://github.com/apache/geronimo-health/blob/master/geronimo-health/src/main/java/org/apache/geronimo/microprofile/impl/health/cdi/GeronimoHealthExtension.java";>GeronimoHealthExtension.java</a></p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">@Health
+@ApplicationScoped
+public class WeatherServiceHealthCheck implements HealthCheck {
+
+    @Inject WeatherGateway weatherGateway;
+
+    @Override
+    public HealthCheckResponse call() {
+        HealthCheckResponseBuilder responseBuilder = 
HealthCheckResponse.named("OpenWeatherMap");
+        try {
+            WeatherApiStatus status = weatherGateway.getApiStatus();
+            return responseBuilder.withData("weatherServiceApiUrl", 
status.getUrl())
+                    .withData("weatherServiceApiVersion", status.getVersion())
+                    .withData("weatherServiceMessage", status.getMessage())
+                    .up().build();
+        } catch (WeatherException e) {
+            return responseBuilder.withData("weatherServiceErrorMessage", 
e.getMessage()).down().build();
+        }
+    }
+}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>No exemplo acima, o link de status é <a 
href="https://openweathermap.org/appid";>OpenWeatherMap</a> (<em>somente 
ilustrativo</em>) que fornece uma
+plano de assinatura para acessar seus serviços e, se o limite de chamadas for 
excedido, a API ficará indisponível até sua
+renovação.</p>
+</div>
+<h3 id="_exemplos" class="discrete">Exemplos</h3>
+<div class="listingblock">
+<div class="title">Executando o aplicativo</div>
+<div class="content">
+<pre>    mvn clean install tomee:run</pre>
+</div>
+</div>
+<h4 id="_exemplo_1" class="discrete">Exemplo 1</h4>
+<div class="paragraph">
+<p>Quando acessado o endpoint /health, OpenWeatherMap nos diz que nossas 
chamadas restantes estão acabando e que devemos tomar
+uma ação antes que fique indisponível.</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>curl http://localhost:8080/mp-custom-healthcheck/health</pre>
+</div>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-json" data-lang="json">{
+   "checks":[
+      {
+         "data":{
+            "weatherServiceApiVersion":"2.5",
+            "weatherServiceMessage":"Your account will become unavailable soon 
due to limitation of your
+                                    subscription type. Remaining API calls are 
1",
+            "weatherServiceApiUrl":"http://api.openweathermap.org/data/2.5/";
+         },
+         "name":"OpenWeatherMap",
+         "state":"UP"
+      }
+   ],
+   "outcome":"UP",
+   "status":"UP"
+}</code></pre>
+</div>
+</div>
+<h4 id="_exemplo_2" class="discrete">Exemplo 2</h4>
+<div class="paragraph">
+<p>A API do tempo ainda está funcionando bem.</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>curl http://localhost:8080/mp-custom-healthcheck/weather/day/status</pre>
+</div>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-text" data-lang="text">Hi, today 
is a sunny day!</code></pre>
+</div>
+</div>
+<h4 id="_exemplo_3" class="discrete">Exemplo 3</h4>
+<div class="paragraph">
+<p>Quando acessamos novamente o endpoint /health, OpenWeatherMap nos diz que 
nossa conta está temporariamente bloqueada e esse
+serviço é relatado como inativo (DOWN).</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>curl http://localhost:8080/mp-custom-healthcheck/health</pre>
+</div>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-json" data-lang="json">{
+   "checks":[
+      {
+         "data":{
+            "weatherServiceErrorMessage":"Your account is temporary blocked 
due to exceeding of
+            requests limitation of your subscription type. Please choose the 
proper subscription
+            http://openweathermap.org/price";
+         },
+         "name":"weatherservice",
+         "state":"DOWN"
+      }
+   ],
+   "outcome":"DOWN",
+   "status":"DOWN"
+}</code></pre>
+</div>
+</div>
+<h4 id="_exemplo_4" class="discrete">Exemplo 4</h4>
+<div class="paragraph">
+<p>A API do tempo parou.</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>curl http://localhost:8080/mp-custom-healthcheck/weather/day/status</pre>
+</div>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-text" data-lang="text">Weather 
Service is unavailable at moment, retry later.</code></pre>
+</div>
+</div>
+<h5 id="_executando_os_testes" class="discrete">Executando os testes</h5>
+<div class="paragraph">
+<p>Você pode também testar usando <a 
href="src/test/java/org/superbiz/rest/WeatherServiceTest.java">WeatherServiceTest.java</a>
 disponível no projeto.</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>mvn clean test</pre>
+</div>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>[INFO] Results:
+[INFO]
+[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped:</pre>
+</div>
+</div>
+            </div>
+            
+        </div>
+    </div>
+<footer>
+               <div class="container">
+                       <div class="row">
+                               <div class="col-sm-6 text-center-mobile">
+                                       <h3 class="white">Be simple.  Be 
certified. Be Tomcat.</h3>
+                                       <h5 class="light regular 
light-white">"A good application in a good server"</h5>
+                                       <ul class="social-footer">
+                                               <li><a 
href="https://www.facebook.com/ApacheTomEE/";><i class="fa 
fa-facebook"></i></a></li>
+                                               <li><a 
href="https://twitter.com/apachetomee";><i class="fa fa-twitter"></i></a></li>
+                                               <li><a 
href="https://plus.google.com/communities/105208241852045684449";><i class="fa 
fa-google-plus"></i></a></li>
+                                       </ul>
+                               </div>
+                               <div class="col-sm-6 text-center-mobile">
+                                       <div class="row opening-hours">
+                                               <div class="col-sm-3 
text-center-mobile">
+                                                       <h5><a 
href="../../../latest/docs/documentation.html" 
class="white">Documentation</a></h5>
+                                                       <ul 
class="list-unstyled">
+                                                               <li><a 
href="../../../latest/docs/admin/configuration/index.html" class="regular 
light-white">How to configure</a></li>
+                                                               <li><a 
href="../../../latest/docs/admin/file-layout.html" class="regular 
light-white">Dir. Structure</a></li>
+                                                               <li><a 
href="../../../latest/docs/developer/testing/index.html" class="regular 
light-white">Testing</a></li>
+                                                               <li><a 
href="../../../latest/docs/admin/cluster/index.html" class="regular 
light-white">Clustering</a></li>
+                                                       </ul>
+                                               </div>
+                                               <div class="col-sm-3 
text-center-mobile">
+                                                       <h5><a 
href="../../../latest/examples/" class="white">Examples</a></h5>
+                                                       <ul 
class="list-unstyled">
+                                                               <li><a 
href="../../../latest/examples/simple-cdi-interceptor.html" class="regular 
light-white">CDI Interceptor</a></li>
+                                                               <li><a 
href="../../../latest/examples/rest-cdi.html" class="regular light-white">REST 
with CDI</a></li>
+                                                               <li><a 
href="../../../latest/examples/ejb-examples.html" class="regular 
light-white">EJB</a></li>
+                                                               <li><a 
href="../../../latest/examples/jsf-managedBean-and-ejb.html" class="regular 
light-white">JSF</a></li>
+                                                       </ul>
+                                               </div>
+                                               <div class="col-sm-3 
text-center-mobile">
+                                                       <h5><a 
href="../../../community/index.html" class="white">Community</a></h5>
+                                                       <ul 
class="list-unstyled">
+                                                               <li><a 
href="../../../community/contributors.html" class="regular 
light-white">Contributors</a></li>
+                                                               <li><a 
href="../../../community/social.html" class="regular 
light-white">Social</a></li>
+                                                               <li><a 
href="../../../community/sources.html" class="regular 
light-white">Sources</a></li>
+                                                       </ul>
+                                               </div>
+                                               <div class="col-sm-3 
text-center-mobile">
+                                                       <h5><a 
href="../../../security/index.html" class="white">Security</a></h5>
+                                                       <ul 
class="list-unstyled">
+                                                               <li><a 
href="http://apache.org/security"; target="_blank" class="regular 
light-white">Apache Security</a></li>
+                                                               <li><a 
href="http://apache.org/security/projects.html"; target="_blank" class="regular 
light-white">Security Projects</a></li>
+                                                               <li><a 
href="http://cve.mitre.org"; target="_blank" class="regular 
light-white">CVE</a></li>
+                                                       </ul>
+                                               </div>
+                                       </div>
+                               </div>
+                       </div>
+                       <div class="row bottom-footer text-center-mobile">
+                               <div class="col-sm-12 light-white">
+                                       <p>Copyright &copy; 1999-2016 The 
Apache Software Foundation, Licensed under the Apache License, Version 2.0. 
Apache TomEE, TomEE, Apache, the Apache feather logo, and the Apache TomEE 
project logo are trademarks of The Apache Software Foundation. All other marks 
mentioned may be trademarks or registered trademarks of their respective 
owners.</p>
+                               </div>
+                       </div>
+               </div>
+       </footer>
+       <!-- Holder for mobile navigation -->
+       <div class="mobile-nav">
+        <ul>
+          <li><a hef="../../../latest/docs/admin/index.html">Administrators</a>
+          <li><a hef="../../../latest/docs/developer/index.html">Developers</a>
+          <li><a hef="../../../latest/docs/advanced/index.html">Advanced</a>
+          <li><a hef="../../../community/index.html">Community</a>
+        </ul>
+               <a href="#" class="close-link"><i class="arrow_up"></i></a>
+       </div>
+       <!-- Scripts -->
+       <script src="../../../js/jquery-1.11.1.min.js"></script>
+       <script src="../../../js/owl.carousel.min.js"></script>
+       <script src="../../../js/bootstrap.min.js"></script>
+       <script src="../../../js/wow.min.js"></script>
+       <script src="../../../js/typewriter.js"></script>
+       <script src="../../../js/jquery.onepagenav.js"></script>
+       <script src="../../../js/tree.jquery.js"></script>
+       <script src="../../../js/highlight.pack.js"></script>
+    <script src="../../../js/main.js"></script>
+               </body>
+
+</html>
+

Added: 
tomee/site/trunk/content/tomee-8.0/pt/examples/mp-faulttolerance-retry.html
URL: 
http://svn.apache.org/viewvc/tomee/site/trunk/content/tomee-8.0/pt/examples/mp-faulttolerance-retry.html?rev=1866975&view=auto
==============================================================================
--- tomee/site/trunk/content/tomee-8.0/pt/examples/mp-faulttolerance-retry.html 
(added)
+++ tomee/site/trunk/content/tomee-8.0/pt/examples/mp-faulttolerance-retry.html 
Sun Sep 15 22:59:06 2019
@@ -0,0 +1,508 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+       <meta charset="UTF-8">
+       <meta http-equiv="X-UA-Compatible" content="IE=edge">
+       <meta name="viewport" content="width=device-width, initial-scale=1">
+       <title>Apache TomEE</title>
+       <meta name="description"
+                 content="Apache TomEE is a lightweight, yet powerful, JavaEE 
Application server with feature rich tooling." />
+       <meta name="keywords" 
content="tomee,asf,apache,javaee,jee,shade,embedded,test,junit,applicationcomposer,maven,arquillian"
 />
+       <meta name="author" content="Luka Cvetinovic for Codrops" />
+       <link rel="icon" href="../../../favicon.ico">
+       <link rel="icon"  type="image/png" href="../../../favicon.png">
+       <meta name="msapplication-TileColor" content="#80287a">
+       <meta name="theme-color" content="#80287a">
+       <link rel="stylesheet" type="text/css" 
href="../../../css/normalize.css">
+       <link rel="stylesheet" type="text/css" 
href="../../../css/bootstrap.css">
+       <link rel="stylesheet" type="text/css" href="../../../css/owl.css">
+       <link rel="stylesheet" type="text/css" href="../../../css/animate.css">
+       <link rel="stylesheet" type="text/css" 
href="../../../fonts/font-awesome-4.1.0/css/font-awesome.min.css">
+       <link rel="stylesheet" type="text/css" 
href="../../../fonts/eleganticons/et-icons.css">
+       <link rel="stylesheet" type="text/css" href="../../../css/jqtree.css">
+       <link rel="stylesheet" type="text/css" href="../../../css/idea.css">
+       <link rel="stylesheet" type="text/css" href="../../../css/cardio.css">
+
+       <script type="text/javascript">
+
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-2717626-1']);
+      _gaq.push(['_setDomainName', 'apache.org']);
+      _gaq.push(['_trackPageview']);
+
+      (function() {
+        var ga = document.createElement('script'); ga.type = 
'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 
'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; 
s.parentNode.insertBefore(ga, s);
+      })();
+
+    </script>
+</head>
+
+<body>
+    <div class="preloader">
+               <img src="../../../img/loader.gif" alt="Preloader image">
+       </div>
+           <nav class="navbar">
+               <div class="container">
+                 <div class="row">          <div class="col-md-12">
+
+                       <!-- Brand and toggle get grouped for better mobile 
display -->
+                       <div class="navbar-header">
+                               <button type="button" class="navbar-toggle 
collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
+                                       <span class="sr-only">Toggle 
navigation</span>
+                                       <span class="icon-bar"></span>
+                                       <span class="icon-bar"></span>
+                                       <span class="icon-bar"></span>
+                               </button>
+                               <a class="navbar-brand" href="/">
+                                   <span>
+
+                                   
+                        <img src="../../../img/logo-active.png">
+                    
+
+                    </span>
+                                   Apache TomEE
+                </a>
+                       </div>
+                       <!-- Collect the nav links, forms, and other content 
for toggling -->
+                       <div class="collapse navbar-collapse" 
id="bs-example-navbar-collapse-1">
+                               <ul class="nav navbar-nav navbar-right 
main-nav">
+                                       <li><a 
href="../../../docs.html">Documentation</a></li>
+                                       <li><a 
href="../../../community/index.html">Community</a></li>
+                                       <li><a 
href="../../../security/security.html">Security</a></li>
+                                       <li><a 
href="../../../download-ng.html">Downloads</a></li>
+                               </ul>
+                       </div>
+                       <!-- /.navbar-collapse -->
+                  </div></div>
+               </div>
+               <!-- /.container-fluid -->
+       </nav>
+
+
+    <div id="main-block" class="container main-block">
+        <div class="row title">
+          <div class="col-md-12">
+            <div class='page-header'>
+              
+              <h1>MicroProfile Fault Tolerance - Retry Policy</h1>
+            </div>
+          </div>
+        </div>
+        <div class="row">
+            
+            <div class="col-md-12">
+                <div id="preamble">
+<div class="sectionbody">
+<div class="paragraph">
+<p>Este é um exemplo de como usar
+Microprofile @Retry em TomEE.</p>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_retry_feature">Retry Feature</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>Microprofile Fault Tolerance tem um recurso chamado Retry que pode ser usado
+para recuperar uma operação de falha, chamando a mesma operação novamente
+até atingir seus critérios de parada.</p>
+</div>
+<div class="paragraph">
+<p>A Retry policy permite configurar :</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><strong>maxRetries</strong>: o máximo de tentativas</p>
+</li>
+<li>
+<p><strong>delay</strong>: atrasos entre cada tentativa</p>
+</li>
+<li>
+<p><strong>delayUnit</strong>: a unidade de atraso</p>
+</li>
+<li>
+<p><strong>maxDuration</strong>: duração máxima para executar a nova 
tentativa</p>
+</li>
+<li>
+<p><strong>durationUnit</strong>: unidade de duração</p>
+</li>
+<li>
+<p><strong>jitter:</strong> a variação aleatória dos atrasos de uma nova 
tentativa</p>
+</li>
+<li>
+<p><strong>jitterDelayUnit:</strong> a unidade de instabilidade</p>
+</li>
+<li>
+<p><strong>retryOn:</strong> especifique as falhas para tentar novamente</p>
+</li>
+<li>
+<p><strong>abortOn:</strong> especifique as falhas para abortar</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Para usar esse recurso, você pode anotar uma classe e/ou um método com a 
anotação @Retry. Verifique em
+<a 
href="http://download.eclipse.org/microprofile/microprofile-fault-tolerance-1.1/microprofile-fault-tolerance-spec.html";>specification</a>
+para mais detalhes.</p>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_exemplos">Exemplos</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="_execute_o_aplicativo">Execute o aplicativo</h3>
+<div class="literalblock">
+<div class="content">
+<pre>mvn clean install tomee:run</pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_exemplo_1">Exemplo 1</h3>
+<div class="paragraph">
+<p>O método statusOfDay falhará 3 (três) vezes, a cada vez, lançando uma
+<code>WeatherGatewayTimeoutException</code> e como a anotação @Retry está
+configurada para <code>retryOn</code> em caso de falha, a biblioteca FailSafe 
pegará
+o valor <code>maxRetry</code> e tentará a mesma operação até atingir o 
número máximo de tentativas, que é 3 (valor padrão).</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" 
data-lang="java">@RequestScoped
+public class WeatherGateway{
+   ...
+   @Retry(maxRetry=3, retryOn = WeatherGatewayTimeoutException.class)
+   public String statusOfDay(){
+       if(counterStatusOfDay.addAndGet(1) &lt;= DEFAULT_MAX_RETRY){
+           LOGGER.warning(String.format(FORECAST_TIMEOUT_MESSAGE, 
DEFAULT_MAX_RETRY, counterStatusOfDay.get()));
+           throw new WeatherGatewayTimeoutException();
+       }
+       return "Today is a sunny day!";
+   }
+   ...
+ }</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Chamada de status do dia</p>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>GET http://localhost:8080/mp-faulttolerance-retry/weather/day/status</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Server log</p>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>WARNING - Timeout when accessing AccuWeather Forecast Service. Max of 
Attempts: (3), Attempts: (1)
+WARNING - Timeout when accessing AccuWeather Forecast Service. Max of 
Attempts: (3), Attempts: (2)
+WARNING - Timeout when accessing AccuWeather Forecast Service. Max of 
Attempts: (3), Attempts: (3)</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Response</p>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>Today is a sunny day!</pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_exemplo_2">Exemplo 2</h3>
+<div class="paragraph">
+<p>O método weekStatus falhará duas vezes, a cada vez, lançando uma
+<code>WeatherGatewayTimeoutException</code> porque <code>retryOn</code> está 
configurado e
+em vez de retornar uma resposta ao chamador, a lógica afirma que na terceira 
tentativa uma
+<code>WeatherGatewayBusyServiceException</code> será lançada. Como a 
anotação <code>@Retry</code> está configurada para
+ <code>abortOn</code> no caso de <code>WeatherGatewayTimeoutException</code> 
ocorrer, a tentativa restante não será
+executada e o chamador deve lidar com a exceção.</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" 
data-lang="java">@Retry(maxRetries = 3, retryOn = 
WeatherGatewayTimeoutException.class, abortOn = 
WeatherGatewayBusyServiceException.class)
+public String statusOfWeek(){
+    if(counterStatusOfWeek.addAndGet(1) &lt;= DEFAULT_MAX_RETRY){
+        LOGGER.warning(String.format(FORECAST_TIMEOUT_MESSAGE_ATTEMPTS, 
DEFAULT_MAX_RETRY, counterStatusOfWeek.get()));
+        throw new WeatherGatewayTimeoutException();
+    }
+    LOGGER.log(Level.SEVERE, String.format(FORECAST_BUSY_MESSAGE, 
counterStatusOfWeek.get()));
+    throw new WeatherGatewayBusyServiceException();
+}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Chamada de status da semana</p>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>GET 
http://localhost:8080/mp-faulttolerance-retry/weather/week/status</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Server log</p>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>WARNING - Timeout when accessing AccuWeather Forecast Service. Max of 
Attempts: (3), Attempts: (1)
+WARNING - Timeout when accessing AccuWeather Forecast Service. Max of 
Attempts: (3), Attempts: (2)
+WARNING - Timeout when accessing AccuWeather Forecast Service. Max of 
Attempts: (3), Attempts: (3)
+SEVERE  - Error AccuWeather Forecast Service is busy. Number of Attempts: 
(4)</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Response</p>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>WeatherGateway Service is Busy. Retry later</pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_exemplo_3">Exemplo 3</h3>
+<div class="paragraph">
+<p>A anotação <code>@Retry</code> permite configurar um atraso para cada 
nova tentativa
+ser executada, dando a chance ao serviço solicitado para se recuperar e
+responder a solicitação corretamente. Para cada nova tentativa, seguindo o 
atraso
+configurado, é necessário definir <code>jitter</code> como zero (0). Caso 
contrário, o atraso de
+cada nova tentativa será aleatório.</p>
+</div>
+<div class="paragraph">
+<p>Analisando o log de mensagens, é possível ver que todas as tentativas 
levaram
+praticamente o mesmo tempo para executar.</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" 
data-lang="java">@Retry(retryOn = WeatherGatewayTimeoutException.class, 
maxRetries = 5, delay = 500, jitter = 0)
+public String statusOfWeekend() {
+    if (counterStatusOfWeekend.addAndGet(1) &lt;= 5) {
+        logTimeoutMessage(statusOfWeekendInstant);
+        statusOfWeekendInstant = Instant.now();
+        throw new WeatherGatewayTimeoutException();
+    }
+    return "The Forecast for the Weekend is Scattered Showers.";
+}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Chamada de status de fim de semana</p>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>GET 
http://localhost:8080/mp-faulttolerance-retry/weather/weekend/status</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Server log</p>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>WARNING - Timeout when accessing AccuWeather Forecast Service.
+WARNING - Timeout when accessing AccuWeather Forecast Service. Delay before 
this attempt: (501) millis
+WARNING - Timeout when accessing AccuWeather Forecast Service. Delay before 
this attempt: (501) millis
+WARNING - Timeout when accessing AccuWeather Forecast Service. Delay before 
this attempt: (501) millis
+WARNING - Timeout when accessing AccuWeather Forecast Service. Delay before 
this attempt: (500) millis</pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_exemplo_4">Exemplo 4</h3>
+<div class="paragraph">
+<p>Basicamente com o mesmo comportamento do <code>Exemplo 3</code>, este 
exemplo defini
+o <code>delay</code> e o <code>jitter</code> com 500 milissegundos para 
aleatoriamente um novo atraso a cada nova tentativa
+após a primeira falha.
+<a 
href="https://github.com/jhalterman/failsafe/blob/master/src/main/java/net/jodah/failsafe/AbstractExecution.java";>AbstractExecution#randomDelay(delay,jitter,random)</a>
+pode dar uma ideia de como o novo atraso é calculado.</p>
+</div>
+<div class="paragraph">
+<p>Analisando o log de mensagens, é possível ver quanto tempo cada tentativa 
teve
+que esperar até a sua execução.</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" 
data-lang="java">@Retry(retryOn = WeatherGatewayTimeoutException.class, delay = 
500, jitter = 500)
+public String statusOfMonth() {
+    if (counterStatusOfWeekend.addAndGet(1) &lt;= DEFAULT_MAX_RETRY) {
+        logTimeoutMessage(statusOfMonthInstant);
+        statusOfMonthInstant = Instant.now();
+        throw new WeatherGatewayTimeoutException();
+    }
+    return "The Forecast for the Weekend is Scattered Showers.";
+}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Chamada de status do mês</p>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>GET 
http://localhost:8080/mp-faulttolerance-retry/weather/month/status</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Server log</p>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>WARNING - Timeout when accessing AccuWeather Forecast Service.
+WARNING - Timeout when accessing AccuWeather Forecast Service. Delay before 
this attempt: (417) millis
+WARNING - Timeout when accessing AccuWeather Forecast Service. Delay before 
this attempt: (90) millis</pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_example_5">Example 5</h3>
+<div class="paragraph">
+<p>Se uma condição para uma operação re-executada não estiver definida 
como nos
+exemplos anteriores usando o parâmetro <code>retryOn</code>, a operação é
+executada novamente para qualquer exceção lançada.</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" 
data-lang="java">@Retry(maxDuration = 1000)
+public String statusOfYear(){
+    if (counterStatusOfWeekend.addAndGet(1) &lt;= 5) {
+        logTimeoutMessage(statusOfYearInstant);
+        statusOfYearInstant = Instant.now();
+        throw new RuntimeException();
+    }
+    return "WeatherGateway Service Error";
+}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Chamada de status do ano</p>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>GET 
http://localhost:8080/mp-faulttolerance-retry/weather/year/statusk</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Server log</p>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>WARNING - Timeout when accessing AccuWeather Forecast Service.
+WARNING - Timeout when accessing AccuWeather Forecast Service. Delay before 
this attempt: (666) millis
+WARNING - Timeout when accessing AccuWeather Forecast Service. Delay before 
this attempt: (266) millis
+WARNING - Timeout when accessing AccuWeather Forecast Service. Delay before 
this attempt: (66) millis</pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_execute_os_testes">Execute os testes</h3>
+<div class="paragraph">
+<p>Você também pode experimentar usando
+<a 
href="src/test/java/org/superbiz/rest/WeatherServiceTest.java">WeatherServiceTest.java</a>
+disponível no projeto.</p>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>mvn clean test</pre>
+</div>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>[INFO] Results:
+[INFO]
+[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0</pre>
+</div>
+</div>
+</div>
+</div>
+</div>
+            </div>
+            
+        </div>
+    </div>
+<footer>
+               <div class="container">
+                       <div class="row">
+                               <div class="col-sm-6 text-center-mobile">
+                                       <h3 class="white">Be simple.  Be 
certified. Be Tomcat.</h3>
+                                       <h5 class="light regular 
light-white">"A good application in a good server"</h5>
+                                       <ul class="social-footer">
+                                               <li><a 
href="https://www.facebook.com/ApacheTomEE/";><i class="fa 
fa-facebook"></i></a></li>
+                                               <li><a 
href="https://twitter.com/apachetomee";><i class="fa fa-twitter"></i></a></li>
+                                               <li><a 
href="https://plus.google.com/communities/105208241852045684449";><i class="fa 
fa-google-plus"></i></a></li>
+                                       </ul>
+                               </div>
+                               <div class="col-sm-6 text-center-mobile">
+                                       <div class="row opening-hours">
+                                               <div class="col-sm-3 
text-center-mobile">
+                                                       <h5><a 
href="../../../latest/docs/documentation.html" 
class="white">Documentation</a></h5>
+                                                       <ul 
class="list-unstyled">
+                                                               <li><a 
href="../../../latest/docs/admin/configuration/index.html" class="regular 
light-white">How to configure</a></li>
+                                                               <li><a 
href="../../../latest/docs/admin/file-layout.html" class="regular 
light-white">Dir. Structure</a></li>
+                                                               <li><a 
href="../../../latest/docs/developer/testing/index.html" class="regular 
light-white">Testing</a></li>
+                                                               <li><a 
href="../../../latest/docs/admin/cluster/index.html" class="regular 
light-white">Clustering</a></li>
+                                                       </ul>
+                                               </div>
+                                               <div class="col-sm-3 
text-center-mobile">
+                                                       <h5><a 
href="../../../latest/examples/" class="white">Examples</a></h5>
+                                                       <ul 
class="list-unstyled">
+                                                               <li><a 
href="../../../latest/examples/simple-cdi-interceptor.html" class="regular 
light-white">CDI Interceptor</a></li>
+                                                               <li><a 
href="../../../latest/examples/rest-cdi.html" class="regular light-white">REST 
with CDI</a></li>
+                                                               <li><a 
href="../../../latest/examples/ejb-examples.html" class="regular 
light-white">EJB</a></li>
+                                                               <li><a 
href="../../../latest/examples/jsf-managedBean-and-ejb.html" class="regular 
light-white">JSF</a></li>
+                                                       </ul>
+                                               </div>
+                                               <div class="col-sm-3 
text-center-mobile">
+                                                       <h5><a 
href="../../../community/index.html" class="white">Community</a></h5>
+                                                       <ul 
class="list-unstyled">
+                                                               <li><a 
href="../../../community/contributors.html" class="regular 
light-white">Contributors</a></li>
+                                                               <li><a 
href="../../../community/social.html" class="regular 
light-white">Social</a></li>
+                                                               <li><a 
href="../../../community/sources.html" class="regular 
light-white">Sources</a></li>
+                                                       </ul>
+                                               </div>
+                                               <div class="col-sm-3 
text-center-mobile">
+                                                       <h5><a 
href="../../../security/index.html" class="white">Security</a></h5>
+                                                       <ul 
class="list-unstyled">
+                                                               <li><a 
href="http://apache.org/security"; target="_blank" class="regular 
light-white">Apache Security</a></li>
+                                                               <li><a 
href="http://apache.org/security/projects.html"; target="_blank" class="regular 
light-white">Security Projects</a></li>
+                                                               <li><a 
href="http://cve.mitre.org"; target="_blank" class="regular 
light-white">CVE</a></li>
+                                                       </ul>
+                                               </div>
+                                       </div>
+                               </div>
+                       </div>
+                       <div class="row bottom-footer text-center-mobile">
+                               <div class="col-sm-12 light-white">
+                                       <p>Copyright &copy; 1999-2016 The 
Apache Software Foundation, Licensed under the Apache License, Version 2.0. 
Apache TomEE, TomEE, Apache, the Apache feather logo, and the Apache TomEE 
project logo are trademarks of The Apache Software Foundation. All other marks 
mentioned may be trademarks or registered trademarks of their respective 
owners.</p>
+                               </div>
+                       </div>
+               </div>
+       </footer>
+       <!-- Holder for mobile navigation -->
+       <div class="mobile-nav">
+        <ul>
+          <li><a hef="../../../latest/docs/admin/index.html">Administrators</a>
+          <li><a hef="../../../latest/docs/developer/index.html">Developers</a>
+          <li><a hef="../../../latest/docs/advanced/index.html">Advanced</a>
+          <li><a hef="../../../community/index.html">Community</a>
+        </ul>
+               <a href="#" class="close-link"><i class="arrow_up"></i></a>
+       </div>
+       <!-- Scripts -->
+       <script src="../../../js/jquery-1.11.1.min.js"></script>
+       <script src="../../../js/owl.carousel.min.js"></script>
+       <script src="../../../js/bootstrap.min.js"></script>
+       <script src="../../../js/wow.min.js"></script>
+       <script src="../../../js/typewriter.js"></script>
+       <script src="../../../js/jquery.onepagenav.js"></script>
+       <script src="../../../js/tree.jquery.js"></script>
+       <script src="../../../js/highlight.pack.js"></script>
+    <script src="../../../js/main.js"></script>
+               </body>
+
+</html>
+


Reply via email to