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 [7/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/s...
Modified: tomee/site/trunk/content/latest/examples/jsonb-configuration.html
URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/latest/examples/jsonb-configuration.html?rev=1879536&r1=1879535&r2=1879536&view=diff
==============================================================================
--- tomee/site/trunk/content/latest/examples/jsonb-configuration.html (original)
+++ tomee/site/trunk/content/latest/examples/jsonb-configuration.html Mon Jul 6 00:40:18 2020
@@ -114,9 +114,9 @@ JsonbConfig offers many configurations.<
<a href="http://localhost:8080/jsonb-configuration/api/users" class="bare">http://localhost:8080/jsonb-configuration/api/users</a> that should respond
with the following json:</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>[
+<pre class="highlight"><code class="language-java" data-lang="java">[
{
"Id":1,
"Name":"user 1",
@@ -127,7 +127,7 @@ with the following json:</p>
"Name":"user 2",
"Registration":"2018-12-28"
}
-]</pre>
+]</code></pre>
</div>
</div>
</div>
@@ -139,15 +139,15 @@ with the following json:</p>
<p>JAXRS entry point class, as follows jaxrs will load all the annotated
@Path classes and methods without specifying them.</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>import javax.ws.rs.ApplicationPath;
+<pre class="highlight"><code class="language-java" data-lang="java">import javax.ws.rs.ApplicationPath;
import javax.ws.rs.core.Application;
@ApplicationPath("api")
public class JAXRSApplication extends Application {
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -158,9 +158,9 @@ public class JAXRSApplication extends Ap
<div class="paragraph">
<p>Simple jaxrs class with a GET endpoint</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>import java.util.ArrayList;
+<pre class="highlight"><code class="language-java" data-lang="java">import java.util.ArrayList;
import java.util.List;
import javax.ejb.Stateless;
@@ -188,7 +188,7 @@ public class UserService {
return users;
}
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -200,9 +200,9 @@ public class UserService {
<p>Implementing ContextResolver<> you can customize jaxrs defaults, in this
example we are going to customize JSONB serialization/deserialization</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>import javax.json.bind.Jsonb;
+<pre class="highlight"><code class="language-java" data-lang="java">import javax.json.bind.Jsonb;
import javax.json.bind.JsonbBuilder;
import javax.json.bind.JsonbConfig;
import javax.json.bind.config.PropertyNamingStrategy;
@@ -228,7 +228,7 @@ public class JSONBConfiguration implemen
return jsonb;
}
-}</pre>
+}</code></pre>
</div>
</div>
<div class="paragraph">
@@ -242,9 +242,9 @@ public class JSONBConfiguration implemen
<div class="paragraph">
<p>The test spin up an openejb webapp and invoke the users endpoint</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>import java.io.IOException;
+<pre class="highlight"><code class="language-java" data-lang="java">import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
@@ -283,7 +283,7 @@ public class UserServiceTest {
Assert.assertTrue(message.contains(System.getProperty("line.separator")));
}
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -298,9 +298,9 @@ install' command run from the `jsonb-con
<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.rest.UserServiceTest
@@ -392,7 +392,7 @@ Tests run: 1, Failures: 0, Errors: 0, Sk
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="sect2">
@@ -405,9 +405,9 @@ working REST application.</p>
<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/jsonb-configuration-8.0.0-SNAPSHOT.war
+<pre class="highlight"><code class="language-java" data-lang="java">$ jar tvf target/jsonb-configuration-8.0.0-SNAPSHOT.war
0 Fri Dec 28 19:36:10 CET 2018 META-INF/
134 Fri Dec 28 19:36:08 CET 2018 META-INF/MANIFEST.MF
0 Fri Dec 28 19:36:08 CET 2018 WEB-INF/
@@ -425,7 +425,7 @@ is quite small:</p>
0 Fri Dec 28 19:36:10 CET 2018 META-INF/maven/org.superbiz/
0 Fri Dec 28 19:36:10 CET 2018 META-INF/maven/org.superbiz/jsonb-configuration/
1791 Fri Dec 28 19:10:44 CET 2018 META-INF/maven/org.superbiz/jsonb-configuration/pom.xml
- 128 Fri Dec 28 19:36:08 CET 2018 META-INF/maven/org.superbiz/jsonb-configuration/pom.properties</pre>
+ 128 Fri Dec 28 19:36:08 CET 2018 META-INF/maven/org.superbiz/jsonb-configuration/pom.properties</code></pre>
</div>
</div>
<div class="paragraph">
Modified: tomee/site/trunk/content/latest/examples/jsonb-custom-serializer.html
URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/latest/examples/jsonb-custom-serializer.html?rev=1879536&r1=1879535&r2=1879536&view=diff
==============================================================================
--- tomee/site/trunk/content/latest/examples/jsonb-custom-serializer.html (original)
+++ tomee/site/trunk/content/latest/examples/jsonb-custom-serializer.html Mon Jul 6 00:40:18 2020
@@ -112,9 +112,9 @@ serialization/deserialization with jsonb
<a href="http://localhost:8080/jsonb-custom-serializer/api/users" class="bare">http://localhost:8080/jsonb-custom-serializer/api/users</a> that should
respond with the following json:</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>[
+<pre class="highlight"><code class="language-java" data-lang="java">[
{
"address":{
"addr":"modified - addr1"
@@ -131,7 +131,7 @@ respond with the following json:</p>
"name":"user 2",
"registration":"2018-12-29T18:13:40.028"
}
-]</pre>
+]</code></pre>
</div>
</div>
<div class="paragraph">
@@ -139,26 +139,26 @@ respond with the following json:</p>
<a href="http://localhost:8080/jsonb-custom-serializer/api/users" class="bare">http://localhost:8080/jsonb-custom-serializer/api/users</a> with a body
like:</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>{
+<pre class="highlight"><code class="language-java" data-lang="java">{
"id": 1,
"name": "name1",
"extra": "extra1"
-}</pre>
+}</code></pre>
</div>
</div>
<div class="paragraph">
<p>which respond with the following json:</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>{
+<pre class="highlight"><code class="language-java" data-lang="java">{
"id": 1,
"name": "name1extra1",
"registration": "Sat Dec 29 19:48:05 CET 2018",
"address": null
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -170,15 +170,15 @@ like:</p>
<p>JAXRS entry point class, as follows jaxrs will load all the annotated
@Path classes and methods without specifying them.</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>import javax.ws.rs.ApplicationPath;
+<pre class="highlight"><code class="language-java" data-lang="java">import javax.ws.rs.ApplicationPath;
import javax.ws.rs.core.Application;
@ApplicationPath("api")
public class JAXRSApplication extends Application {
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -189,9 +189,9 @@ public class JAXRSApplication extends Ap
<div class="paragraph">
<p>Simple jaxrs class with a GET and a POST endpoint</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>import java.util.ArrayList;
+<pre class="highlight"><code class="language-java" data-lang="java">import java.util.ArrayList;
import java.util.List;
import javax.ejb.Stateless;
@@ -227,7 +227,7 @@ public class UserService {
// Just to show the deserialization
return u;
}
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -240,9 +240,9 @@ public class UserService {
example we are going to customize JSONB serialization for all objects of
type Address, defined in AddressSerializer class</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>import javax.json.bind.Jsonb;
+<pre class="highlight"><code class="language-java" data-lang="java">import javax.json.bind.Jsonb;
import javax.json.bind.JsonbBuilder;
import javax.json.bind.JsonbConfig;
import javax.ws.rs.ext.ContextResolver;
@@ -264,7 +264,7 @@ public class JSONBConfiguration implemen
return jsonb;
}
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -275,9 +275,9 @@ public class JSONBConfiguration implemen
<div class="paragraph">
<p>Simple Object serializer class that add `modified' during serialization</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>import javax.json.bind.serializer.JsonbSerializer;
+<pre class="highlight"><code class="language-java" data-lang="java">import javax.json.bind.serializer.JsonbSerializer;
import javax.json.bind.serializer.SerializationContext;
import javax.json.stream.JsonGenerator;
@@ -294,7 +294,7 @@ public class AddressSerializer implement
}
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -305,9 +305,9 @@ public class AddressSerializer implement
<div class="paragraph">
<p>Create an object from a json</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>import java.lang.reflect.Type;
+<pre class="highlight"><code class="language-java" data-lang="java">import java.lang.reflect.Type;
import javax.json.JsonObject;
import javax.json.bind.serializer.DeserializationContext;
@@ -330,7 +330,7 @@ public class UserDeserializer implements
return u;
}
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -342,9 +342,9 @@ public class UserDeserializer implements
<p>With the annotation @JsonbTypeDeserializer or @JsonbTypeSerializer you
can notify jsonb to use the custom deserializer</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>import java.util.Date;
+<pre class="highlight"><code class="language-java" data-lang="java">import java.util.Date;
import javax.json.bind.annotation.JsonbTypeDeserializer;
@@ -371,7 +371,7 @@ public class User {
// ... GET/SET
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -382,9 +382,9 @@ public class User {
<div class="paragraph">
<p>The test spin up an openejb webapp and invoke the users endpoint</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>import java.io.IOException;
+<pre class="highlight"><code class="language-java" data-lang="java">import java.io.IOException;
import javax.ws.rs.core.MediaType;
@@ -428,7 +428,7 @@ public class UserServiceTest {
Assert.assertTrue(responseUser.getName().equals("user1" + "extraField"));
}
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -443,9 +443,9 @@ install' command run from the `jsonb-cus
<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.rest.UserServiceTest
@@ -599,7 +599,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 class="sect2">
@@ -612,9 +612,9 @@ working REST application.</p>
<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/jsonb-custom-serializer-8.0.0-SNAPSHOT.war
+<pre class="highlight"><code class="language-java" data-lang="java">$ jar tvf target/jsonb-custom-serializer-8.0.0-SNAPSHOT.war
0 Sat Dec 29 19:10:44 CET 2018 META-INF/
134 Sat Dec 29 19:10:42 CET 2018 META-INF/MANIFEST.MF
0 Sat Dec 29 19:10:42 CET 2018 WEB-INF/
@@ -635,7 +635,7 @@ is quite small:</p>
0 Sat Dec 29 19:10:44 CET 2018 META-INF/maven/org.superbiz/
0 Sat Dec 29 19:10:44 CET 2018 META-INF/maven/org.superbiz/jsonb-custom-serializer/
1811 Sat Dec 29 17:53:36 CET 2018 META-INF/maven/org.superbiz/jsonb-custom-serializer/pom.xml
- 132 Sat Dec 29 19:10:42 CET 2018 META-INF/maven/org.superbiz/jsonb-custom-serializer/pom.properties</pre>
+ 132 Sat Dec 29 19:10:42 CET 2018 META-INF/maven/org.superbiz/jsonb-custom-serializer/pom.properties</code></pre>
</div>
</div>
<div class="paragraph">
Modified: tomee/site/trunk/content/latest/examples/lookup-of-ejbs-with-descriptor.html
URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/latest/examples/lookup-of-ejbs-with-descriptor.html?rev=1879536&r1=1879535&r2=1879536&view=diff
==============================================================================
--- tomee/site/trunk/content/latest/examples/lookup-of-ejbs-with-descriptor.html (original)
+++ tomee/site/trunk/content/latest/examples/lookup-of-ejbs-with-descriptor.html Mon Jul 6 00:40:18 2020
@@ -106,9 +106,9 @@ right to edit this page.</em></p>
<div class="sect1">
<h2 id="_bluebean">BlueBean</h2>
<div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>package org.superbiz.ejblookup;
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.ejblookup;
import javax.ejb.EJBException;
import javax.naming.InitialContext;
@@ -129,7 +129,7 @@ public class BlueBean implements Friend
throw new EJBException(e);
}
}
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -137,9 +137,9 @@ public class BlueBean implements Friend
<div class="sect1">
<h2 id="_friend">Friend</h2>
<div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>package org.superbiz.ejblookup;
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.ejblookup;
/**
* This is an EJB 3 local business interface
@@ -154,7 +154,7 @@ public interface Friend {
public String sayHello();
public String helloFromFriend();
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -162,9 +162,9 @@ public interface Friend {
<div class="sect1">
<h2 id="_redbean">RedBean</h2>
<div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>package org.superbiz.ejblookup;
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.ejblookup;
import javax.ejb.EJBException;
import javax.naming.InitialContext;
@@ -185,7 +185,7 @@ public class RedBean implements Friend {
throw new EJBException(e);
}
}
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -193,9 +193,9 @@ public class RedBean implements Friend {
<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><ejb-jar xmlns="http://java.sun.com/xml/ns/javaee">
+<pre class="highlight"><code class="language-xml" data-lang="xml"><ejb-jar xmlns="http://java.sun.com/xml/ns/javaee">
<!-- Notice this changes the global jndi name -->
<module-name>wombat</module-name>
@@ -229,7 +229,7 @@ public class RedBean implements Friend {
</session>
</enterprise-beans>
-</ejb-jar></pre>
+</ejb-jar></code></pre>
</div>
</div>
</div>
@@ -237,9 +237,9 @@ public class RedBean implements Friend {
<div class="sect1">
<h2 id="_ejbdependencytest">EjbDependencyTest</h2>
<div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>package org.superbiz.ejblookup;
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.ejblookup;
import junit.framework.TestCase;
@@ -272,7 +272,7 @@ public class EjbDependencyTest extends T
assertEquals("Blue says, Hello!", blue.sayHello());
assertEquals("My friend Red says, Hello!", blue.helloFromFriend());
}
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -280,9 +280,9 @@ public class EjbDependencyTest extends T
<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.ejblookup.EjbDependencyTest
@@ -320,7 +320,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/latest/examples/lookup-of-ejbs.html
URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/latest/examples/lookup-of-ejbs.html?rev=1879536&r1=1879535&r2=1879536&view=diff
==============================================================================
--- tomee/site/trunk/content/latest/examples/lookup-of-ejbs.html (original)
+++ tomee/site/trunk/content/latest/examples/lookup-of-ejbs.html Mon Jul 6 00:40:18 2020
@@ -106,9 +106,9 @@ right to edit this page.</em></p>
<div class="sect1">
<h2 id="_bluebean">BlueBean</h2>
<div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>package org.superbiz.ejblookup;
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.ejblookup;
import javax.ejb.EJB;
import javax.ejb.EJBException;
@@ -133,7 +133,7 @@ public class BlueBean implements Friend
throw new EJBException(e);
}
}
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -141,9 +141,9 @@ public class BlueBean implements Friend
<div class="sect1">
<h2 id="_friend">Friend</h2>
<div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>package org.superbiz.ejblookup;
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.ejblookup;
import javax.ejb.Local;
@@ -161,7 +161,7 @@ public interface Friend {
public String sayHello();
public String helloFromFriend();
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -169,9 +169,9 @@ public interface Friend {
<div class="sect1">
<h2 id="_redbean">RedBean</h2>
<div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>package org.superbiz.ejblookup;
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.ejblookup;
import javax.ejb.EJB;
import javax.ejb.EJBException;
@@ -196,7 +196,7 @@ public class RedBean implements Friend {
throw new EJBException(e);
}
}
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -204,9 +204,9 @@ public class RedBean implements Friend {
<div class="sect1">
<h2 id="_ejbdependencytest">EjbDependencyTest</h2>
<div class="sectionbody">
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>package org.superbiz.ejblookup;
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.ejblookup;
import junit.framework.TestCase;
@@ -239,7 +239,7 @@ public class EjbDependencyTest extends T
assertEquals("Blue says, Hello!", blue.sayHello());
assertEquals("My friend Red says, Hello!", blue.helloFromFriend());
}
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -247,9 +247,9 @@ public class EjbDependencyTest extends T
<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.ejblookup.EjbDependencyTest
@@ -287,7 +287,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/latest/examples/mbean-auto-registration.html
URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/latest/examples/mbean-auto-registration.html?rev=1879536&r1=1879535&r2=1879536&view=diff
==============================================================================
--- tomee/site/trunk/content/latest/examples/mbean-auto-registration.html (original)
+++ tomee/site/trunk/content/latest/examples/mbean-auto-registration.html Mon Jul 6 00:40:18 2020
@@ -109,14 +109,14 @@ TomEE features.</p>
<div class="paragraph">
<p>To be able to use it you need to import the mbean api (annotations):</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre><dependency>
+<pre class="highlight"><code class="language-xml" data-lang="xml"><dependency>
<groupId>org.apache.openejb</groupId>
<artifactId>mbean-annotation-api</artifactId>
<version>4.5.0</version>
<scope>provided</scope>
-</dependency></pre>
+</dependency></code></pre>
</div>
</div>
</div>
@@ -130,9 +130,9 @@ TomEE features.</p>
<div class="paragraph">
<p>It allows the user to change the value too.</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>package org.superbiz.mbean;
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.mbean;
import javax.management.Description;
import javax.management.MBean;
@@ -162,18 +162,18 @@ public class GuessHowManyMBean {
}
return "not the correct value, please have another try";
}
-}</pre>
+}</code></pre>
</div>
</div>
<div class="paragraph">
<p>To register a MBean you simply have to specify a property either in
system.properties, or in intial context properties.</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>Properties properties = new Properties();
+<pre class="highlight"><code class="language-java" data-lang="java">Properties properties = new Properties();
properties.setProperty("openejb.user.mbeans.list", GuessHowManyMBean.class.getName());
-EJBContainer.createEJBContainer(properties);</pre>
+EJBContainer.createEJBContainer(properties);</code></pre>
</div>
</div>
</div>
@@ -185,9 +185,9 @@ EJBContainer.createEJBContainer(properti
<p>Then simply get the platform server and you can play with parameters and
operations:</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>package org.superbiz.mbean;
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.mbean;
import org.junit.Test;
@@ -221,7 +221,7 @@ public class GuessHowManyMBeanTest {
container.close();
}
-}</pre>
+}</code></pre>
</div>
</div>
<div class="sect2">
@@ -237,9 +237,9 @@ start even if the example has only the m
<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.mbean.GuessHowManyMBeanTest
@@ -274,7 +274,7 @@ Tests run: 1, Failures: 0, Errors: 0, Sk
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>
Modified: tomee/site/trunk/content/latest/examples/moviefun-rest.html
URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/latest/examples/moviefun-rest.html?rev=1879536&r1=1879535&r2=1879536&view=diff
==============================================================================
--- tomee/site/trunk/content/latest/examples/moviefun-rest.html (original)
+++ tomee/site/trunk/content/latest/examples/moviefun-rest.html Mon Jul 6 00:40:18 2020
@@ -116,9 +116,9 @@ resources. The implementation of method
JAX-RS framework to get information about this application. In the
following example, it defines two resources: LoadRest and MoviesRest.</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 javax.ws.rs.ApplicationPath;
import javax.ws.rs.core.Application;
@@ -134,7 +134,7 @@ public class ApplicationConfig extends A
public Set<Class<?>> getClasses() {
return new HashSet<Class<?>>(Arrays.asList(LoadRest.class, MoviesRest.class));
}
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -147,9 +147,9 @@ URL and its sub-URLs. In this case, only
an EJB (MoviesBean) injected to it class for do an initial load of data
in the database.</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;
@@ -174,7 +174,7 @@ public class LoadRest {
moviesBean.addMovie(new Movie("Shanghai Noon", "Tom Dey", "Comedy", 7, 2000));
}
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -186,9 +186,9 @@ annotation @Path and has Java methods fo
movies in JSON format according to the @Produces annotation. Here has a
method for each HTTP method (GET, POST, PUT, DELETE).</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;
@@ -253,7 +253,7 @@ public class MoviesRest {
return service.count(field, searchTerm);
}
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -262,9 +262,9 @@ public class MoviesRest {
<div class="paragraph">
<p>This is the entity Movie that will be persisted by JPA.</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 javax.persistence.Entity;
import javax.persistence.GeneratedValue;
@@ -349,7 +349,7 @@ public class Movie {
public void setRating(int rating) {
this.rating = rating;
}
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -359,9 +359,9 @@ public class Movie {
<p>This is the EJB according to the @Stateless annotation. It uses the unit persistence "movie-unit" for persist
entities movie.</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 javax.ejb.Stateless;
import javax.persistence.EntityManager;
@@ -435,7 +435,7 @@ public class MoviesBean {
public void clean() {
entityManager.createQuery("delete from Movie").executeUpdate();
}
-}</pre>
+}</code></pre>
</div>
</div>
</div>
@@ -454,9 +454,9 @@ run:</p>
<div class="paragraph">
<p>Which should create output like the following.</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>INFO: OpenJPA dynamically loaded a validation provider.
+<pre class="highlight"><code class="language-java" data-lang="java">INFO: OpenJPA dynamically loaded a validation provider.
Dec 18, 2018 1:31:44 PM org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory createDelegate
INFO: PersistenceUnit(name=movie-unit, provider=org.apache.openjpa.persistence.PersistenceProviderImpl) - provider time 36ms
Dec 18, 2018 1:31:44 PM org.apache.openejb.assembler.classic.JndiBuilder bind
@@ -535,7 +535,7 @@ Tests run: 1, Failures: 0, Errors: 0, Sk
Results :
-Tests run: 3, Failures: 0, Errors: 0, Skipped: 0</pre>
+Tests run: 3, Failures: 0, Errors: 0, Skipped: 0</code></pre>
</div>
</div>
</div>
Modified: tomee/site/trunk/content/latest/examples/moviefun.html
URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/latest/examples/moviefun.html?rev=1879536&r1=1879535&r2=1879536&view=diff
==============================================================================
--- tomee/site/trunk/content/latest/examples/moviefun.html (original)
+++ tomee/site/trunk/content/latest/examples/moviefun.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/latest/examples/movies-complete-meta.html
URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/latest/examples/movies-complete-meta.html?rev=1879536&r1=1879535&r2=1879536&view=diff
==============================================================================
--- tomee/site/trunk/content/latest/examples/movies-complete-meta.html (original)
+++ tomee/site/trunk/content/latest/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/latest/examples/movies-complete.html
URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/latest/examples/movies-complete.html?rev=1879536&r1=1879535&r2=1879536&view=diff
==============================================================================
--- tomee/site/trunk/content/latest/examples/movies-complete.html (original)
+++ tomee/site/trunk/content/latest/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/latest/examples/mp-faulttolerance-retry.html
URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/latest/examples/mp-faulttolerance-retry.html?rev=1879536&r1=1879535&r2=1879536&view=diff
==============================================================================
--- tomee/site/trunk/content/latest/examples/mp-faulttolerance-retry.html (original)
+++ tomee/site/trunk/content/latest/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/latest/examples/mp-jsonb-configuration.html
URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/latest/examples/mp-jsonb-configuration.html?rev=1879536&r1=1879535&r2=1879536&view=diff
==============================================================================
--- tomee/site/trunk/content/latest/examples/mp-jsonb-configuration.html (original)
+++ tomee/site/trunk/content/latest/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/latest/examples/mp-metrics-gauge.html
URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/latest/examples/mp-metrics-gauge.html?rev=1879536&view=auto
==============================================================================
--- tomee/site/trunk/content/latest/examples/mp-metrics-gauge.html (added)
+++ tomee/site/trunk/content/latest/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/latest/examples/mp-rest-client.html
URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/latest/examples/mp-rest-client.html?rev=1879536&r1=1879535&r2=1879536&view=diff
==============================================================================
--- tomee/site/trunk/content/latest/examples/mp-rest-client.html (original)
+++ tomee/site/trunk/content/latest/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/latest/examples/mp-rest-jwt-jwk.html
URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/latest/examples/mp-rest-jwt-jwk.html?rev=1879536&r1=1879535&r2=1879536&view=diff
==============================================================================
--- tomee/site/trunk/content/latest/examples/mp-rest-jwt-jwk.html (original)
+++ tomee/site/trunk/content/latest/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/latest/examples/mp-rest-jwt-principal.html
URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/latest/examples/mp-rest-jwt-principal.html?rev=1879536&r1=1879535&r2=1879536&view=diff
==============================================================================
--- tomee/site/trunk/content/latest/examples/mp-rest-jwt-principal.html (original)
+++ tomee/site/trunk/content/latest/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/latest/examples/mp-rest-jwt.html
URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/latest/examples/mp-rest-jwt.html?rev=1879536&r1=1879535&r2=1879536&view=diff
==============================================================================
--- tomee/site/trunk/content/latest/examples/mp-rest-jwt.html (original)
+++ tomee/site/trunk/content/latest/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/latest/examples/multi-jpa-provider-testing.html
URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/latest/examples/multi-jpa-provider-testing.html?rev=1879536&r1=1879535&r2=1879536&view=diff
==============================================================================
--- tomee/site/trunk/content/latest/examples/multi-jpa-provider-testing.html (original)
+++ tomee/site/trunk/content/latest/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/latest/examples/myfaces-codi-demo.html
URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/latest/examples/myfaces-codi-demo.html?rev=1879536&r1=1879535&r2=1879536&view=diff
==============================================================================
--- tomee/site/trunk/content/latest/examples/myfaces-codi-demo.html (original)
+++ tomee/site/trunk/content/latest/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/latest/examples/persistence-fragment.html
URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/latest/examples/persistence-fragment.html?rev=1879536&r1=1879535&r2=1879536&view=diff
==============================================================================
--- tomee/site/trunk/content/latest/examples/persistence-fragment.html (original)
+++ tomee/site/trunk/content/latest/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>