You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by db...@apache.org on 2020/07/06 00:40:24 UTC
svn commit: r1879536 [17/42] - in /tomee/site/trunk/content: ./ community/
jakartaee-8.0/javadoc/ jakartaee-8.0/javadoc/javax/ejb/
jakartaee-8.0/javadoc/javax/enterprise/concurrent/
jakartaee-8.0/javadoc/javax/resource/spi/ jakartaee-8.0/javadoc/javax/...
Modified: tomee/site/trunk/content/master/examples/movies-complete-meta.html
URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/master/examples/movies-complete-meta.html?rev=1879536&r1=1879535&r2=1879536&view=diff
==============================================================================
--- tomee/site/trunk/content/master/examples/movies-complete-meta.html (original)
+++ tomee/site/trunk/content/master/examples/movies-complete-meta.html Mon Jul 6 00:40:18 2020
@@ -106,9 +106,9 @@ right to edit this page.</em></p>
<div class="sect1">
<h2 id="_addinterceptor">AddInterceptor</h2>
<div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>package org.superbiz.injection.tx;
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.injection.tx;
import javax.interceptor.AroundInvoke;
import javax.interceptor.InvocationContext;
@@ -123,7 +123,7 @@ public class AddInterceptor {
// Log Add
return context.proceed();
}
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -131,9 +131,9 @@ public class AddInterceptor {
<div class="sect1">
<h2 id="_add">Add</h2>
<div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>package org.superbiz.injection.tx.api;
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.injection.tx.api;
import org.superbiz.injection.tx.AddInterceptor;
@@ -159,7 +159,7 @@ public @interface Add {
@Interceptors(AddInterceptor.class)
public void method();
}
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -167,9 +167,9 @@ public @interface Add {
<div class="sect1">
<h2 id="_delete">Delete</h2>
<div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>package org.superbiz.injection.tx.api;
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.injection.tx.api;
import org.superbiz.injection.tx.DeleteInterceptor;
@@ -195,7 +195,7 @@ public @interface Delete {
@Interceptors(DeleteInterceptor.class)
public void method();
}
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -203,9 +203,9 @@ public @interface Delete {
<div class="sect1">
<h2 id="_metatype">Metatype</h2>
<div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>package org.superbiz.injection.tx.api;
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.injection.tx.api;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
@@ -216,7 +216,7 @@ import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.ANNOTATION_TYPE)
public @interface Metatype {
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -224,9 +224,9 @@ public @interface Metatype {
<div class="sect1">
<h2 id="_movieunit">MovieUnit</h2>
<div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>package org.superbiz.injection.tx.api;
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.injection.tx.api;
import javax.persistence.PersistenceContext;
import javax.persistence.PersistenceContextType;
@@ -242,7 +242,7 @@ import java.lang.annotation.Target;
@PersistenceContext(name = "movie-unit", unitName = "movie-unit", type = PersistenceContextType.EXTENDED)
public @interface MovieUnit {
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -250,9 +250,9 @@ public @interface MovieUnit {
<div class="sect1">
<h2 id="_read">Read</h2>
<div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>package org.superbiz.injection.tx.api;
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.injection.tx.api;
import javax.annotation.security.PermitAll;
import javax.ejb.TransactionAttribute;
@@ -274,7 +274,7 @@ public @interface Read {
@TransactionAttribute(TransactionAttributeType.SUPPORTS)
public void method();
}
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -282,9 +282,9 @@ public @interface Read {
<div class="sect1">
<h2 id="_deleteinterceptor">DeleteInterceptor</h2>
<div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>package org.superbiz.injection.tx;
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.injection.tx;
import javax.interceptor.AroundInvoke;
import javax.interceptor.InvocationContext;
@@ -299,7 +299,7 @@ public class DeleteInterceptor {
// Log Delete
return context.proceed();
}
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -307,9 +307,9 @@ public class DeleteInterceptor {
<div class="sect1">
<h2 id="_movie">Movie</h2>
<div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>package org.superbiz.injection.tx;
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.injection.tx;
import javax.persistence.Entity;
@@ -353,7 +353,7 @@ public class Movie {
this.year = year;
}
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -361,9 +361,9 @@ public class Movie {
<div class="sect1">
<h2 id="_movies">Movies</h2>
<div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>package org.superbiz.injection.tx;
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.injection.tx;
import org.superbiz.injection.tx.api.Add;
import org.superbiz.injection.tx.api.Delete;
@@ -399,7 +399,7 @@ public class Movies {
Query query = entityManager.createQuery("SELECT m from Movie as m");
return query.getResultList();
}
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -407,9 +407,9 @@ public class Movies {
<div class="sect1">
<h2 id="_persistence_xml">persistence.xml</h2>
<div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre><persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
+<pre class="highlight"><code class="language-xml" data-lang="xml"><persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
<persistence-unit name="movie-unit">
<jta-data-source>movieDatabase</jta-data-source>
@@ -420,7 +420,7 @@ public class Movies {
<property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>
</properties>
</persistence-unit>
-</persistence></pre>
+</persistence></code></pre>
</div>
</div>
</div>
@@ -428,9 +428,9 @@ public class Movies {
<div class="sect1">
<h2 id="_moviestest">MoviesTest</h2>
<div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>package org.superbiz.injection.tx;
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.injection.tx;
import junit.framework.TestCase;
@@ -538,7 +538,7 @@ public class MoviesTest extends TestCase
return callable.call();
}
}
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -546,9 +546,9 @@ public class MoviesTest extends TestCase
<div class="sect1">
<h2 id="_running">Running</h2>
<div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>-------------------------------------------------------
+<pre class="highlight"><code class="language-console" data-lang="console">-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.superbiz.injection.tx.MoviesTest
@@ -600,7 +600,7 @@ Tests run: 2, Failures: 0, Errors: 0, Sk
Results :
-Tests run: 2, Failures: 0, Errors: 0, Skipped: 0</pre>
+Tests run: 2, Failures: 0, Errors: 0, Skipped: 0</code></pre>
</div>
</div>
</div>
Modified: tomee/site/trunk/content/master/examples/movies-complete.html
URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/master/examples/movies-complete.html?rev=1879536&r1=1879535&r2=1879536&view=diff
==============================================================================
--- tomee/site/trunk/content/master/examples/movies-complete.html (original)
+++ tomee/site/trunk/content/master/examples/movies-complete.html Mon Jul 6 00:40:18 2020
@@ -106,9 +106,9 @@ right to edit this page.</em></p>
<div class="sect1">
<h2 id="_addinterceptor">AddInterceptor</h2>
<div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>package org.superbiz.injection.tx;
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.injection.tx;
import javax.interceptor.AroundInvoke;
import javax.interceptor.InvocationContext;
@@ -123,7 +123,7 @@ public class AddInterceptor {
// Log Add
return context.proceed();
}
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -131,9 +131,9 @@ public class AddInterceptor {
<div class="sect1">
<h2 id="_deleteinterceptor">DeleteInterceptor</h2>
<div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>package org.superbiz.injection.tx;
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.injection.tx;
import javax.interceptor.AroundInvoke;
import javax.interceptor.InvocationContext;
@@ -148,7 +148,7 @@ public class DeleteInterceptor {
// Log Delete
return context.proceed();
}
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -156,9 +156,9 @@ public class DeleteInterceptor {
<div class="sect1">
<h2 id="_movie">Movie</h2>
<div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>package org.superbiz.injection.tx;
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.injection.tx;
import javax.persistence.Entity;
@@ -202,7 +202,7 @@ public class Movie {
this.year = year;
}
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -210,9 +210,9 @@ public class Movie {
<div class="sect1">
<h2 id="_movies">Movies</h2>
<div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>package org.superbiz.injection.tx;
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.injection.tx;
import javax.annotation.security.PermitAll;
import javax.annotation.security.RolesAllowed;
@@ -253,7 +253,7 @@ public class Movies {
Query query = entityManager.createQuery("SELECT m from Movie as m");
return query.getResultList();
}
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -261,9 +261,9 @@ public class Movies {
<div class="sect1">
<h2 id="_readinterceptor">ReadInterceptor</h2>
<div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>package org.superbiz.injection.tx;
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.injection.tx;
import javax.interceptor.AroundInvoke;
import javax.interceptor.InvocationContext;
@@ -278,7 +278,7 @@ public class ReadInterceptor {
// Log Delete
return context.proceed();
}
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -286,9 +286,9 @@ public class ReadInterceptor {
<div class="sect1">
<h2 id="_persistence_xml">persistence.xml</h2>
<div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre><persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
+<pre class="highlight"><code class="language-xml" data-lang="xml"><persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
<persistence-unit name="movie-unit">
<jta-data-source>movieDatabase</jta-data-source>
@@ -299,7 +299,7 @@ public class ReadInterceptor {
<property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>
</properties>
</persistence-unit>
-</persistence></pre>
+</persistence></code></pre>
</div>
</div>
</div>
@@ -307,9 +307,9 @@ public class ReadInterceptor {
<div class="sect1">
<h2 id="_moviestest">MoviesTest</h2>
<div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>package org.superbiz.injection.tx;
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.injection.tx;
import junit.framework.TestCase;
@@ -417,7 +417,7 @@ public class MoviesTest extends TestCase
return callable.call();
}
}
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -425,9 +425,9 @@ public class MoviesTest extends TestCase
<div class="sect1">
<h2 id="_running">Running</h2>
<div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>-------------------------------------------------------
+<pre class="highlight"><code class="language-console" data-lang="console">-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.superbiz.injection.tx.MoviesTest
@@ -479,7 +479,7 @@ Tests run: 2, Failures: 0, Errors: 0, Sk
Results :
-Tests run: 2, Failures: 0, Errors: 0, Skipped: 0</pre>
+Tests run: 2, Failures: 0, Errors: 0, Skipped: 0</code></pre>
</div>
</div>
</div>
Modified: tomee/site/trunk/content/master/examples/mp-faulttolerance-retry.html
URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/master/examples/mp-faulttolerance-retry.html?rev=1879536&r1=1879535&r2=1879536&view=diff
==============================================================================
--- tomee/site/trunk/content/master/examples/mp-faulttolerance-retry.html (original)
+++ tomee/site/trunk/content/master/examples/mp-faulttolerance-retry.html Mon Jul 6 00:40:18 2020
@@ -158,9 +158,9 @@ for more details.</p>
<div class="sectionbody">
<div class="sect2">
<h3 id="_run_the_application">Run the application</h3>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>mvn clean install tomee:run</pre>
+<pre class="highlight"><code class="language-java" data-lang="java">mvn clean install tomee:run</code></pre>
</div>
</div>
</div>
@@ -193,27 +193,27 @@ public class WeatherGateway{
<div class="paragraph">
<p>Day status call</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>GET http://localhost:8080/mp-faulttolerance-retry/weather/day/status</pre>
+<pre class="highlight"><code class="language-java" data-lang="java">GET http://localhost:8080/mp-faulttolerance-retry/weather/day/status</code></pre>
</div>
</div>
<div class="paragraph">
<p>Server log</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>WARNING - Timeout when accessing AccuWeather Forecast Service. Max of Attempts: (3), Attempts: (1)
+<pre class="highlight"><code class="language-java" data-lang="java">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>
+WARNING - Timeout when accessing AccuWeather Forecast Service. Max of Attempts: (3), Attempts: (3)</code></pre>
</div>
</div>
<div class="paragraph">
<p>Response</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>Today is a sunny day!</pre>
+<pre class="highlight"><code class="language-java" data-lang="java">Today is a sunny day!</code></pre>
</div>
</div>
</div>
@@ -244,28 +244,28 @@ public String statusOfWeek(){
<div class="paragraph">
<p>Week status call</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>GET http://localhost:8080/mp-faulttolerance-retry/weather/week/status</pre>
+<pre class="highlight"><code class="language-java" data-lang="java">GET http://localhost:8080/mp-faulttolerance-retry/weather/week/status</code></pre>
</div>
</div>
<div class="paragraph">
<p>Server log</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>WARNING - Timeout when accessing AccuWeather Forecast Service. Max of Attempts: (3), Attempts: (1)
+<pre class="highlight"><code class="language-java" data-lang="java">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>
+SEVERE - Error AccuWeather Forecast Service is busy. Number of Attempts: (4)</code></pre>
</div>
</div>
<div class="paragraph">
<p>Response</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>WeatherGateway Service is Busy. Retry later</pre>
+<pre class="highlight"><code class="language-java" data-lang="java">WeatherGateway Service is Busy. Retry later</code></pre>
</div>
</div>
</div>
@@ -298,21 +298,21 @@ public String statusOfWeekend() {
<div class="paragraph">
<p>Weekend status call</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>GET http://localhost:8080/mp-faulttolerance-retry/weather/weekend/status</pre>
+<pre class="highlight"><code class="language-java" data-lang="java">GET http://localhost:8080/mp-faulttolerance-retry/weather/weekend/status</code></pre>
</div>
</div>
<div class="paragraph">
<p>Server log</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>WARNING - Timeout when accessing AccuWeather Forecast Service.
+<pre class="highlight"><code class="language-java" data-lang="java">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>
+WARNING - Timeout when accessing AccuWeather Forecast Service. Delay before this attempt: (500) millis</code></pre>
</div>
</div>
</div>
@@ -345,19 +345,19 @@ public String statusOfMonth() {
<div class="paragraph">
<p>Month status call</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>GET http://localhost:8080/mp-faulttolerance-retry/weather/month/status</pre>
+<pre class="highlight"><code class="language-java" data-lang="java">GET http://localhost:8080/mp-faulttolerance-retry/weather/month/status</code></pre>
</div>
</div>
<div class="paragraph">
<p>Server log</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>WARNING - Timeout when accessing AccuWeather Forecast Service.
+<pre class="highlight"><code class="language-java" data-lang="java">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>
+WARNING - Timeout when accessing AccuWeather Forecast Service. Delay before this attempt: (90) millis</code></pre>
</div>
</div>
</div>
@@ -384,20 +384,20 @@ public String statusOfYear(){
<div class="paragraph">
<p>Year status call</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>GET http://localhost:8080/mp-faulttolerance-retry/weather/year/statusk</pre>
+<pre class="highlight"><code class="language-java" data-lang="java">GET http://localhost:8080/mp-faulttolerance-retry/weather/year/statusk</code></pre>
</div>
</div>
<div class="paragraph">
<p>Server log</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>WARNING - Timeout when accessing AccuWeather Forecast Service.
+<pre class="highlight"><code class="language-java" data-lang="java">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>
+WARNING - Timeout when accessing AccuWeather Forecast Service. Delay before this attempt: (66) millis</code></pre>
</div>
</div>
</div>
@@ -408,16 +408,16 @@ WARNING - Timeout when accessing AccuWea
<a href="src/test/java/org/superbiz/rest/WeatherServiceTest.java">WeatherServiceTest.java</a>
available in the project.</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>mvn clean test</pre>
+<pre class="highlight"><code class="language-java" data-lang="java">mvn clean test</code></pre>
</div>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>[INFO] Results:
+<pre class="highlight"><code class="language-java" data-lang="java">[INFO] Results:
[INFO]
-[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0</pre>
+[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0</code></pre>
</div>
</div>
</div>
Modified: tomee/site/trunk/content/master/examples/mp-jsonb-configuration.html
URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/master/examples/mp-jsonb-configuration.html?rev=1879536&r1=1879535&r2=1879536&view=diff
==============================================================================
--- tomee/site/trunk/content/master/examples/mp-jsonb-configuration.html (original)
+++ tomee/site/trunk/content/master/examples/mp-jsonb-configuration.html Mon Jul 6 00:40:18 2020
@@ -306,7 +306,7 @@ install' command run from the `mp-jsonb-
</div>
<div class="listingblock">
<div class="content">
-<pre class="highlight"><code class="language-java" data-lang="java">-------------------------------------------------------
+<pre class="highlight"><code class="language-console" data-lang="console">-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.superbiz.rest.UserServiceTest
Added: tomee/site/trunk/content/master/examples/mp-metrics-gauge.html
URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/master/examples/mp-metrics-gauge.html?rev=1879536&view=auto
==============================================================================
--- tomee/site/trunk/content/master/examples/mp-metrics-gauge.html (added)
+++ tomee/site/trunk/content/master/examples/mp-metrics-gauge.html Mon Jul 6 00:40:18 2020
@@ -0,0 +1,388 @@
+<!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 Metrics Gauge</h1>
+ </div>
+ </div>
+ </div>
+ <div class="row">
+
+ <div class="col-md-12">
+ <div id="preamble">
+<div class="sectionbody">
+<div class="paragraph">
+<p>This is an example on how to use MicroProfile metrics in TomEE.</p>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_run_the_application">Run the application:</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="content">
+<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 endpoint that will give you the weather temperature in celsius for the day.</p>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_for_the_day_temperature_call">For the day temperature call:</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-bash" data-lang="bash">$ curl -X GET http://localhost:8080/mp-metrics-gauge/weather/day/temperature</code></pre>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_response">Response:</h2>
+<div class="sectionbody">
+<div class="literalblock">
+<div class="content">
+<pre>30</pre>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_gauge_feature">Gauge Feature</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>MicroProfile metrics has a gauge feature. The gauge value and type is equal to
+the annotated method return value and type.</p>
+</div>
+<div class="paragraph">
+<p>To use this feature you need to annotate the JAX-RS resource method with <code>@Gauge</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 {
+
+ @Path("/day/temperature")
+ @Gauge(name = "weather_day_temperature", absolute = true, unit = "celsius",
+ displayName = "Weather Day Temperature",
+ description = "This metric shows the day temperature.",
+ tags = {"weather=temperature"})
+ @GET
+ @Produces(MediaType.TEXT_PLAIN)
+ public Integer dayTemperature() {
+ return 30;
+ }
+}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>There are some configurations, as part of <code>@Gauge</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>
+</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>
+</div>
+<div class="paragraph">
+<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 <key>=<value> format to supply special tags
+to a metric.</p>
+</div>
+<div class="paragraph">
+<p><strong>String unit</strong>
+Unit of the metric. Check the MetricUnits class for a set of pre-defined units.</p>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_metric_data">Metric data</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>Check the gauge metric doing a <em>GET</em> request:</p>
+</div>
+<div class="sect2">
+<h3 id="_prometheus_format">Prometheus format:</h3>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-bash" data-lang="bash">$ curl -X GET http://localhost:8080/mp-metrics-gauge/metrics/application/weather_day_temperature</code></pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_prometeus_response">Prometeus Response:</h3>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code> # TYPE application:weather_day_temperature_celsius gauge
+ application:weather_day_temperature_celsius{weather="temperature"} 30.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>
+</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_temperature": 30
+ }</code></pre>
+</div>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<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
+<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>
+</div>
+<div class="sect1">
+<h2 id="__em_options_em_http_request"><em>OPTIONS</em> HTTP Request</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-bash" data-lang="bash">$ curl -X OPTIONS http://localhost:8080/mp-metrics-gauge/metrics/application/weather_day_temperature</code></pre>
+</div>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>== Response:</pre>
+</div>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-javascript" data-lang="javascript"> {
+ "weather_day_temperature": {
+ "unit": "celsius",
+ "displayName": "Weather Day Temperature",
+ "name": "weather_day_temperature",
+ "typeRaw": "GAUGE",
+ "description": "This metric shows the day temperature.",
+ "type": "gauge",
+ "value": {
+ "unit": "celsius",
+ "displayName": "Weather Day Temperature",
+ "name": "weather_day_temperature",
+ "tagsAsString": "weather=\"temperature\"",
+ "typeRaw": "GAUGE",
+ "description": "This metric shows the day temperature.",
+ "type": "gauge",
+ "reusable": false,
+ "tags": {
+ "weather": "temperature"
+ }
+ },
+ "reusable": false,
+ "tags": "weather=temperature"
+ }
+ }</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>You can also try it out using the <code>WeatherServiceTest.java</code> available in the
+project.</p>
+</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/" 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 © 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>
+
Modified: tomee/site/trunk/content/master/examples/mp-rest-client.html
URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/master/examples/mp-rest-client.html?rev=1879536&r1=1879535&r2=1879536&view=diff
==============================================================================
--- tomee/site/trunk/content/master/examples/mp-rest-client.html (original)
+++ tomee/site/trunk/content/master/examples/mp-rest-client.html Mon Jul 6 00:40:18 2020
@@ -105,9 +105,9 @@ Client in TomEE.</p>
</div>
<div class="sect2">
<h3 id="_run_the_tests_for_different_scenarios_related_with_jwt_validation">Run the tests for different scenarios related with JWT validation</h3>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>mvn clean test</pre>
+<pre class="highlight"><code class="language-java" data-lang="java">mvn clean test</code></pre>
</div>
</div>
</div>
@@ -120,31 +120,31 @@ Client in TomEE.</p>
<ol class="arabic">
<li>
<p>Add the to the <code>pom.xml</code> the dependency:</p>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre> <dependency>
+<pre class="highlight"><code class="language-java" data-lang="java"> <dependency>
<groupId>org.eclipse.microprofile.rest.client</groupId>
<artifactId>microprofile-rest-client-api</artifactId>
<version>${microprofile.rest-client.version}</version>
<scope>provided</scope>
- </dependency></pre>
+ </dependency></code></pre>
</div>
</div>
</li>
<li>
<p>Provide configuration files: <code>microprofile-config.properties</code></p>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre> org.superbiz.rest.BookResourceClient/mp-rest/url=http://localhost:4444</pre>
+<pre class="highlight"><code class="language-java" data-lang="java"> org.superbiz.rest.BookResourceClient/mp-rest/url=http://localhost:4444</code></pre>
</div>
</div>
</li>
<li>
<p>Provide an interface that you can build from the JAX-RS resource you
want to consume: <code>BookResourceClient.java</code></p>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre> package org.superbiz.rest;
+<pre class="highlight"><code class="language-java" data-lang="java"> package org.superbiz.rest;
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
import javax.enterprise.context.Dependent;
@@ -182,7 +182,7 @@ want to consume: <code>BookResourceClien
@Path("/books")
List<Book> getListOfBooks();
- }</pre>
+ }</code></pre>
</div>
</div>
</li>
@@ -196,9 +196,9 @@ want to consume: <code>BookResourceClien
approach provided by MicroProfile Rest Client to consume an existing
JAX-RS resource.</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>package org.superbiz.rest;
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.rest;
import org.eclipse.microprofile.rest.client.inject.RestClient;
import org.jboss.arquillian.container.test.api.Deployment;
@@ -257,7 +257,7 @@ public class BookResourceTest {
assertTrue(bookResourceClient.getBook(2).getName().equalsIgnoreCase("Top 3 Tomee Configuraiton Tips"));
}
-}</pre>
+}</code></pre>
</div>
</div>
</div>
Modified: tomee/site/trunk/content/master/examples/mp-rest-jwt-jwk.html
URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/master/examples/mp-rest-jwt-jwk.html?rev=1879536&r1=1879535&r2=1879536&view=diff
==============================================================================
--- tomee/site/trunk/content/master/examples/mp-rest-jwt-jwk.html (original)
+++ tomee/site/trunk/content/master/examples/mp-rest-jwt-jwk.html Mon Jul 6 00:40:18 2020
@@ -127,14 +127,14 @@ project:</p>
<ol class="arabic">
<li>
<p>Add the dependency to our <code>pom.xml</code> file:</p>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre><dependency>
+<pre class="highlight"><code class="language-xml" data-lang="xml"><dependency>
<groupId>org.eclipse.microprofile.jwt</groupId>
<artifactId>microprofile-jwt-auth-api</artifactId>
<version>${mp-jwt.version}</version>
<scope>provided</scope>
-</dependency></pre>
+</dependency></code></pre>
</div>
</div>
</li>
Modified: tomee/site/trunk/content/master/examples/mp-rest-jwt-principal.html
URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/master/examples/mp-rest-jwt-principal.html?rev=1879536&r1=1879535&r2=1879536&view=diff
==============================================================================
--- tomee/site/trunk/content/master/examples/mp-rest-jwt-principal.html (original)
+++ tomee/site/trunk/content/master/examples/mp-rest-jwt-principal.html Mon Jul 6 00:40:18 2020
@@ -127,14 +127,14 @@ project:</p>
<ol class="arabic">
<li>
<p>Add the dependency to our <code>pom.xml</code> file:</p>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre><dependency>
+<pre class="highlight"><code class="language-xml" data-lang="xml"><dependency>
<groupId>org.eclipse.microprofile.jwt</groupId>
<artifactId>microprofile-jwt-auth-api</artifactId>
<version>${mp-jwt.version}</version>
<scope>provided</scope>
-</dependency></pre>
+</dependency></code></pre>
</div>
</div>
</li>
Modified: tomee/site/trunk/content/master/examples/mp-rest-jwt.html
URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/master/examples/mp-rest-jwt.html?rev=1879536&r1=1879535&r2=1879536&view=diff
==============================================================================
--- tomee/site/trunk/content/master/examples/mp-rest-jwt.html (original)
+++ tomee/site/trunk/content/master/examples/mp-rest-jwt.html Mon Jul 6 00:40:18 2020
@@ -106,9 +106,9 @@ TomEE.</p>
<div class="sect1">
<h2 id="_run_the_tests_for_different_scenarios_related_with_jwt_validation">Run the tests for different scenarios related with JWT validation</h2>
<div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>mvn clean test</pre>
+<pre class="highlight"><code class="language-java" data-lang="java">mvn clean test</code></pre>
</div>
</div>
</div>
@@ -120,9 +120,9 @@ TomEE.</p>
<p>The class <code>MoviesMPJWTConfigurationProvider.java</code> provides to TomEE the
figuration need it for JWT validation.</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>package org.superbiz.moviefun.rest;
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.moviefun.rest;
import org.apache.tomee.microprofile.jwt.config.JWTAuthContextInfo;
@@ -168,7 +168,7 @@ public class MoviesMPJWTConfigurationPro
JWTAuthContextInfo getContextInfo() throws InvalidKeySpecException, NoSuchAlgorithmException {
return getOptionalContextInfo().get();
}
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -182,9 +182,9 @@ secured using the standard annotation <c
takes care of performing the validation for incoming requests with
<code>Authorization</code> header providing a signed <code>Access Token</code></p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre> package org.superbiz.moviefun.rest;
+<pre class="highlight"><code class="language-java" data-lang="java"> package org.superbiz.moviefun.rest;
import org.superbiz.moviefun.Movie;
import org.superbiz.moviefun.MoviesBean;
@@ -248,7 +248,7 @@ takes care of performing the validation
@Inject
@ConfigProperty(name = "java.runtime.version")
- private String javaVersion;</pre>
+ private String javaVersion;</code></pre>
</div>
</div>
</div>
@@ -272,9 +272,9 @@ tests.</p>
<div class="paragraph">
<p><code>Token1.json</code></p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>{
+<pre class="highlight"><code class="language-java" data-lang="java">{
"iss": "https://server.example.com",
"jti": "a-123",
"sub": "24400320",
@@ -290,15 +290,15 @@ tests.</p>
"crud",
"read-only"
]
-}</pre>
+}</code></pre>
</div>
</div>
<div class="paragraph">
<p><code>Token2.json</code></p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>{
+<pre class="highlight"><code class="language-java" data-lang="java">{
"iss": "https://server.example.com",
"jti": "a-123",
"sub": "24400320",
@@ -311,7 +311,7 @@ tests.</p>
"groups": [
"read-only"
]
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -323,9 +323,9 @@ tests.</p>
<p><code>MovieTest.java</code> contains 4 OAuth2 scenarios for different JWT
combinations.</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>package org.superbiz.moviefun;
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.moviefun;
import org.apache.cxf.feature.LoggingFeature;
import org.apache.cxf.jaxrs.client.WebClient;
@@ -441,7 +441,7 @@ public class MoviesTest {
}
}
-}</pre>
+}</code></pre>
</div>
</div>
</div>
Modified: tomee/site/trunk/content/master/examples/multi-jpa-provider-testing.html
URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/master/examples/multi-jpa-provider-testing.html?rev=1879536&r1=1879535&r2=1879536&view=diff
==============================================================================
--- tomee/site/trunk/content/master/examples/multi-jpa-provider-testing.html (original)
+++ tomee/site/trunk/content/master/examples/multi-jpa-provider-testing.html Mon Jul 6 00:40:18 2020
@@ -108,9 +108,9 @@
<div class="paragraph">
<p>Simple POJO class that follows JPA standard</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>import javax.persistence.Entity;
+<pre class="highlight"><code class="language-java" data-lang="java">import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
@@ -134,7 +134,7 @@ public class Person {
public void setName(String name) {
this.name = name;
}
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -145,9 +145,9 @@ public class Person {
<div class="paragraph">
<p>Create and drop Person table</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre><persistence version="2.0"
+<pre class="highlight"><code class="language-xml" data-lang="xml"><persistence version="2.0"
xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
@@ -166,7 +166,7 @@ public class Person {
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
</properties>
</persistence-unit>
-</persistence></pre>
+</persistence></code></pre>
</div>
</div>
</div>
@@ -177,9 +177,9 @@ public class Person {
<div class="paragraph">
<p>The entity manager is injected through cdi and an Object Person is created and inserted into the inmemory database</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>import org.jboss.arquillian.container.test.api.Deployment;
+<pre class="highlight"><code class="language-java" data-lang="java">import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.arquillian.transaction.api.annotation.TransactionMode;
import org.jboss.arquillian.transaction.api.annotation.Transactional;
@@ -219,7 +219,7 @@ public class JPATest {
p.setName("Apache OpenEJB");
em.persist(p);
}
-}</pre>
+}</code></pre>
</div>
</div>
<div class="paragraph">
@@ -242,9 +242,9 @@ public class JPATest {
<div class="paragraph">
<p>When run you should see output similar to the following.</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>-------------------------------------------------------
+<pre class="highlight"><code class="language-console" data-lang="console">-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.superbiz.JPATest
@@ -380,7 +380,7 @@ INFO - Closing DataSource: Default Unman
Results :
-Tests run: 1, Failures: 0, Errors: 0, Skipped: 0</pre>
+Tests run: 1, Failures: 0, Errors: 0, Skipped: 0</code></pre>
</div>
</div>
<div class="paragraph">
Modified: tomee/site/trunk/content/master/examples/myfaces-codi-demo.html
URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/master/examples/myfaces-codi-demo.html?rev=1879536&r1=1879535&r2=1879536&view=diff
==============================================================================
--- tomee/site/trunk/content/master/examples/myfaces-codi-demo.html (original)
+++ tomee/site/trunk/content/master/examples/myfaces-codi-demo.html Mon Jul 6 00:40:18 2020
@@ -105,9 +105,9 @@
</div>
<div class="sect3">
<h4 id="_open">Open:</h4>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>http://localhost:8080/myfaces-codi-demo-8.0.1-SNAPSHOT/</pre>
+<pre class="highlight"><code class="language-java" data-lang="java">http://localhost:8080/myfaces-codi-demo-8.0.1-SNAPSHOT/</code></pre>
</div>
</div>
<div class="paragraph">
Modified: tomee/site/trunk/content/master/examples/persistence-fragment.html
URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/master/examples/persistence-fragment.html?rev=1879536&r1=1879535&r2=1879536&view=diff
==============================================================================
--- tomee/site/trunk/content/master/examples/persistence-fragment.html (original)
+++ tomee/site/trunk/content/master/examples/persistence-fragment.html Mon Jul 6 00:40:18 2020
@@ -110,9 +110,9 @@
<div class="sect1">
<h2 id="_movie">Movie</h2>
<div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>package org.superbiz.injection.jpa;
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.injection.jpa;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
@@ -164,7 +164,7 @@ public class Movie {
public void setYear(int year) {
this.year = year;
}
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -187,9 +187,9 @@ public class Movie {
<div class="sect1">
<h2 id="_moviestest">MoviesTest</h2>
<div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>package org.superbiz.injection.jpa;
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.injection.jpa;
import org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory;
import org.junit.Test;
@@ -221,7 +221,7 @@ public class MoviesTest {
container.close();
}
-}</pre>
+}</code></pre>
</div>
</div>
</div>
Modified: tomee/site/trunk/content/master/examples/pojo-webservice.html
URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/master/examples/pojo-webservice.html?rev=1879536&r1=1879535&r2=1879536&view=diff
==============================================================================
--- tomee/site/trunk/content/master/examples/pojo-webservice.html (original)
+++ tomee/site/trunk/content/master/examples/pojo-webservice.html Mon Jul 6 00:40:18 2020
@@ -113,9 +113,9 @@ sample you can use the tomee maven plugi
<div class="paragraph">
<p>Expose a servlet for the webservice</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre><web-app xmlns="http://java.sun.com/xml/ns/javaee"
+<pre class="highlight"><code class="language-xml" data-lang="xml"><web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
@@ -127,7 +127,7 @@ sample you can use the tomee maven plugi
<servlet-name>ws</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
-</web-app></pre>
+</web-app></code></pre>
</div>
</div>
</div>
@@ -140,9 +140,9 @@ sample you can use the tomee maven plugi
operation ws(), also WebServiceContext and UserTransaction are injected
in the class and used in the operation.</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>import javax.annotation.Resource;
+<pre class="highlight"><code class="language-java" data-lang="java">import javax.annotation.Resource;
import javax.jws.WebService;
import javax.transaction.UserTransaction;
import javax.xml.ws.WebServiceContext;
@@ -168,7 +168,7 @@ public class PojoWS implements WS {
public void setUserTransaction(UserTransaction userTransaction) {
this.userTransaction = userTransaction;
}
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -180,15 +180,15 @@ public class PojoWS implements WS {
<p>Having an endpoint interface is not required, but it can make testing
and using the web service from other Java clients far easier.</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>import javax.jws.WebService;
+<pre class="highlight"><code class="language-java" data-lang="java">import javax.jws.WebService;
@WebService
public interface WS {
String ws();
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -200,9 +200,9 @@ public interface WS {
<p>The wsdl for our service is autmatically created for us and available at
<code><a href="http://127.0.0.1:8080/pojo-webservice?wsdl" class="bare">http://127.0.0.1:8080/pojo-webservice?wsdl</a></code>.</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre><?xml version='1.0' encoding='UTF-8'?><wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://pojo.ws.superbiz.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" name="PojoWSService" targetNamespace="http://pojo.ws.superbiz.org/">
+<pre class="highlight"><code class="language-xml" data-lang="xml"><?xml version='1.0' encoding='UTF-8'?><wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://pojo.ws.superbiz.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" name="PojoWSService" targetNamespace="http://pojo.ws.superbiz.org/">
<wsdl:types>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://pojo.ws.superbiz.org/" elementFormDefault="unqualified" targetNamespace="http://pojo.ws.superbiz.org/" version="1.0">
@@ -254,7 +254,7 @@ public interface WS {
<wsdl:port binding="tns:PojoWSServiceSoapBinding" name="PojoWSPort">
<soap:address location="http://localhost:8080/pojo-webservice"/>
</wsdl:port>
-</wsdl:service></pre>
+</wsdl:service></code></pre>
</div>
</div>
</div>
@@ -271,28 +271,28 @@ the following request for the ws operati
<div class="paragraph">
<p>Request SOAP message:</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pojo="http://pojo.ws.superbiz.org/">
+<pre class="highlight"><code class="language-xml" data-lang="xml"><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pojo="http://pojo.ws.superbiz.org/">
<soapenv:Header/>
<soapenv:Body>
<pojo:ws/>
</soapenv:Body>
-</soapenv:Envelope></pre>
+</soapenv:Envelope></code></pre>
</div>
</div>
<div class="paragraph">
<p>Response SOAP message:</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
+<pre class="highlight"><code class="language-xml" data-lang="xml"><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns2:wsResponse xmlns:ns2="http://pojo.ws.superbiz.org/">
<return>org.apache.cxf.jaxws.context.WebServiceContextImpl@94b724d &amp; org.apache.openejb.resource.GeronimoTransactionManagerFactory$DestroyableTransactionManager@5fe405bf</return>
</ns2:wsResponse>
</soap:Body>
-</soap:Envelope></pre>
+</soap:Envelope></code></pre>
</div>
</div>
<div class="paragraph">
@@ -312,9 +312,9 @@ command run from the `pojo-webservice' d
<div class="paragraph">
<p>When run you should see output similar to the following.</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>26-Dec-2018 21:20:55.667 INFO [main] sun.reflect.NativeMethodAccessorImpl.invoke Server version: Apache Tomcat (TomEE)/9.0.12 (8.0.0-SNAPSHOT)
+<pre class="highlight"><code class="language-java" data-lang="java">26-Dec-2018 21:20:55.667 INFO [main] sun.reflect.NativeMethodAccessorImpl.invoke Server version: Apache Tomcat (TomEE)/9.0.12 (8.0.0-SNAPSHOT)
26-Dec-2018 21:20:55.668 INFO [main] sun.reflect.NativeMethodAccessorImpl.invoke Server built: Sep 4 2018 22:13:41 UTC
26-Dec-2018 21:20:55.668 INFO [main] sun.reflect.NativeMethodAccessorImpl.invoke Server number: 9.0.12.0
26-Dec-2018 21:20:55.668 INFO [main] sun.reflect.NativeMethodAccessorImpl.invoke OS Name: Linux
@@ -400,7 +400,7 @@ command run from the `pojo-webservice' d
26-Dec-2018 21:20:58.423 INFO [main] org.apache.catalina.core.StandardContext.setClassLoaderProperty Unable to set the web application class loader property [skipMemoryLeakChecksOnJvmShutdown] to [false] as the property does not exist.
26-Dec-2018 21:20:58.438 INFO [main] sun.reflect.DelegatingMethodAccessorImpl.invoke Starting ProtocolHandler ["http-nio-8080"]
26-Dec-2018 21:20:58.456 INFO [main] sun.reflect.DelegatingMethodAccessorImpl.invoke Starting ProtocolHandler ["ajp-nio-8009"]
-26-Dec-2018 21:20:58.463 INFO [main] sun.reflect.DelegatingMethodAccessorImpl.invoke Server startup in 1681 ms</pre>
+26-Dec-2018 21:20:58.463 INFO [main] sun.reflect.DelegatingMethodAccessorImpl.invoke Server startup in 1681 ms</code></pre>
</div>
</div>
<div class="sect2">
@@ -414,9 +414,9 @@ code. Thatâs the benefit of having
<p>If we look at the jar built by maven, weâll see the application itself
is quite small:</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>$ jar tvf target/pojo-webservice.war
+<pre class="highlight"><code class="language-java" data-lang="java">$ jar tvf target/pojo-webservice.war
99 Wed Dec 26 21:08:26 CET 2018 META-INF/MANIFEST.MF
0 Wed Dec 26 21:08:26 CET 2018 META-INF/
0 Wed Dec 26 21:08:26 CET 2018 WEB-INF/
@@ -429,7 +429,7 @@ is quite small:</p>
207 Wed Dec 26 21:08:24 CET 2018 WEB-INF/classes/org/superbiz/ws/pojo/WS.class
1349 Wed Dec 26 17:41:54 CET 2018 WEB-INF/web.xml
3661 Wed Dec 26 17:41:54 CET 2018 META-INF/maven/org.superbiz/pojo-webservice/pom.xml
-102 Wed Dec 26 21:08:26 CET 2018 META-INF/maven/org.superbiz/pojo-webservice/pom.properties</pre>
+102 Wed Dec 26 21:08:26 CET 2018 META-INF/maven/org.superbiz/pojo-webservice/pom.properties</code></pre>
</div>
</div>
<div class="paragraph">
Modified: tomee/site/trunk/content/master/examples/quartz-app.html
URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/master/examples/quartz-app.html?rev=1879536&r1=1879535&r2=1879536&view=diff
==============================================================================
--- tomee/site/trunk/content/master/examples/quartz-app.html (original)
+++ tomee/site/trunk/content/master/examples/quartz-app.html Mon Jul 6 00:40:18 2020
@@ -127,9 +127,9 @@ jars that would be inside the `.rar</cod
file is added to the project in <code>src/main/resources/META-INF/ra.xml</code>
where it will be visible to other modules.</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>quartz-app
+<pre class="highlight"><code class="language-java" data-lang="java">quartz-app
quartz-app/pom.xml
quartz-app/quartz-beans
quartz-app/quartz-beans/pom.xml
@@ -142,7 +142,7 @@ quartz-app/quartz-beans/src/test/java/or
quartz-app/quartz-ra
quartz-app/quartz-ra/pom.xml
quartz-app/quartz-ra/src/main/resources/META-INF
-quartz-app/quartz-ra/src/main/resources/META-INF/ra.xml</pre>
+quartz-app/quartz-ra/src/main/resources/META-INF/ra.xml</code></pre>
</div>
</div>
<div class="sect2">
@@ -157,9 +157,9 @@ driven beans (MDBs)</p>
into any component via <code>@Resource</code> and used to originate and send
messages or events.</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre><connector xmlns="http://java.sun.com/xml/ns/j2ee"
+<pre class="highlight"><code class="language-xml" data-lang="xml"><connector xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd"
@@ -187,7 +187,7 @@ messages or events.</p>
</inbound-resourceadapter>
</resourceadapter>
-</connector></pre>
+</connector></code></pre>
</div>
</div>
</div>
@@ -200,9 +200,9 @@ messages or events.</p>
<p>Here we see the outbound resource adapter used in a stateless session
bean to schedule a job that will be executed by the MDB</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>package org.superbiz.quartz;
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.quartz;
import org.apache.openejb.resource.quartz.QuartzResourceAdapter;
import org.quartz.Job;
@@ -241,7 +241,7 @@ public class JobBean implements JobSched
System.out.println("This is a simple test job to get: " + context.getJobDetail().getJobDataMap().get("MyJobKey"));
}
}
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -249,9 +249,9 @@ public class JobBean implements JobSched
<div class="sect1">
<h2 id="_recieving_data_from_the_inbound_resource_adapter">Recieving data from the Inbound Resource Adapter</h2>
<div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>package org.superbiz.quartz;
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.quartz;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
@@ -268,7 +268,7 @@ public class QuartzMdb implements Job {
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
System.out.println("Executing Job");
}
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -276,9 +276,9 @@ public class QuartzMdb implements Job {
<div class="sect1">
<h2 id="_test_case">Test case</h2>
<div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>package org.superbiz.quartz;
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.quartz;
import org.junit.AfterClass;
import org.junit.BeforeClass;
@@ -326,7 +326,7 @@ public class QuartzMdbTest {
// Sleep 3 seconds and give quartz a chance to execute our MDB
Thread.sleep(3000);
}
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -334,9 +334,9 @@ public class QuartzMdbTest {
<div class="sect1">
<h2 id="_running">Running</h2>
<div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>-------------------------------------------------------
+<pre class="highlight"><code class="language-console" data-lang="console">-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.superbiz.quartz.QuartzMdbTest
@@ -377,7 +377,7 @@ Tests run: 2, Failures: 0, Errors: 0, Sk
Results :
-Tests run: 2, Failures: 0, Errors: 0, Skipped: 0</pre>
+Tests run: 2, Failures: 0, Errors: 0, Skipped: 0</code></pre>
</div>
</div>
</div>
Modified: tomee/site/trunk/content/master/examples/realm-in-tomee.html
URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/master/examples/realm-in-tomee.html?rev=1879536&r1=1879535&r2=1879536&view=diff
==============================================================================
--- tomee/site/trunk/content/master/examples/realm-in-tomee.html (original)
+++ tomee/site/trunk/content/master/examples/realm-in-tomee.html Mon Jul 6 00:40:18 2020
@@ -101,9 +101,9 @@
<div class="paragraph">
<p>To test it:</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>mvn clean package tomee:run</pre>
+<pre class="highlight"><code class="language-java" data-lang="java">mvn clean package tomee:run</code></pre>
</div>
</div>
</div>
@@ -114,24 +114,24 @@
<div class="paragraph">
<p>A datasource is defined in tomee.xml:</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre><Resource id="myDataSource" type="DataSource" /> <!-- standard properties --></pre>
+<pre class="highlight"><code class="language-xml" data-lang="xml"><Resource id="myDataSource" type="DataSource" /> <!-- standard properties --></code></pre>
</div>
</div>
<div class="paragraph">
<p>Then this datasource is referenced in server.xml:</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre><Realm
+<pre class="highlight"><code class="language-xml" data-lang="xml"><Realm
className="org.apache.catalina.realm.DataSourceRealm"
dataSourceName="myDataSource"
userTable="users"
userNameCol="user_name"
userCredCol="user_pass"
userRoleTable="user_roles"
- roleNameCol="role_name"/></pre>
+ roleNameCol="role_name"/></code></pre>
</div>
</div>
<div class="paragraph">
Modified: tomee/site/trunk/content/master/examples/reload-persistence-unit-properties.html
URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/master/examples/reload-persistence-unit-properties.html?rev=1879536&r1=1879535&r2=1879536&view=diff
==============================================================================
--- tomee/site/trunk/content/master/examples/reload-persistence-unit-properties.html (original)
+++ tomee/site/trunk/content/master/examples/reload-persistence-unit-properties.html Mon Jul 6 00:40:18 2020
@@ -143,9 +143,9 @@ queries that one is enough to do the sam
<div class="paragraph">
<p>In the ouput we find the 3 parts described just before.</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>INFO - TEST, data initialization
+<pre class="highlight"><code class="language-java" data-lang="java">INFO - TEST, data initialization
DEBUG - <t 1523828380, conn 93608538> executing stmnt 1615782385 CREATE TABLE Person (id BIGINT NOT NULL, name VARCHAR(255), PRIMARY KEY (id))
DEBUG - <t 1523828380, conn 93608538> [1 ms] spent
DEBUG - <t 1523828380, conn 1506565411> executing prepstmnt 668144844 INSERT INTO Person (id, name) VALUES (?, ?) [params=?, ?]
@@ -166,7 +166,7 @@ INFO - TEST, queries without cache done
INFO - TEST, doing some queries with cache
DEBUG - <t 1523828380, conn 1506565411> executing prepstmnt 1532943889 SELECT t0.name FROM Person t0 WHERE t0.id = ? [params=?]
DEBUG - <t 1523828380, conn 1506565411> [0 ms] spent
-INFO - TEST, queries with cache done</pre>
+INFO - TEST, queries with cache done</code></pre>
</div>
</div>
</div>
Modified: tomee/site/trunk/content/master/examples/resources-declared-in-webapp.html
URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/master/examples/resources-declared-in-webapp.html?rev=1879536&r1=1879535&r2=1879536&view=diff
==============================================================================
--- tomee/site/trunk/content/master/examples/resources-declared-in-webapp.html (original)
+++ tomee/site/trunk/content/master/examples/resources-declared-in-webapp.html Mon Jul 6 00:40:18 2020
@@ -106,9 +106,9 @@ right to edit this page.</em></p>
<div class="sect1">
<h2 id="_manager">Manager</h2>
<div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>package org.superbiz.bean;
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.bean;
import org.superbiz.resource.ManagerResource;
@@ -123,7 +123,7 @@ public class Manager {
public String work() {
return "manage a resource of type " + resource.resourceType();
}
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -131,15 +131,15 @@ public class Manager {
<div class="sect1">
<h2 id="_managerresource">ManagerResource</h2>
<div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>package org.superbiz.resource;
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.resource;
public class ManagerResource {
public String resourceType() {
return "team";
}
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -147,9 +147,9 @@ public class ManagerResource {
<div class="sect1">
<h2 id="_managerservlet">ManagerServlet</h2>
<div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>package org.superbiz.servlet;
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.servlet;
import org.superbiz.bean.Manager;
@@ -169,7 +169,7 @@ public class ManagerServlet extends Http
protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
resp.getOutputStream().print(manager.work());
}
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -177,9 +177,9 @@ public class ManagerServlet extends Http
<div class="sect1">
<h2 id="_ejb_jar_xml">ejb-jar.xml</h2>
<div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre><!--
+<pre class="highlight"><code class="language-xml" data-lang="xml"><!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
@@ -195,7 +195,7 @@ public class ManagerServlet extends Http
See the License for the specific language governing permissions and
limitations under the License.
-->
-<ejb-jar/></pre>
+<ejb-jar/></code></pre>
</div>
</div>
</div>
@@ -203,13 +203,13 @@ public class ManagerServlet extends Http
<div class="sect1">
<h2 id="_service_jar_xml">service-jar.xml</h2>
<div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre><ServiceJar>
+<pre class="highlight"><code class="language-xml" data-lang="xml"><ServiceJar>
<ServiceProvider id="ManagerResource" service="Resource"
type="org.superbiz.resource.ManagerResource"
class-name="org.superbiz.resource.ManagerResource"/>
-</ServiceJar></pre>
+</ServiceJar></code></pre>
</div>
</div>
</div>
@@ -217,11 +217,11 @@ public class ManagerServlet extends Http
<div class="sect1">
<h2 id="_resources_xml">resources.xml</h2>
<div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre><resources>
+<pre class="highlight"><code class="language-xml" data-lang="xml"><resources>
<Resource id="My Manager Team" type="org.superbiz.resource.ManagerResource" provider="org.superbiz#ManagerResource"/>
-</resources></pre>
+</resources></code></pre>
</div>
</div>
</div>
@@ -229,9 +229,9 @@ public class ManagerServlet extends Http
<div class="sect1">
<h2 id="_web_xml">web.xml</h2>
<div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre><!--
+<pre class="highlight"><code class="language-xml" data-lang="xml"><!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -249,7 +249,7 @@ public class ManagerServlet extends Http
limitations under the License.
-->
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"/></pre>
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"/></code></pre>
</div>
</div>
</div>
Modified: tomee/site/trunk/content/master/examples/resources-jmx-example.html
URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/master/examples/resources-jmx-example.html?rev=1879536&r1=1879535&r2=1879536&view=diff
==============================================================================
--- tomee/site/trunk/content/master/examples/resources-jmx-example.html (original)
+++ tomee/site/trunk/content/master/examples/resources-jmx-example.html Mon Jul 6 00:40:18 2020
@@ -119,9 +119,9 @@ particular instance, as the application
resource as an MBean, the resource class needs to follow the MBean
specification.</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>public class Hello implements HelloMBean {
+<pre class="highlight"><code class="language-java" data-lang="java">public class Hello implements HelloMBean {
private AtomicInteger count = new AtomicInteger(0);
@@ -160,7 +160,7 @@ public interface HelloMBean {
public void increment();
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -173,9 +173,9 @@ public interface HelloMBean {
resource, the application provides a single class with a create() method
that takes care of this logic for us.</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>public class JMXBeanCreator {
+<pre class="highlight"><code class="language-java" data-lang="java">public class JMXBeanCreator {
private static Logger LOGGER = Logger.getLogger(JMXBeanCreator.class.getName());
private Properties properties;
@@ -252,7 +252,7 @@ that takes care of this logic for us.</p
public void setProperties(final Properties properties) {
this.properties = properties;
}
-}</pre>
+}</code></pre>
</div>
</div>
<div class="paragraph">
@@ -270,15 +270,15 @@ under.</p>
<div class="paragraph">
<p>The resource can be defined in <code>META-INF/resources.xml</code> as follows:</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre><Resources>
+<pre class="highlight"><code class="language-xml" data-lang="xml"><Resources>
<Resource id="Hello" class-name="org.superbiz.resource.jmx.factory.JMXBeanCreator" factory-name="create">
code org.superbiz.resource.jmx.resources.Hello
name superbiz.test:name=Hello
count 12345
</Resource>
-</Resources></pre>
+</Resources></code></pre>
</div>
</div>
<div class="paragraph">
@@ -295,9 +295,9 @@ JNDI tree the factory is no longer used.
<p>The test case for this example demonstrates injection into an EJB as one
way of accessing the resource, and also accessing the resource via JMX.</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>@RunWith(Arquillian.class)
+<pre class="highlight"><code class="language-java" data-lang="java">@RunWith(Arquillian.class)
public class JMXTest {
@EJB
@@ -372,7 +372,7 @@ public class JMXTest {
return helloMBean.getCount();
}
}
-}</pre>
+}</code></pre>
</div>
</div>
<div class="paragraph">
@@ -461,9 +461,9 @@ effectively force a lazily loaded resour
application is starting - in the same way that the
<code>InitializeAfterDeployment</code> property does.</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>public class Alternative implements AlternativeMBean {
+<pre class="highlight"><code class="language-java" data-lang="java">public class Alternative implements AlternativeMBean {
private static Logger LOGGER = Logger.getLogger(Alternative.class.getName());
private Properties properties;
@@ -557,7 +557,7 @@ application is starting - in the same wa
public void increment() {
count++;
}
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -572,9 +572,9 @@ install' command run from the `resources
<div class="paragraph">
<p>When run you should see output similar to the following.</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>-------------------------------------------------------
+<pre class="highlight"><code class="language-console" data-lang="console">-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.superbiz.resource.jmx.JMXTest
@@ -932,16 +932,16 @@ INFO: Destroying ProtocolHandler ["ajp-b
Results :
-Tests run: 1, Failures: 0, Errors: 0, Skipped: 0</pre>
+Tests run: 1, Failures: 0, Errors: 0, Skipped: 0</code></pre>
</div>
</div>
<div class="paragraph">
<p>Note the following lines showing the creation of the resource.</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>Apr 15, 2015 12:40:24 PM org.apache.openejb.config.ConfigurationFactory configureService
-INFO: Configuring Service(id=jmx/Hello, type=Resource, provider-id=jmx/Hello)</pre>
+<pre class="highlight"><code class="language-java" data-lang="java">Apr 15, 2015 12:40:24 PM org.apache.openejb.config.ConfigurationFactory configureService
+INFO: Configuring Service(id=jmx/Hello, type=Resource, provider-id=jmx/Hello)</code></pre>
</div>
</div>
</div>
Modified: tomee/site/trunk/content/master/examples/rest-applicationcomposer-mockito.html
URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/master/examples/rest-applicationcomposer-mockito.html?rev=1879536&r1=1879535&r2=1879536&view=diff
==============================================================================
--- tomee/site/trunk/content/master/examples/rest-applicationcomposer-mockito.html (original)
+++ tomee/site/trunk/content/master/examples/rest-applicationcomposer-mockito.html Mon Jul 6 00:40:18 2020
@@ -111,9 +111,9 @@
<div class="paragraph">
<p>The REST service example is defined by the following class:</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>@Singleton
+<pre class="highlight"><code class="language-java" data-lang="java">@Singleton
@Path("/greeting")
public class GreetingService {
@@ -124,7 +124,7 @@ public class GreetingService {
public String message() {
return messager.message();
}
-}</pre>
+}</code></pre>
</div>
</div>
<div class="paragraph">
@@ -133,12 +133,12 @@ public class GreetingService {
<div class="paragraph">
<p><code>Messager</code> functionality is defined by this interface:</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>public interface Messager {
+<pre class="highlight"><code class="language-java" data-lang="java">public interface Messager {
String message();
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -149,9 +149,9 @@ public class GreetingService {
<div class="paragraph">
<p>For testing this REST service, Application Composer will be used in combination with Mockito:</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>@RunWith(ApplicationComposer.class)
+<pre class="highlight"><code class="language-java" data-lang="java">@RunWith(ApplicationComposer.class)
public class GreetingServiceTest {
@Mock
@@ -181,7 +181,7 @@ public class GreetingServiceTest {
final String message = IO.slurp(new URL("http://localhost:4204/GreetingServiceTest/greeting/"));
assertEquals("mockito", message);
}
-}</pre>
+}</code></pre>
</div>
</div>
<div class="paragraph">