Repository: tomee Updated Branches: refs/heads/master 7125321af -> 676e2533f
TOMEE-2422 - Fixing titles Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/0efe6d0b Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/0efe6d0b Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/0efe6d0b Branch: refs/heads/master Commit: 0efe6d0b9ca044d2be312f7baa4b0918a059ee6c Parents: b489fca Author: ivanjunckes <ijunc...@tomitribe.com> Authored: Wed Dec 26 13:50:55 2018 -0200 Committer: ivanjunckes <ijunc...@tomitribe.com> Committed: Wed Dec 26 13:50:55 2018 -0200 ---------------------------------------------------------------------- .../README.md | 1 + .../cdi-alternative-and-stereotypes/README.md | 1 + examples/cdi-events/README.md | 1 + .../dynamic-proxy-to-access-mbean/README.md | 2 +- examples/mp-faulttolerance-retry/README.md | 1 + examples/mp-metrics-counted/README.md | 1 + examples/mp-metrics-histogram/README.md | 1 + examples/mp-metrics-metered/README.md | 260 +++++++++---------- examples/mp-metrics-timed/README.md | 1 + examples/mp-rest-client/README.md | 6 + examples/mp-rest-jwt/README.md | 1 + examples/polling-parent/README.md | 1 + examples/simple-cdi-interceptor/README.md | 1 + examples/websocket-tls-basic-auth/README.md | 1 + 14 files changed, 148 insertions(+), 131 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tomee/blob/0efe6d0b/examples/bean-validation-design-by-contract/README.md ---------------------------------------------------------------------- diff --git a/examples/bean-validation-design-by-contract/README.md b/examples/bean-validation-design-by-contract/README.md index 4561b09..747e855 100644 --- a/examples/bean-validation-design-by-contract/README.md +++ b/examples/bean-validation-design-by-contract/README.md @@ -1,6 +1,7 @@ index-group=Other Features type=page status=published +title=Bean Validation Design by Contract ~~~~~~ # Bean Validation - Design By Contract http://git-wip-us.apache.org/repos/asf/tomee/blob/0efe6d0b/examples/cdi-alternative-and-stereotypes/README.md ---------------------------------------------------------------------- diff --git a/examples/cdi-alternative-and-stereotypes/README.md b/examples/cdi-alternative-and-stereotypes/README.md index fe647ed..b527711 100644 --- a/examples/cdi-alternative-and-stereotypes/README.md +++ b/examples/cdi-alternative-and-stereotypes/README.md @@ -1,6 +1,7 @@ index-group=CDI type=page status=published +title=CDI Alternative and Stereotypes ~~~~~~ # Introduction http://git-wip-us.apache.org/repos/asf/tomee/blob/0efe6d0b/examples/cdi-events/README.md ---------------------------------------------------------------------- diff --git a/examples/cdi-events/README.md b/examples/cdi-events/README.md index d42488e..388b9d4 100644 --- a/examples/cdi-events/README.md +++ b/examples/cdi-events/README.md @@ -1,6 +1,7 @@ index-group=Unrevised type=page status=published +title=CDI Events ~~~~~~ # CDI events: loose coupling and extensibility http://git-wip-us.apache.org/repos/asf/tomee/blob/0efe6d0b/examples/dynamic-proxy-to-access-mbean/README.md ---------------------------------------------------------------------- diff --git a/examples/dynamic-proxy-to-access-mbean/README.md b/examples/dynamic-proxy-to-access-mbean/README.md index 7cf1895..5fd090b 100644 --- a/examples/dynamic-proxy-to-access-mbean/README.md +++ b/examples/dynamic-proxy-to-access-mbean/README.md @@ -1,7 +1,7 @@ index-group=Proxy Beans type=page status=published -title=dynamic-proxy-to-access-mbean +title=Dynamic Proxy to Access MBean ~~~~~~ *Help us document this example! Click the blue pencil icon in the upper right to edit this page.* http://git-wip-us.apache.org/repos/asf/tomee/blob/0efe6d0b/examples/mp-faulttolerance-retry/README.md ---------------------------------------------------------------------- diff --git a/examples/mp-faulttolerance-retry/README.md b/examples/mp-faulttolerance-retry/README.md index 8955655..da32c65 100644 --- a/examples/mp-faulttolerance-retry/README.md +++ b/examples/mp-faulttolerance-retry/README.md @@ -1,6 +1,7 @@ index-group=Unrevised type=page status=published +title=Microprofile Fault Tolerance Retry ~~~~~~ # Microprofile Fault Tolerance - Retry policy This is an example of how to use Microprofile @Retry in TomEE. http://git-wip-us.apache.org/repos/asf/tomee/blob/0efe6d0b/examples/mp-metrics-counted/README.md ---------------------------------------------------------------------- diff --git a/examples/mp-metrics-counted/README.md b/examples/mp-metrics-counted/README.md index eb6c2fd..cb91ef0 100644 --- a/examples/mp-metrics-counted/README.md +++ b/examples/mp-metrics-counted/README.md @@ -1,6 +1,7 @@ index-group=Unrevised type=page status=published +title=Microprofile Metrics Counted ~~~~~~ # Microprofile Metrics This is an example on how to use microprofile metrics in TomEE. http://git-wip-us.apache.org/repos/asf/tomee/blob/0efe6d0b/examples/mp-metrics-histogram/README.md ---------------------------------------------------------------------- diff --git a/examples/mp-metrics-histogram/README.md b/examples/mp-metrics-histogram/README.md index c948cd5..1ed8875 100644 --- a/examples/mp-metrics-histogram/README.md +++ b/examples/mp-metrics-histogram/README.md @@ -1,6 +1,7 @@ index-group=Histogram type=page status=published +title=Microprofile Metrics Histogram ~~~~~~ # Microprofile Metrics This is an example on how to use microprofile metrics in TomEE. http://git-wip-us.apache.org/repos/asf/tomee/blob/0efe6d0b/examples/mp-metrics-metered/README.md ---------------------------------------------------------------------- diff --git a/examples/mp-metrics-metered/README.md b/examples/mp-metrics-metered/README.md index 8008fbe..fed2d52 100644 --- a/examples/mp-metrics-metered/README.md +++ b/examples/mp-metrics-metered/README.md @@ -1,130 +1,130 @@ -index-group=Unrevised -type=page -status=published -~~~~~~ -# Microprofile Metrics -This is an example on how to use microprofile metrics in TomEE. - -##### Run the application: - - mvn clean install tomee:run - -Within the application, there is an enpoint that will give you a weather weather status for the day and week. - -##### For the day status call: - - GET http://localhost:8080/mp-metrics-metered/weather/day/status - -##### Response: - - Hi, today is a sunny day! - -#### Metered Feature -MicroProfile metrics has a feature that can be used to find the rate of requests to a service. - -To use this feature you need to annotate the JAX-RS resource method with @Metered. - - @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!"; - } - ... - } - -There are some configurations, as part of @Metered, that you need to know: - -**String name** -Optional. Sets the name of the metric. If not explicitly given the name of the annotated object is used. - -**boolean absolute** -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. - -**String displayName** -Optional. A human-readable display name for metadata. - -**String description** -Optional. A description of the metric. - -**String[] tags** -Optional. Array of Strings in the <key>=<value> format to supply special tags to a metric. - -**boolean reusable** -Denotes if a metric with a certain name can be registered in more than one place. Does not apply to gauges. - -**String unit** -Unit of the metric. Default for @Metered is nanoseconds. - -#### Metric data - -Check the Metered metric doing a _GET_ request: - -##### Prometheus format: - - GET http://localhost:8080/mp-metrics-metered/metrics/application/dailyStatus - -##### Response: - - # 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 - # TYPE application:daily_status_one_min_rate_per_second meter - application:daily_status_one_min_rate_per_second 1.3376002644204984E-19 - # 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 - - -##### JSON Format: - -For json format add the header _Accept=application/json_ to the request. - - { - "dailyStatus": { - "count": 2, - "fifteenMinRate": 5.77762774235716e-14, - "fiveMinRate": 5.990473088217569e-13, - "meanRate": 0, - "oneMinRate": 2.229333774034164e-12, - "unit": "minutes" - } - } - -#### Metric metadata -A metric will have a metadata so you can know more information about it, like displayName, description, tags etc. - -Check the metric metadata doing a _OPTIONS_ request: - -##### Request - - OPTIONS http://localhost:8080/mp-metrics-metered/metrics/application/dailyStatus - -##### Response: - - { - "dailyStatus": { - "description": "Metrics to daily weather status method", - "displayName": "", - "name": "dailyStatus", - "reusable": false, - "tags": "", - "type": "meter", - "typeRaw": "METERED", - "unit": "minutes" - } - } - - -##### Test the application: - - mvn test +index-group=Unrevised +type=page +status=published +~~~~~~ +# Microprofile Metrics +This is an example on how to use microprofile metrics in TomEE. + +##### Run the application: + + mvn clean install tomee:run + +Within the application, there is an enpoint that will give you a weather weather status for the day and week. + +##### For the day status call: + + GET http://localhost:8080/mp-metrics-metered/weather/day/status + +##### Response: + + Hi, today is a sunny day! + +#### Metered Feature +MicroProfile metrics has a feature that can be used to find the rate of requests to a service. + +To use this feature you need to annotate the JAX-RS resource method with @Metered. + + @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!"; + } + ... + } + +There are some configurations, as part of @Metered, that you need to know: + +**String name** +Optional. Sets the name of the metric. If not explicitly given the name of the annotated object is used. + +**boolean absolute** +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. + +**String displayName** +Optional. A human-readable display name for metadata. + +**String description** +Optional. A description of the metric. + +**String[] tags** +Optional. Array of Strings in the <key>=<value> format to supply special tags to a metric. + +**boolean reusable** +Denotes if a metric with a certain name can be registered in more than one place. Does not apply to gauges. + +**String unit** +Unit of the metric. Default for @Metered is nanoseconds. + +#### Metric data + +Check the Metered metric doing a _GET_ request: + +##### Prometheus format: + + GET http://localhost:8080/mp-metrics-metered/metrics/application/dailyStatus + +##### Response: + + # 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 + # TYPE application:daily_status_one_min_rate_per_second meter + application:daily_status_one_min_rate_per_second 1.3376002644204984E-19 + # 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 + + +##### JSON Format: + +For json format add the header _Accept=application/json_ to the request. + + { + "dailyStatus": { + "count": 2, + "fifteenMinRate": 5.77762774235716e-14, + "fiveMinRate": 5.990473088217569e-13, + "meanRate": 0, + "oneMinRate": 2.229333774034164e-12, + "unit": "minutes" + } + } + +#### Metric metadata +A metric will have a metadata so you can know more information about it, like displayName, description, tags etc. + +Check the metric metadata doing a _OPTIONS_ request: + +##### Request + + OPTIONS http://localhost:8080/mp-metrics-metered/metrics/application/dailyStatus + +##### Response: + + { + "dailyStatus": { + "description": "Metrics to daily weather status method", + "displayName": "", + "name": "dailyStatus", + "reusable": false, + "tags": "", + "type": "meter", + "typeRaw": "METERED", + "unit": "minutes" + } + } + + +##### Test the application: + + mvn test http://git-wip-us.apache.org/repos/asf/tomee/blob/0efe6d0b/examples/mp-metrics-timed/README.md ---------------------------------------------------------------------- diff --git a/examples/mp-metrics-timed/README.md b/examples/mp-metrics-timed/README.md index cd15659..3ad4b02 100644 --- a/examples/mp-metrics-timed/README.md +++ b/examples/mp-metrics-timed/README.md @@ -1,6 +1,7 @@ index-group=Unrevised type=page status=published +title=Microprofile Metrics Timed ~~~~~~ # Microprofile Metrics This is an example on how to use MicroProfile metrics in TomEE. http://git-wip-us.apache.org/repos/asf/tomee/blob/0efe6d0b/examples/mp-rest-client/README.md ---------------------------------------------------------------------- diff --git a/examples/mp-rest-client/README.md b/examples/mp-rest-client/README.md index 0f0fcc5..fa2e1cb 100755 --- a/examples/mp-rest-client/README.md +++ b/examples/mp-rest-client/README.md @@ -1,3 +1,9 @@ +index-group=Unrevised +type=page +status=published +title=Microprofile Rest Client +~~~~~~ + # Microprofile Rest client This is a basic example on how to configure and use MicroProfile Rest Client in TomEE. http://git-wip-us.apache.org/repos/asf/tomee/blob/0efe6d0b/examples/mp-rest-jwt/README.md ---------------------------------------------------------------------- diff --git a/examples/mp-rest-jwt/README.md b/examples/mp-rest-jwt/README.md index fdd20da..2bef694 100644 --- a/examples/mp-rest-jwt/README.md +++ b/examples/mp-rest-jwt/README.md @@ -1,6 +1,7 @@ index-group=Unrevised type=page status=published +title=Microprofile Rest JWT ~~~~~~ # MP REST JWT This is a basic example on how to configure and use MicroProfile JWT in TomEE. http://git-wip-us.apache.org/repos/asf/tomee/blob/0efe6d0b/examples/polling-parent/README.md ---------------------------------------------------------------------- diff --git a/examples/polling-parent/README.md b/examples/polling-parent/README.md index 67cbc6e..d523bfb 100644 --- a/examples/polling-parent/README.md +++ b/examples/polling-parent/README.md @@ -1,6 +1,7 @@ index-group=Misc type=page status=published +title=Polling ~~~~~~ # Sample # http://git-wip-us.apache.org/repos/asf/tomee/blob/0efe6d0b/examples/simple-cdi-interceptor/README.md ---------------------------------------------------------------------- diff --git a/examples/simple-cdi-interceptor/README.md b/examples/simple-cdi-interceptor/README.md index 9f6fbed..1ec78aa 100644 --- a/examples/simple-cdi-interceptor/README.md +++ b/examples/simple-cdi-interceptor/README.md @@ -1,6 +1,7 @@ index-group=CDI type=page status=published +title=Simple CDI Interceptor ~~~~~~ #Simple CDI Interceptor http://git-wip-us.apache.org/repos/asf/tomee/blob/0efe6d0b/examples/websocket-tls-basic-auth/README.md ---------------------------------------------------------------------- diff --git a/examples/websocket-tls-basic-auth/README.md b/examples/websocket-tls-basic-auth/README.md index 41a284c..80fb882 100644 --- a/examples/websocket-tls-basic-auth/README.md +++ b/examples/websocket-tls-basic-auth/README.md @@ -1,6 +1,7 @@ index-group=Unrevised type=page status=published +title=Websocket TLS Basic Auth ~~~~~~ # websocket-tls-basic-auth