You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@tomee.apache.org by bu...@apache.org on 2019/09/07 20:39:03 UTC

svn commit: r1049792 [1/2] - in /websites/staging/tomee/trunk: cgi-bin/ content/ content/tomee-8.0/examples/

Author: buildbot
Date: Sat Sep  7 20:39:03 2019
New Revision: 1049792

Log:
Staging update by buildbot for tomee

Added:
    websites/staging/tomee/trunk/content/tomee-8.0/examples/async-servlet.html
    websites/staging/tomee/trunk/content/tomee-8.0/examples/cdi-realm.html
    websites/staging/tomee/trunk/content/tomee-8.0/examples/cloud-tomee-azure.html
    websites/staging/tomee/trunk/content/tomee-8.0/examples/concurrency-utils.html
Modified:
    websites/staging/tomee/trunk/cgi-bin/   (props changed)
    websites/staging/tomee/trunk/content/   (props changed)
    websites/staging/tomee/trunk/content/tomee-8.0/examples/async-methods.html
    websites/staging/tomee/trunk/content/tomee-8.0/examples/async-postconstruct.html
    websites/staging/tomee/trunk/content/tomee-8.0/examples/bean-validation-design-by-contract.html
    websites/staging/tomee/trunk/content/tomee-8.0/examples/cdi-session-scope.html
    websites/staging/tomee/trunk/content/tomee-8.0/examples/change-jaxws-url.html
    websites/staging/tomee/trunk/content/tomee-8.0/examples/deltaspike-fullstack.html
    websites/staging/tomee/trunk/content/tomee-8.0/examples/index.html
    websites/staging/tomee/trunk/content/tomee-8.0/examples/jsf-cdi-and-ejb.html
    websites/staging/tomee/trunk/content/tomee-8.0/examples/mp-jwt-bean-validation-strongly-typed.html
    websites/staging/tomee/trunk/content/tomee-8.0/examples/mp-jwt-bean-validation.html
    websites/staging/tomee/trunk/content/tomee-8.0/examples/simple-cdi-interceptor.html
    websites/staging/tomee/trunk/content/tomee-8.0/examples/spring-data-proxy-meta.html
    websites/staging/tomee/trunk/content/tomee-8.0/examples/spring-data-proxy.html

Propchange: websites/staging/tomee/trunk/cgi-bin/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Sat Sep  7 20:39:03 2019
@@ -1 +1 @@
-1866568
+1866569

Propchange: websites/staging/tomee/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Sat Sep  7 20:39:03 2019
@@ -1 +1 @@
-1866568
+1866569

Modified: websites/staging/tomee/trunk/content/tomee-8.0/examples/async-methods.html
==============================================================================
--- websites/staging/tomee/trunk/content/tomee-8.0/examples/async-methods.html (original)
+++ websites/staging/tomee/trunk/content/tomee-8.0/examples/async-methods.html Sat Sep  7 20:39:03 2019
@@ -95,21 +95,78 @@
         <div class="row">
             
             <div class="col-md-12">
-                <p>The @Asynchronous annotation was introduced in EJB 3.1 as a simple way of creating asynchronous processing.</p>
-<p>Every time a method annotated <code>@Asynchronous</code> is invoked by anyone it will immediately return regardless of how long the method actually takes. Each invocation returns a <a href="http://download.oracle.com/javase/6/docs/api/java/util/concurrent/Future.html">Future</a> object that essentially starts out <em>empty</em> and will later have its value filled in by the container when the related method call actually completes. Returning a <code>Future</code> object is not required and <code>@Asynchronous</code> methods can of course return <code>void</code>.</p>
-<h1>Example</h1>
+                <div id="preamble">
+<div class="sectionbody">
+<div class="paragraph">
+<p>The @Asynchronous annotation was introduced in EJB 3.1 as a simple way
+of creating asynchronous processing.</p>
+</div>
+<div class="paragraph">
+<p>Every time a method annotated <code>@Asynchronous</code> is invoked by anyone it
+will immediately return regardless of how long the method actually
+takes. Each invocation returns a
+<a href="http://download.oracle.com/javase/6/docs/api/java/util/concurrent/Future.html">Future</a>
+object that essentially starts out <em>empty</em> and will later have its value
+filled in by the container when the related method call actually
+completes. Returning a <code>Future</code> object is not required and
+<code>@Asynchronous</code> methods can of course return <code>void</code>.</p>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_example">Example</h2>
+<div class="sectionbody">
+<div class="paragraph">
 <p>Here, in <code>JobProcessorTest</code>,</p>
-<p><code>final Future&lt;String&gt; red = processor.addJob(&quot;red&quot;);</code><br/>proceeds to the next statement,</p>
-<p><code>final Future&lt;String&gt; orange = processor.addJob(&quot;orange&quot;);</code></p>
-<p>without waiting for the addJob() method to complete. And later we could ask for the result using the <code>Future&lt;?&gt;.get()</code> method like</p>
-<p><code>assertEquals(&quot;blue&quot;, blue.get());</code></p>
-<p>It waits for the processing to complete (if its not completed already) and gets the result. If you did not care about the result, you could simply have your asynchronous method as a void method.</p>
-<p><a href="http://download.oracle.com/javase/6/docs/api/java/util/concurrent/Future.html">Future</a> Object from docs,</p>
+</div>
+<div class="paragraph">
+<p><code>final Future&lt;String&gt; red = processor.addJob("red");</code> proceeds to the
+next statement,</p>
+</div>
+<div class="paragraph">
+<p><code>final Future&lt;String&gt; orange = processor.addJob("orange");</code></p>
+</div>
+<div class="paragraph">
+<p>without waiting for the <code>addJob()</code> method to complete. And later we could
+ask for the result using the <code>Future&lt;?&gt;.get()</code> method like</p>
+</div>
+<div class="paragraph">
+<p><code>assertEquals("blue", blue.get());</code></p>
+</div>
+<div class="paragraph">
+<p>It waits for the processing to complete (if its not completed already)
+and gets the result. If you did not care about the result, you could
+simply have your asynchronous method as a <code>void</code> method.</p>
+</div>
+<div class="paragraph">
+<p><a href="http://download.oracle.com/javase/6/docs/api/java/util/concurrent/Future.html">Future</a>
+Object from docs,</p>
+</div>
+<div class="quoteblock">
 <blockquote>
-  <p>A Future represents the result of an asynchronous computation. Methods are provided to check if the computation is complete, to wait for its completion, and to retrieve the result of the computation. The result can only be retrieved using method get when the computation has completed, blocking if necessary until it is ready. Cancellation is performed by the cancel method. Additional methods are provided to determine if the task completed normally or was cancelled. Once a computation has completed, the computation cannot be cancelled. If you would like to use a Future for the sake of cancellability but not provide a usable result, you can declare types of the form Future&lt;?&gt; and return null as a result of the underlying task</p>
+<div class="paragraph">
+<p>A Future represents the result of an asynchronous computation. Methods
+are provided to check if the computation is complete, to wait for its
+completion, and to retrieve the result of the computation. The result
+can only be retrieved using method get when the computation has
+completed, blocking if necessary until it is ready. Cancellation is
+performed by the cancel method. Additional methods are provided to
+determine if the task completed normally or was cancelled. Once a
+computation has completed, the computation cannot be cancelled. If you
+would like to use a Future for the sake of cancellability but not
+provide a usable result, you can declare types of the form Future&lt;?&gt; and
+return null as a result of the underlying task</p>
+</div>
 </blockquote>
-<h1>The code</h1>
-<pre><code>@Singleton
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_the_code">The code</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">@Singleton
 public class JobProcessor {
 @Asynchronous
 @Lock(READ)
@@ -131,103 +188,173 @@ private void doSomeHeavyLifting() {
         throw new IllegalStateException(e);
     }
   }
-}
-</code></pre>
-<h1>Test</h1>
-<pre><code>public class JobProcessorTest extends TestCase {
+}</code></pre>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_test">Test</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">public class JobProcessorTest extends TestCase {
 
 public void test() throws Exception {
 
     final Context context = EJBContainer.createEJBContainer().getContext();
 
-    final JobProcessor processor = (JobProcessor) context.lookup(&quot;java:global/async-methods/JobProcessor&quot;);
+    final JobProcessor processor = (JobProcessor) context.lookup("java:global/async-methods/JobProcessor");
 
     final long start = System.nanoTime();
 
     // Queue up a bunch of work
-    final Future&lt;String&gt; red = processor.addJob(&quot;red&quot;);
-    final Future&lt;String&gt; orange = processor.addJob(&quot;orange&quot;);
-    final Future&lt;String&gt; yellow = processor.addJob(&quot;yellow&quot;);
-    final Future&lt;String&gt; green = processor.addJob(&quot;green&quot;);
-    final Future&lt;String&gt; blue = processor.addJob(&quot;blue&quot;);
-    final Future&lt;String&gt; violet = processor.addJob(&quot;violet&quot;);
+    final Future&lt;String&gt; red = processor.addJob("red");
+    final Future&lt;String&gt; orange = processor.addJob("orange");
+    final Future&lt;String&gt; yellow = processor.addJob("yellow");
+    final Future&lt;String&gt; green = processor.addJob("green");
+    final Future&lt;String&gt; blue = processor.addJob("blue");
+    final Future&lt;String&gt; violet = processor.addJob("violet");
 
     // Wait for the result -- 1 minute worth of work
-    assertEquals(&quot;blue&quot;, blue.get());
-    assertEquals(&quot;orange&quot;, orange.get());
-    assertEquals(&quot;green&quot;, green.get());
-    assertEquals(&quot;red&quot;, red.get());
-    assertEquals(&quot;yellow&quot;, yellow.get());
-    assertEquals(&quot;violet&quot;, violet.get());
+    assertEquals("blue", blue.get());
+    assertEquals("orange", orange.get());
+    assertEquals("green", green.get());
+    assertEquals("red", red.get());
+    assertEquals("yellow", yellow.get());
+    assertEquals("violet", violet.get());
 
     // How long did it take?
     final long total = TimeUnit.NANOSECONDS.toSeconds(System.nanoTime() - start);
 
     // Execution should be around 9 - 21 seconds
     // The execution time depends on the number of threads available for asynchronous execution.
-    // In the best case it is 10s plus some minimal processing time. 
-    assertTrue(&quot;Expected &gt; 9 but was: &quot; + total, total &gt; 9);
-    assertTrue(&quot;Expected &lt; 21 but was: &quot; + total, total &lt; 21);
+    // In the best case it is 10s plus some minimal processing time.
+    assertTrue("Expected &gt; 9 but was: " + total, total &gt; 9);
+    assertTrue("Expected &lt; 21 but was: " + total, total &lt; 21);
 
   }
-}
-</code></pre>
-<h1>Running</h1>
-<pre><code>-------------------------------------------------------
+}</code></pre>
+</div>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">-------------------------------------------------------
  T E S T S
 -------------------------------------------------------
 Running org.superbiz.async.JobProcessorTest
-Apache OpenEJB 7.0.0-SNAPSHOT    build: 20110801-04:02
-http://tomee.apache.org/
-INFO - openejb.home = G:\Workspace\fullproject\openejb3\examples\async-methods
-INFO - openejb.base = G:\Workspace\fullproject\openejb3\examples\async-methods
-INFO - Using &#39;javax.ejb.embeddable.EJBContainer=true&#39;
+INFO - ********************************************************************************
+INFO - OpenEJB http://tomee.apache.org/
+INFO - Startup: Wed Feb 27 12:46:11 BRT 2019
+INFO - Copyright 1999-2018 (C) Apache OpenEJB Project, All Rights Reserved.
+INFO - Version: 8.0.0-SNAPSHOT
+INFO - Build date: 20190227
+INFO - Build time: 04:12
+INFO - ********************************************************************************
+INFO - openejb.home = /home/soro/git/apache/tomee/examples/async-methods
+INFO - openejb.base = /home/soro/git/apache/tomee/examples/async-methods
+INFO - Created new singletonService org.apache.openejb.cdi.ThreadSingletonServiceImpl@22f71333
+INFO - Succeeded in installing singleton service
+INFO - Using 'javax.ejb.embeddable.EJBContainer=true'
+INFO - Cannot find the configuration file [conf/openejb.xml].  Will attempt to create one for the beans deployed.
 INFO - Configuring Service(id=Default Security Service, type=SecurityService, provider-id=Default Security Service)
 INFO - Configuring Service(id=Default Transaction Manager, type=TransactionManager, provider-id=Default Transaction Manager)
-INFO - Found EjbModule in classpath: g:\Workspace\fullproject\openejb3\examples\async-methods\target\classes
-INFO - Beginning load: g:\Workspace\fullproject\openejb3\examples\async-methods\target\classes
-INFO - Configuring enterprise application: g:\Workspace\fullproject\openejb3\examples\async-methods
+INFO - Creating TransactionManager(id=Default Transaction Manager)
+INFO - Creating SecurityService(id=Default Security Service)
+INFO - Found EjbModule in classpath: /home/soro/git/apache/tomee/examples/async-methods/target/classes
+INFO - Beginning load: /home/soro/git/apache/tomee/examples/async-methods/target/classes
+INFO - Configuring enterprise application: /home/soro/git/apache/tomee/examples/async-methods
+INFO - Auto-deploying ejb JobProcessor: EjbDeployment(deployment-id=JobProcessor)
 INFO - Configuring Service(id=Default Singleton Container, type=Container, provider-id=Default Singleton Container)
 INFO - Auto-creating a container for bean JobProcessor: Container(type=SINGLETON, id=Default Singleton Container)
+INFO - Creating Container(id=Default Singleton Container)
 INFO - Configuring Service(id=Default Managed Container, type=Container, provider-id=Default Managed Container)
 INFO - Auto-creating a container for bean org.superbiz.async.JobProcessorTest: Container(type=MANAGED, id=Default Managed Container)
-INFO - Enterprise application &quot;g:\Workspace\fullproject\openejb3\examples\async-methods&quot; loaded.
-INFO - Assembling app: g:\Workspace\fullproject\openejb3\examples\async-methods
-INFO - Jndi(name=&quot;java:global/async-methods/JobProcessor!org.superbiz.async.JobProcessor&quot;)
-INFO - Jndi(name=&quot;java:global/async-methods/JobProcessor&quot;)
-INFO - Jndi(name=&quot;java:global/EjbModule100568296/org.superbiz.async.JobProcessorTest!org.superbiz.async.JobProcessorTest&quot;)
-INFO - Jndi(name=&quot;java:global/EjbModule100568296/org.superbiz.async.JobProcessorTest&quot;)
-INFO - Created Ejb(deployment-id=org.superbiz.async.JobProcessorTest, ejb-name=org.superbiz.async.JobProcessorTest, container=Default Managed Container)
+INFO - Creating Container(id=Default Managed Container)
+INFO - Using directory /tmp for stateful session passivation
+INFO - Enterprise application "/home/soro/git/apache/tomee/examples/async-methods" loaded.
+INFO - Assembling app: /home/soro/git/apache/tomee/examples/async-methods
+INFO - Jndi(name="java:global/async-methods/JobProcessor!org.superbiz.async.JobProcessor")
+INFO - Jndi(name="java:global/async-methods/JobProcessor")
+INFO - Existing thread singleton service in SystemInstance(): org.apache.openejb.cdi.ThreadSingletonServiceImpl@22f71333
+INFO - Some Principal APIs could not be loaded: org.eclipse.microprofile.jwt.JsonWebToken out of org.eclipse.microprofile.jwt.JsonWebToken not found
+INFO - OpenWebBeans Container is starting...
+INFO - Adding OpenWebBeansPlugin : [CdiPlugin]
+INFO - All injection points were validated successfully.
+INFO - OpenWebBeans Container has started, it took 316 ms.
 INFO - Created Ejb(deployment-id=JobProcessor, ejb-name=JobProcessor, container=Default Singleton Container)
-INFO - Started Ejb(deployment-id=org.superbiz.async.JobProcessorTest, ejb-name=org.superbiz.async.JobProcessorTest, container=Default Managed Container)
 INFO - Started Ejb(deployment-id=JobProcessor, ejb-name=JobProcessor, container=Default Singleton Container)
-INFO - Deployed Application(path=g:\Workspace\fullproject\openejb3\examples\async-methods)
-Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 13.305 sec
+INFO - Deployed Application(path=/home/soro/git/apache/tomee/examples/async-methods)
+Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 23.491 sec
 
 Results :
 
-Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
-
-[INFO] ------------------------------------------------------------------------
-[INFO] BUILD SUCCESS
-[INFO] ------------------------------------------------------------------------
-[INFO] Total time: 21.097s
-[INFO] Finished at: Wed Aug 03 22:48:26 IST 2011
-[INFO] Final Memory: 13M/145M
-[INFO] ------------------------------------------------------------------------
-</code></pre>
-<h1>How it works <small>under the covers</small></h1>
+Tests run: 1, Failures: 0, Errors: 0, Skipped: 0</code></pre>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_how_it_works_under_the_covers">How it works under the covers</h2>
+<div class="sectionbody">
+<div class="paragraph">
 <p>Under the covers what makes this work is:</p>
+</div>
+<div class="ulist">
 <ul>
-  <li>The <code>JobProcessor</code> the caller sees is not actually an instance of <code>JobProcessor</code>. Rather it's a subclass or proxy that has all the methods overridden. Methods that are supposed to be asynchronous are handled differently.</li>
-  <li>Calls to an asynchronous method simply result in a <code>Runnable</code> being created that wraps the method and parameters you gave. This runnable is given to an <a href="http://download.oracle.com/javase/6/docs/api/java/util/concurrent/Executor.html">Executor</a> which is simply a work queue attached to a thread pool.</li>
-  <li>After adding the work to the queue, the proxied version of the method returns an implementation of <code>Future</code> that is linked to the <code>Runnable</code> which is now waiting on the queue.</li>
-  <li>When the <code>Runnable</code> finally executes the method on the <em>real</em> <code>JobProcessor</code> instance, it will take the return value and set it into the <code>Future</code> making it available to the caller.</li>
+<li>
+<p>The <code>JobProcessor</code> the caller sees is not actually an instance of
+<code>JobProcessor</code>. Rather it’s a subclass or proxy that has all the methods
+overridden. Methods that are supposed to be asynchronous are handled
+differently.</p>
+</li>
+<li>
+<p>Calls to an asynchronous method simply result in a <code>Runnable</code> being
+created that wraps the method and parameters you gave. This runnable is
+given to an
+<a href="http://download.oracle.com/javase/6/docs/api/java/util/concurrent/Executor.html">Executor</a>
+which is simply a work queue attached to a thread pool.</p>
+</li>
+<li>
+<p>After adding the work to the queue, the proxied version of the method
+returns an implementation of <code>Future</code> that is linked to the <code>Runnable</code>
+which is now waiting on the queue.</p>
+</li>
+<li>
+<p>When the <code>Runnable</code> finally executes the method on the <em>real</em>
+<code>JobProcessor</code> instance, it will take the return value and set it into
+the <code>Future</code> making it available to the caller.</p>
+</li>
 </ul>
-<p>Important to note that the <code>AsyncResult</code> object the <code>JobProcessor</code> returns is not the same <code>Future</code> object the caller is holding. It would have been neat if the real <code>JobProcessor</code> could just return <code>String</code> and the caller's version of <code>JobProcessor</code> could return <code>Future&lt;String&gt;</code>, but we didn't see any way to do that without adding more complexity. So the <code>AsyncResult</code> is a simple wrapper object. The container will pull the <code>String</code> out, throw the <code>AsyncResult</code> away, then put the <code>String</code> in the <em>real</em> <code>Future</code> that the caller is holding.</p>
-<p>To get progress along the way, simply pass a thread-safe object like <a href="http://download.oracle.com/javase/6/docs/api/java/util/concurrent/atomic/AtomicInteger.html">AtomicInteger</a> to the <code>@Asynchronous</code> method and have the bean code periodically update it with the percent complete.</p>
-<h1>Related Examples</h1>
-<p>For complex asynchronous processing, JavaEE's answer is <code>@MessageDrivenBean</code>. Have a look at the <a href="../simple-mdb/README.html">simple-mdb</a> example</p>
+</div>
+<div class="paragraph">
+<p>Important to note that the <code>AsyncResult</code> object the <code>JobProcessor</code>
+returns is not the same <code>Future</code> object the caller is holding. It would
+have been neat if the real <code>JobProcessor</code> could just return <code>String</code> and
+the caller’s version of <code>JobProcessor</code> could return <code>Future&lt;String&gt;</code>,
+but we didn’t see any way to do that without adding more complexity. So
+the <code>AsyncResult</code> is a simple wrapper object. The container will pull
+the <code>String</code> out, throw the <code>AsyncResult</code> away, then put the <code>String</code> in
+the <em>real</em> <code>Future</code> that the caller is holding.</p>
+</div>
+<div class="paragraph">
+<p>To get progress along the way, simply pass a thread-safe object like
+<a href="http://download.oracle.com/javase/6/docs/api/java/util/concurrent/atomic/AtomicInteger.html">AtomicInteger</a>
+to the <code>@Asynchronous</code> method and have the bean code periodically update
+it with the percent complete.</p>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_related_examples">Related Examples</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>For complex asynchronous processing, JavaEE’s answer is
+<code>@MessageDrivenBean</code>. Have a look at the
+<a href="../simple-mdb/README.html">simple-mdb</a> example</p>
+</div>
+</div>
+</div>
             </div>
             
         </div>

Modified: websites/staging/tomee/trunk/content/tomee-8.0/examples/async-postconstruct.html
==============================================================================
--- websites/staging/tomee/trunk/content/tomee-8.0/examples/async-postconstruct.html (original)
+++ websites/staging/tomee/trunk/content/tomee-8.0/examples/async-postconstruct.html Sat Sep  7 20:39:03 2019
@@ -95,14 +95,34 @@
         <div class="row">
             
             <div class="col-md-12">
-                <p>Placing <code>@Asynchronous</code> on the <code>@PostConstruct</code> of an EJB is not a supported part of Java EE, but this example shows a pattern which works just as well with little effort.</p>
+                <div class="paragraph">
+<p>Placing <code>@Asynchronous</code> on the <code>@PostConstruct</code> of an EJB is not a
+supported part of Java EE, but this example shows a pattern which works
+just as well with little effort.</p>
+</div>
+<div class="paragraph">
 <p>The heart of this pattern is to:</p>
+</div>
+<div class="ulist">
 <ul>
-  <li>pass the construction "logic" to an <code>@Asynchronous</code> method via a <code>java.util.concurrent.Callable</code></li>
-  <li>ensure the bean does not process invocations till construction is complete via an <code>@AroundInvoke</code> method on the bean and the <code>java.util.concurrent.Future</code></li>
+<li>
+<p>pass the construction <code>logic</code> to an <code>@Asynchronous</code> method via a
+<code>java.util.concurrent.Callable</code></p>
+</li>
+<li>
+<p>ensure the bean does not process invocations till construction is
+complete via an <code>@AroundInvoke</code> method on the bean and the
+<code>java.util.concurrent.Future</code></p>
+</li>
 </ul>
-<p>Simple and effective. The result is a faster starting application that is still thread-safe.</p>
-<pre><code>package org.superbiz.asyncpost;
+</div>
+<div class="paragraph">
+<p>Simple and effective. The result is a faster starting application that
+is still thread-safe.</p>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>package org.superbiz.asyncpost;
 
 import javax.annotation.PostConstruct;
 import javax.ejb.EJB;
@@ -134,8 +154,8 @@ public class SlowStarter {
             @Override
             public Object call() throws Exception {
                 Thread.sleep(SECONDS.toMillis(10));
-                SlowStarter.this.color = &quot;orange&quot;;
-                SlowStarter.this.shape = &quot;circle&quot;;
+                SlowStarter.this.color = "orange";
+                SlowStarter.this.shape = "circle";
                 return null;
             }
         });
@@ -154,10 +174,18 @@ public class SlowStarter {
     public String getShape() {
         return shape;
     }
-}
-</code></pre>
-<p>The <code>Executor</code> is a simple pattern, useful for many things, which exposes an interface functionaly equivalent to <code>java.util.concurrent.ExecutorService</code>, but with the underlying thread pool controlled by the container.</p>
-<pre><code>package org.superbiz.asyncpost;
+}</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>Executor</code> is a simple pattern, useful for many things, which
+exposes an interface functionally equivalent to
+<code>java.util.concurrent.ExecutorService</code>, but with the underlying thread
+pool controlled by the container.</p>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>package org.superbiz.asyncpost;
 
 import javax.ejb.AsyncResult;
 import javax.ejb.Asynchronous;
@@ -176,10 +204,16 @@ public class Executor {
         return new AsyncResult&lt;T&gt;(task.call());
     }
 
-}
-</code></pre>
-<p>Finally a test case shows the usefulness of <code>@AroundInvoke</code> call in our bean that calls <code>construct.get()</code></p>
-<pre><code>package org.superbiz.asyncpost;
+}</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Finally a test case shows the usefulness of <code>@AroundInvoke</code> call in our
+bean that calls <code>construct.get()</code></p>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>package org.superbiz.asyncpost;
 
 import junit.framework.Assert;
 import org.junit.Test;
@@ -196,15 +230,16 @@ public class SlowStarterTest {
     public void test() throws Exception {
 
         // Start the Container
-        EJBContainer.createEJBContainer().getContext().bind(&quot;inject&quot;, this);
+        EJBContainer.createEJBContainer().getContext().bind("inject", this);
 
         // Immediately access the fields initialized in the PostConstruct
         // This will fail without the @AroundInvoke call to construct.get()
-        Assert.assertEquals(&quot;orange&quot;, slowStarter.getColor());
-        Assert.assertEquals(&quot;circle&quot;, slowStarter.getShape());
+        Assert.assertEquals("orange", slowStarter.getColor());
+        Assert.assertEquals("circle", slowStarter.getShape());
     }
-}
-</code></pre>
+}</pre>
+</div>
+</div>
             </div>
             
         </div>

Added: websites/staging/tomee/trunk/content/tomee-8.0/examples/async-servlet.html
==============================================================================
--- websites/staging/tomee/trunk/content/tomee-8.0/examples/async-servlet.html (added)
+++ websites/staging/tomee/trunk/content/tomee-8.0/examples/async-servlet.html Sat Sep  7 20:39:03 2019
@@ -0,0 +1,246 @@
+<!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>Async Servlet</h1>
+            </div>
+          </div>
+        </div>
+        <div class="row">
+            
+            <div class="col-md-12">
+                <div class="sect1">
+<h2 id="_async_servlet">Async Servlet</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>Servlets can be run asynchronously - this can be useful if your servlet performs long-running operations, such as calling
+other services using an asynchronous client.</p>
+</div>
+<div class="paragraph">
+<p>Mark your servlet as <code>asyncSupported</code>, and call Request.startAsync(). This will return an AsyncContext object. Your
+code will need to call AsyncContext.dispatch() when it is finished.</p>
+</div>
+<div class="paragraph">
+<p>WARNING:</p>
+</div>
+<div class="paragraph">
+<p>Section 2.3.3.4 of Servlet 3.0 Spec says "Other than the startAsync and complete methods, implementations of the request and response objects are not guaranteed to be thread safe. This means that they should either only be used within the scope of the request handling thread or the application must ensure that access to the request and response objects are thread safe."</p>
+</div>
+<div class="paragraph">
+<p>If you write to the response directly from your Runnable (#1 below), you risk a race condition with another thread using the response.
+This is particularly noticeable when Async requests timeout, as containers will recycle the Request and Response object to use for another request.</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">@WebServlet(urlPatterns = "/*", asyncSupported = true)
+public class CalcServlet extends HttpServlet {
+
+	private final ExecutorService executorService = Executors.newFixedThreadPool(10);
+
+	@Override
+	protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {
+
+		final AsyncContext asyncContext = req.startAsync();
+		asyncContext.setTimeout(timeout);
+		asyncContext.start(new Runnable() {
+			@Override
+			public void run() {
+				try {
+					// do work &lt;!-- 1 --&gt;
+				} catch (final Exception e) {
+                    // handle exceptions
+				} finally {
+					asyncContext.dispatch();
+				}
+			}
+		});
+	}
+
+
+}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Steps to replicate:</p>
+</div>
+<div class="olist arabic">
+<ol class="arabic">
+<li>
+<p>Run <code>mvn clean install</code>. The Servlet is tested using Arquillian.</p>
+</li>
+</ol>
+</div>
+</div>
+</div>
+            </div>
+            
+        </div>
+    </div>
+<footer>
+		<div class="container">
+			<div class="row">
+				<div class="col-sm-6 text-center-mobile">
+					<h3 class="white">Be simple.  Be certified. Be Tomcat.</h3>
+					<h5 class="light regular light-white">"A good application in a good server"</h5>
+					<ul class="social-footer">
+						<li><a href="https://www.facebook.com/ApacheTomEE/"><i class="fa fa-facebook"></i></a></li>
+						<li><a href="https://twitter.com/apachetomee"><i class="fa fa-twitter"></i></a></li>
+						<li><a href="https://plus.google.com/communities/105208241852045684449"><i class="fa fa-google-plus"></i></a></li>
+					</ul>
+				</div>
+				<div class="col-sm-6 text-center-mobile">
+					<div class="row opening-hours">
+						<div class="col-sm-3 text-center-mobile">
+							<h5><a href="../../latest/docs/documentation.html" class="white">Documentation</a></h5>
+							<ul class="list-unstyled">
+								<li><a href="../../latest/docs/admin/configuration/index.html" class="regular light-white">How to configure</a></li>
+								<li><a href="../../latest/docs/admin/file-layout.html" class="regular light-white">Dir. Structure</a></li>
+								<li><a href="../../latest/docs/developer/testing/index.html" class="regular light-white">Testing</a></li>
+								<li><a href="../../latest/docs/admin/cluster/index.html" class="regular light-white">Clustering</a></li>
+							</ul>
+						</div>
+						<div class="col-sm-3 text-center-mobile">
+							<h5><a href="../../latest/examples/" class="white">Examples</a></h5>
+							<ul class="list-unstyled">
+								<li><a href="../../latest/examples/simple-cdi-interceptor.html" class="regular light-white">CDI Interceptor</a></li>
+								<li><a href="../../latest/examples/rest-cdi.html" class="regular light-white">REST with CDI</a></li>
+								<li><a href="../../latest/examples/ejb-examples.html" class="regular light-white">EJB</a></li>
+								<li><a href="../../latest/examples/jsf-managedBean-and-ejb.html" class="regular light-white">JSF</a></li>
+							</ul>
+						</div>
+						<div class="col-sm-3 text-center-mobile">
+							<h5><a href="../../community/index.html" class="white">Community</a></h5>
+							<ul class="list-unstyled">
+								<li><a href="../../community/contributors.html" class="regular light-white">Contributors</a></li>
+								<li><a href="../../community/social.html" class="regular light-white">Social</a></li>
+								<li><a href="../../community/sources.html" class="regular light-white">Sources</a></li>
+							</ul>
+						</div>
+						<div class="col-sm-3 text-center-mobile">
+							<h5><a href="../../security/index.html" class="white">Security</a></h5>
+							<ul class="list-unstyled">
+								<li><a href="http://apache.org/security" target="_blank" class="regular light-white">Apache Security</a></li>
+								<li><a href="http://apache.org/security/projects.html" target="_blank" class="regular light-white">Security Projects</a></li>
+								<li><a href="http://cve.mitre.org" target="_blank" class="regular light-white">CVE</a></li>
+							</ul>
+						</div>
+					</div>
+				</div>
+			</div>
+			<div class="row bottom-footer text-center-mobile">
+				<div class="col-sm-12 light-white">
+					<p>Copyright &copy; 1999-2016 The Apache Software Foundation, Licensed under the Apache License, Version 2.0. Apache TomEE, TomEE, Apache, the Apache feather logo, and the Apache TomEE project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.</p>
+				</div>
+			</div>
+		</div>
+	</footer>
+	<!-- Holder for mobile navigation -->
+	<div class="mobile-nav">
+        <ul>
+          <li><a hef="../../latest/docs/admin/index.html">Administrators</a>
+          <li><a hef="../../latest/docs/developer/index.html">Developers</a>
+          <li><a hef="../../latest/docs/advanced/index.html">Advanced</a>
+          <li><a hef="../../community/index.html">Community</a>
+        </ul>
+		<a href="#" class="close-link"><i class="arrow_up"></i></a>
+	</div>
+	<!-- Scripts -->
+	<script src="../../js/jquery-1.11.1.min.js"></script>
+	<script src="../../js/owl.carousel.min.js"></script>
+	<script src="../../js/bootstrap.min.js"></script>
+	<script src="../../js/wow.min.js"></script>
+	<script src="../../js/typewriter.js"></script>
+	<script src="../../js/jquery.onepagenav.js"></script>
+	<script src="../../js/tree.jquery.js"></script>
+	<script src="../../js/highlight.pack.js"></script>
+    <script src="../../js/main.js"></script>
+		</body>
+
+</html>
+

Modified: websites/staging/tomee/trunk/content/tomee-8.0/examples/bean-validation-design-by-contract.html
==============================================================================
--- websites/staging/tomee/trunk/content/tomee-8.0/examples/bean-validation-design-by-contract.html (original)
+++ websites/staging/tomee/trunk/content/tomee-8.0/examples/bean-validation-design-by-contract.html Sat Sep  7 20:39:03 2019
@@ -95,34 +95,61 @@
         <div class="row">
             
             <div class="col-md-12">
-                <h1>Bean Validation - Design By Contract</h1>
-<p>Bean Validation (aka JSR 303) contains an optional appendix dealing with method validation.</p>
-<p>Some implementions of this JSR implement this appendix (Apache bval, Hibernate validator for example).</p>
-<p>OpenEJB provides an interceptor which allows you to use this feature to do design by contract.</p>
-<h1>Design by contract</h1>
-<p>The goal is to be able to configure with a finer grain your contract. In the example you specify the minimum centimeters a sport man should jump at pole vaulting:</p>
-<pre><code>@Local
-public interface PoleVaultingManager {
-    int points(@Min(120) int centimeters);
-}
-</code></pre>
-<h1>Usage</h1>
-<p>TomEE and OpenEJB do not provide anymore <code>BeanValidationAppendixInterceptor</code> since Bean Validation 1.1 does it (with a slighly different usage but the exact same feature).</p>
-<p>So basically you don't need to configure anything to use it.</p>
-<h1>Errors</h1>
-<p>If a parameter is not validated an exception is thrown, it is an EJBException wrapping a ConstraintViolationException:</p>
-<pre><code>try {
-    gamesManager.addSportMan(&quot;I lose&quot;, &quot;EN&quot;);
-    fail(&quot;no space should be in names&quot;);
-} catch (EJBException wrappingException) {
-    assertTrue(wrappingException.getCause() instanceof ConstraintViolationException);
-    ConstraintViolationException exception = ConstraintViolationException.class.cast(wrappingException.getCausedByException());
-    assertEquals(1, exception.getConstraintViolations().size());
-}
-</code></pre>
-<h1>Example</h1>
-<h2>OlympicGamesManager</h2>
-<pre><code>package org.superbiz.designbycontract;
+                <div class="sect1">
+<h2 id="_bean_validation_design_by_contract">Bean Validation - Design By Contract</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>Bean Validation (aka JSR 303) contains an optional appendix dealing with
+method validation.</p>
+</div>
+<div class="paragraph">
+<p>Some implementions of this JSR implement this appendix (Apache BVal,
+Hibernate Validator for example).</p>
+</div>
+<div class="admonitionblock note">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-note" title="Note"></i>
+</td>
+<td class="content">
+If you override or implement a method, which has constraints, you need to re-add the constraints to the new method.
+</td>
+</tr>
+</table>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_design_by_contract">Design by contract</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>The goal is to be able to configure with a finer grain your contract. In
+the example you specify the minimum centimeters a sport man should jump
+at pole vaulting:</p>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>@Stateless
+public class PoleVaultingManagerBean
+{
+    public int points(@Min(120) int centimeters)
+    {
+        return centimeters - 120;
+    }
+}</pre>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_example">Example</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="_olympicgamesmanager">OlympicGamesManager</h3>
+<div class="literalblock">
+<div class="content">
+<pre>package org.superbiz.designbycontract;
 
 import javax.ejb.Stateless;
 import javax.validation.constraints.NotNull;
@@ -131,27 +158,41 @@ import javax.validation.constraints.Size
 
 @Stateless
 public class OlympicGamesManager {
-    public String addSportMan(@Pattern(regexp = &quot;^[A-Za-z]+$&quot;) String name, @Size(min = 2, max = 4) String country) {
-        if (country.equals(&quot;USA&quot;)) {
+    public String addSportMan(@Pattern(regexp = "^[A-Za-z]+$") String name, @Size(min = 2, max = 4) String country) {
+        if (country.equals("USA")) {
             return null;
         }
-        return new StringBuilder(name).append(&quot; [&quot;).append(country).append(&quot;]&quot;).toString();
+        return new StringBuilder(name).append(" [").append(country).append("]").toString();
     }
-}
-</code></pre>
-<h2>PoleVaultingManager</h2>
-<pre><code>package org.superbiz.designbycontract;
+}</pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_polevaultingmanager">PoleVaultingManager</h3>
+<div class="literalblock">
+<div class="content">
+<pre>package org.superbiz.designbycontract;
 
-import javax.ejb.Local;
+import javax.ejb.Stateless;
 import javax.validation.constraints.Min;
 
-@Local
-public interface PoleVaultingManager {
-    int points(@Min(120) int centimeters);
-}
-</code></pre>
-<h2>PoleVaultingManagerBean</h2>
-<pre><code>package org.superbiz.designbycontract;
+@Stateless
+public class PoleVaultingManagerBean
+{
+    public int points(@Min(120) int centimeters)
+    {
+        return centimeters - 120;
+    }
+}</pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_polevaultingmanagerbean">PoleVaultingManagerBean</h3>
+<div class="literalblock">
+<div class="content">
+<pre>package org.superbiz.designbycontract;
 
 import javax.ejb.Stateless;
 
@@ -161,10 +202,15 @@ public class PoleVaultingManagerBean imp
     public int points(int centimeters) {
         return centimeters - 120;
     }
-}
-</code></pre>
-<h2>OlympicGamesTest</h2>
-<pre><code>public class OlympicGamesTest {
+}</pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_olympicgamestest">OlympicGamesTest</h3>
+<div class="literalblock">
+<div class="content">
+<pre>public class OlympicGamesTest {
     private static Context context;
 
     @EJB
@@ -182,7 +228,7 @@ public class PoleVaultingManagerBean imp
 
     @Before
     public void inject() throws Exception {
-        context.bind(&quot;inject&quot;, this);
+        context.bind("inject", this);
     }
 
     @AfterClass
@@ -194,14 +240,14 @@ public class PoleVaultingManagerBean imp
 
     @Test
     public void sportMenOk() throws Exception {
-        assertEquals(&quot;IWin [FR]&quot;, gamesManager.addSportMan(&quot;IWin&quot;, &quot;FR&quot;));
+        assertEquals("IWin [FR]", gamesManager.addSportMan("IWin", "FR"));
     }
 
     @Test
     public void sportMenKoBecauseOfName() throws Exception {
         try {
-            gamesManager.addSportMan(&quot;I lose&quot;, &quot;EN&quot;);
-            fail(&quot;no space should be in names&quot;);
+            gamesManager.addSportMan("I lose", "EN");
+            fail("no space should be in names");
         } catch (EJBException wrappingException) {
             assertTrue(wrappingException.getCause() instanceof ConstraintViolationException);
             ConstraintViolationException exception = ConstraintViolationException.class.cast(wrappingException.getCausedByException());
@@ -212,8 +258,8 @@ public class PoleVaultingManagerBean imp
     @Test
     public void sportMenKoBecauseOfCountry() throws Exception {
         try {
-            gamesManager.addSportMan(&quot;ILoseTwo&quot;, &quot;TOO-LONG&quot;);
-            fail(&quot;country should be between 2 and 4 characters&quot;);
+            gamesManager.addSportMan("ILoseTwo", "TOO-LONG");
+            fail("country should be between 2 and 4 characters");
         } catch (EJBException wrappingException) {
             assertTrue(wrappingException.getCause() instanceof ConstraintViolationException);
             ConstraintViolationException exception = ConstraintViolationException.class.cast(wrappingException.getCausedByException());
@@ -230,17 +276,25 @@ public class PoleVaultingManagerBean imp
     public void tooShortPolVaulting() throws Exception {
         try {
             poleVaultingManager.points(119);
-            fail(&quot;the jump is too short&quot;);
+            fail("the jump is too short");
         } catch (EJBException wrappingException) {
             assertTrue(wrappingException.getCause() instanceof ConstraintViolationException);
             ConstraintViolationException exception = ConstraintViolationException.class.cast(wrappingException.getCausedByException());
             assertEquals(1, exception.getConstraintViolations().size());
         }
     }
-}
-</code></pre>
-<h1>Running</h1>
-<pre><code>-------------------------------------------------------
+}</pre>
+</div>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_running">Running</h2>
+<div class="sectionbody">
+<div class="literalblock">
+<div class="content">
+<pre>-------------------------------------------------------
  T E S T S
 -------------------------------------------------------
 Running OlympicGamesTest
@@ -248,7 +302,7 @@ Apache OpenEJB 4.0.0-beta-1    build: 20
 http://tomee.apache.org/
 INFO - openejb.home = /Users/dblevins/examples/bean-validation-design-by-contract
 INFO - openejb.base = /Users/dblevins/examples/bean-validation-design-by-contract
-INFO - Using &#39;javax.ejb.embeddable.EJBContainer=true&#39;
+INFO - Using 'javax.ejb.embeddable.EJBContainer=true'
 INFO - Configuring Service(id=Default Security Service, type=SecurityService, provider-id=Default Security Service)
 INFO - Configuring Service(id=Default Transaction Manager, type=TransactionManager, provider-id=Default Transaction Manager)
 INFO - Found EjbModule in classpath: /Users/dblevins/examples/bean-validation-design-by-contract/target/classes
@@ -258,14 +312,14 @@ INFO - Configuring Service(id=Default St
 INFO - Auto-creating a container for bean PoleVaultingManagerBean: Container(type=STATELESS, id=Default Stateless Container)
 INFO - Configuring Service(id=Default Managed Container, type=Container, provider-id=Default Managed Container)
 INFO - Auto-creating a container for bean OlympicGamesTest: Container(type=MANAGED, id=Default Managed Container)
-INFO - Enterprise application &quot;/Users/dblevins/examples/bean-validation-design-by-contract&quot; loaded.
+INFO - Enterprise application "/Users/dblevins/examples/bean-validation-design-by-contract" loaded.
 INFO - Assembling app: /Users/dblevins/examples/bean-validation-design-by-contract
-INFO - Jndi(name=&quot;java:global/bean-validation-design-by-contract/PoleVaultingManagerBean!org.superbiz.designbycontract.PoleVaultingManager&quot;)
-INFO - Jndi(name=&quot;java:global/bean-validation-design-by-contract/PoleVaultingManagerBean&quot;)
-INFO - Jndi(name=&quot;java:global/bean-validation-design-by-contract/OlympicGamesManager!org.superbiz.designbycontract.OlympicGamesManager&quot;)
-INFO - Jndi(name=&quot;java:global/bean-validation-design-by-contract/OlympicGamesManager&quot;)
-INFO - Jndi(name=&quot;java:global/EjbModule236054577/OlympicGamesTest!OlympicGamesTest&quot;)
-INFO - Jndi(name=&quot;java:global/EjbModule236054577/OlympicGamesTest&quot;)
+INFO - Jndi(name="java:global/bean-validation-design-by-contract/PoleVaultingManagerBean!org.superbiz.designbycontract.PoleVaultingManager")
+INFO - Jndi(name="java:global/bean-validation-design-by-contract/PoleVaultingManagerBean")
+INFO - Jndi(name="java:global/bean-validation-design-by-contract/OlympicGamesManager!org.superbiz.designbycontract.OlympicGamesManager")
+INFO - Jndi(name="java:global/bean-validation-design-by-contract/OlympicGamesManager")
+INFO - Jndi(name="java:global/EjbModule236054577/OlympicGamesTest!OlympicGamesTest")
+INFO - Jndi(name="java:global/EjbModule236054577/OlympicGamesTest")
 INFO - Created Ejb(deployment-id=OlympicGamesManager, ejb-name=OlympicGamesManager, container=Default Stateless Container)
 INFO - Created Ejb(deployment-id=PoleVaultingManagerBean, ejb-name=PoleVaultingManagerBean, container=Default Stateless Container)
 INFO - Created Ejb(deployment-id=OlympicGamesTest, ejb-name=OlympicGamesTest, container=Default Managed Container)
@@ -277,8 +331,11 @@ Tests run: 5, Failures: 0, Errors: 0, Sk
 
 Results :
 
-Tests run: 5, Failures: 0, Errors: 0, Skipped: 0
-</code></pre>
+Tests run: 5, Failures: 0, Errors: 0, Skipped: 0</pre>
+</div>
+</div>
+</div>
+</div>
             </div>
             
         </div>

Added: websites/staging/tomee/trunk/content/tomee-8.0/examples/cdi-realm.html
==============================================================================
--- websites/staging/tomee/trunk/content/tomee-8.0/examples/cdi-realm.html (added)
+++ websites/staging/tomee/trunk/content/tomee-8.0/examples/cdi-realm.html Sat Sep  7 20:39:03 2019
@@ -0,0 +1,384 @@
+<!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>CDI Realm</h1>
+            </div>
+          </div>
+        </div>
+        <div class="row">
+            
+            <div class="col-md-12">
+                <div id="preamble">
+<div class="sectionbody">
+<div class="paragraph">
+<p>This example shows how to secure access to a web resource provided by a servlet. For this, we will use realms.</p>
+</div>
+<div class="paragraph">
+<p>A <a href="https://javaee.github.io/tutorial/security-intro005.html#BNBXJ">realm</a>, in JEE world, is a security policy domain defined for a web or application server.
+A realm contains a collection of users, who may or may not be assigned to a group.</p>
+</div>
+<div class="paragraph">
+<p>A realm, basically, specifies a list of users and roles. I&#8217;s a "database" of users with associated passwords and possible roles.
+The Servlet Specification doesn&#8217;t specifies an API for specifying such a list of users and roles for a given application.
+For this reason, Tomcat servlet container defines an interface, <code>org.apache.catalina.Realm</code>. More information can be found <a href="https://tomcat.apache.org/tomcat-9.0-doc/realm-howto.html">here</a>.</p>
+</div>
+<div class="paragraph">
+<p>In TomEE application server, the mechanism used by Tomcat to define a realm for a servlet is reused and enhanced. More information can be found <a href="https://www.tomitribe.com/blog/tomee-security-episode-1-apache-tomcat-and-apache-tomee-security-under-the-covers">here</a>.</p>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_example">Example</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>This example shows a servlet secured using a realm. The secured servlet has a simple functionality, just for illustrating the concepts explained here:</p>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>import javax.servlet.ServletException;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+@WebServlet("/servlet")
+public class SecuredServlet extends HttpServlet {
+    @Override
+    protected void service(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {
+        resp.getWriter().write("Servlet!");
+    }
+}</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>For securing this servlet, we will add the following class:</p>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>import javax.enterprise.context.RequestScoped;
+import java.security.Principal;
+
+@RequestScoped // just to show we can be bound to the request but @ApplicationScoped is what makes sense
+public class AuthBean {
+    public Principal authenticate(final String username, String password) {
+        if (("userA".equals(username) || "userB".equals(username)) &amp;&amp; "test".equals(password)) {
+            return new Principal() {
+                @Override
+                public String getName() {
+                    return username;
+                }
+
+                @Override
+                public String toString() {
+                    return username;
+                }
+            };
+        }
+        return null;
+    }
+
+    public boolean hasRole(final Principal principal, final String role) {
+        return principal != null &amp;&amp; (
+                principal.getName().equals("userA") &amp;&amp; (role.equals("admin")
+                        || role.equals("user"))
+                        || principal.getName().equals("userB") &amp;&amp; (role.equals("user"))
+        );
+    }
+}</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The class defines 2 methods: <code>authenticate</code> and <code>hasRole</code>.
+Both these methods will be used by a class, <code>LazyRealm</code>, implemented in TomEE application server.
+In the file <code>webapp/META-INF/context.xml</code> this realm is configured:</p>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>&lt;Context preemptiveAuthentication="true"&gt;
+  &lt;Valve className="org.apache.catalina.authenticator.BasicAuthenticator" /&gt;
+  &lt;Realm className="org.apache.tomee.catalina.realm.LazyRealm"
+         cdi="true" realmClass="org.superbiz.AuthBean"/&gt;
+&lt;/Context&gt;</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The class <code>AuthBean</code> defines a "database" with 2 users: userA (having role admin) and userB (having role user), both having the password test.
+Class <code>org.apache.tomee.catalina.realm.LazyRealm</code> will load our <code>AuthBean</code> class and will use it to check if a user has access to the content provided by our servlet.</p>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_tests">Tests</h2>
+<div class="sectionbody">
+<div class="literalblock">
+<div class="content">
+<pre>import org.apache.http.HttpHost;
+import org.apache.http.auth.AuthScope;
+import org.apache.http.auth.UsernamePasswordCredentials;
+import org.apache.http.client.AuthCache;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.protocol.HttpClientContext;
+import org.apache.http.impl.auth.BasicScheme;
+import org.apache.http.impl.client.BasicAuthCache;
+import org.apache.http.impl.client.BasicCredentialsProvider;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.util.EntityUtils;
+import org.apache.openejb.arquillian.common.IO;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.arquillian.test.api.ArquillianResource;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.asset.EmptyAsset;
+import org.jboss.shrinkwrap.api.asset.FileAsset;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+
+import static org.hamcrest.CoreMatchers.startsWith;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertThat;
+
+@RunWith(Arquillian.class)
+public class AuthBeanTest {
+    @Deployment(testable = false)
+    public static WebArchive createDeployment() {
+        return ShrinkWrap.create(WebArchive.class, "low-typed-realm.war")
+                .addClasses(SecuredServlet.class, AuthBean.class)
+                .addAsManifestResource(new FileAsset(new File("src/main/webapp/META-INF/context.xml")), "context.xml")
+                .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
+    }
+
+    @ArquillianResource
+    private URL webapp;
+
+    @Test
+    public void success() throws IOException {
+        assertEquals("200 Servlet!", get("userA", "test"));
+    }
+
+    @Test
+    public void failure() throws IOException {
+        assertThat(get("userA", "oops, wrong password"), startsWith("401"));
+    }
+
+    private String get(final String user, final String password) {
+        final BasicCredentialsProvider basicCredentialsProvider = new BasicCredentialsProvider();
+        basicCredentialsProvider.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(user, password));
+        final CloseableHttpClient client = HttpClients.custom()
+                .setDefaultCredentialsProvider(basicCredentialsProvider).build();
+
+        final HttpHost httpHost = new HttpHost(webapp.getHost(), webapp.getPort(), webapp.getProtocol());
+        final AuthCache authCache = new BasicAuthCache();
+        final BasicScheme basicAuth = new BasicScheme();
+        authCache.put(httpHost, basicAuth);
+        final HttpClientContext context = HttpClientContext.create();
+        context.setAuthCache(authCache);
+
+        final HttpGet get = new HttpGet(webapp.toExternalForm() + "servlet");
+        CloseableHttpResponse response = null;
+        try {
+            response = client.execute(httpHost, get, context);
+            return response.getStatusLine().getStatusCode() + " " + EntityUtils.toString(response.getEntity());
+        } catch (final IOException e) {
+            throw new IllegalStateException(e);
+        } finally {
+            try {
+                IO.close(response);
+            } catch (final IOException e) {
+                // no-op
+            }
+        }
+    }
+}</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The test uses Arquillian to start an application server and load the servlet.
+There are two tests methods: <code>success</code>, where our servlet is accessed with the correct username and password, and <code>failure</code>, where our servlet is accessed with an incorrect password.</p>
+</div>
+<div class="paragraph">
+<p>Full example can be found <a href="https://github.com/apache/tomee/tree/master/examples/cdi-realm">here</a>.
+It&#8217;s a maven project, and the test can be run with <code>mvn clean install</code> command.</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/documentation.html" class="white">Documentation</a></h5>
+							<ul class="list-unstyled">
+								<li><a href="../../latest/docs/admin/configuration/index.html" class="regular light-white">How to configure</a></li>
+								<li><a href="../../latest/docs/admin/file-layout.html" class="regular light-white">Dir. Structure</a></li>
+								<li><a href="../../latest/docs/developer/testing/index.html" class="regular light-white">Testing</a></li>
+								<li><a href="../../latest/docs/admin/cluster/index.html" class="regular light-white">Clustering</a></li>
+							</ul>
+						</div>
+						<div class="col-sm-3 text-center-mobile">
+							<h5><a href="../../latest/examples/" class="white">Examples</a></h5>
+							<ul class="list-unstyled">
+								<li><a href="../../latest/examples/simple-cdi-interceptor.html" class="regular light-white">CDI Interceptor</a></li>
+								<li><a href="../../latest/examples/rest-cdi.html" class="regular light-white">REST with CDI</a></li>
+								<li><a href="../../latest/examples/ejb-examples.html" class="regular light-white">EJB</a></li>
+								<li><a href="../../latest/examples/jsf-managedBean-and-ejb.html" class="regular light-white">JSF</a></li>
+							</ul>
+						</div>
+						<div class="col-sm-3 text-center-mobile">
+							<h5><a href="../../community/index.html" class="white">Community</a></h5>
+							<ul class="list-unstyled">
+								<li><a href="../../community/contributors.html" class="regular light-white">Contributors</a></li>
+								<li><a href="../../community/social.html" class="regular light-white">Social</a></li>
+								<li><a href="../../community/sources.html" class="regular light-white">Sources</a></li>
+							</ul>
+						</div>
+						<div class="col-sm-3 text-center-mobile">
+							<h5><a href="../../security/index.html" class="white">Security</a></h5>
+							<ul class="list-unstyled">
+								<li><a href="http://apache.org/security" target="_blank" class="regular light-white">Apache Security</a></li>
+								<li><a href="http://apache.org/security/projects.html" target="_blank" class="regular light-white">Security Projects</a></li>
+								<li><a href="http://cve.mitre.org" target="_blank" class="regular light-white">CVE</a></li>
+							</ul>
+						</div>
+					</div>
+				</div>
+			</div>
+			<div class="row bottom-footer text-center-mobile">
+				<div class="col-sm-12 light-white">
+					<p>Copyright &copy; 1999-2016 The Apache Software Foundation, Licensed under the Apache License, Version 2.0. Apache TomEE, TomEE, Apache, the Apache feather logo, and the Apache TomEE project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.</p>
+				</div>
+			</div>
+		</div>
+	</footer>
+	<!-- Holder for mobile navigation -->
+	<div class="mobile-nav">
+        <ul>
+          <li><a hef="../../latest/docs/admin/index.html">Administrators</a>
+          <li><a hef="../../latest/docs/developer/index.html">Developers</a>
+          <li><a hef="../../latest/docs/advanced/index.html">Advanced</a>
+          <li><a hef="../../community/index.html">Community</a>
+        </ul>
+		<a href="#" class="close-link"><i class="arrow_up"></i></a>
+	</div>
+	<!-- Scripts -->
+	<script src="../../js/jquery-1.11.1.min.js"></script>
+	<script src="../../js/owl.carousel.min.js"></script>
+	<script src="../../js/bootstrap.min.js"></script>
+	<script src="../../js/wow.min.js"></script>
+	<script src="../../js/typewriter.js"></script>
+	<script src="../../js/jquery.onepagenav.js"></script>
+	<script src="../../js/tree.jquery.js"></script>
+	<script src="../../js/highlight.pack.js"></script>
+    <script src="../../js/main.js"></script>
+		</body>
+
+</html>
+

Modified: websites/staging/tomee/trunk/content/tomee-8.0/examples/cdi-session-scope.html
==============================================================================
--- websites/staging/tomee/trunk/content/tomee-8.0/examples/cdi-session-scope.html (original)
+++ websites/staging/tomee/trunk/content/tomee-8.0/examples/cdi-session-scope.html Sat Sep  7 20:39:03 2019
@@ -118,7 +118,7 @@ beans that inject it throughout the same
 <h2 id="_example">Example</h2>
 <div class="sectionbody">
 <div class="paragraph">
-<p>This example has an end point wherein a user provides a request parameter 'name' which is persisted as a feild in a session scoped bean SessionBean and
+<p>This example has an endpoint wherein a user provides a request parameter <code>name</code> which is persisted as a field in a session scoped bean <code>SessionBean</code> and
 then retrieved through another endpoint.</p>
 </div>
 </div>
@@ -135,7 +135,7 @@ then retrieved through another endpoint.
 <h2 id="_response">Response</h2>
 <div class="sectionbody">
 <div class="paragraph">
-<p>done, go to /name servlet</p>
+<p><code>done, go to /name servlet</code></p>
 </div>
 </div>
 </div>
@@ -159,7 +159,7 @@ then retrieved through another endpoint.
 <h2 id="_sessionbean">SessionBean</h2>
 <div class="sectionbody">
 <div class="paragraph">
-<p>The annotation @SessionScoped specifies that a bean is session scoped ie there will be only one instance of the class associated with a particular HTTPSession.</p>
+<p>The annotation <code>@SessionScoped</code> specifies that a bean is session scoped ie there will be only one instance of the class associated with a particular HTTPSession.</p>
 </div>
 <div class="listingblock">
 <div class="content">
@@ -184,8 +184,8 @@ public class SessionBean implements Seri
 <h2 id="_inputservlet">InputServlet</h2>
 <div class="sectionbody">
 <div class="paragraph">
-<p>InputServlet is a generic servlet which is mapped to the url pattern '/set-name'.
-The session scoped bean 'SessionBean' has been injected into this servlet, and the incoming request parameter is set to the feild name of the bean.</p>
+<p><code>InputServlet</code> is a generic servlet which is mapped to the url pattern <code>/set-name</code>.
+The session scoped bean <code>SessionBean</code> has been injected into this servlet, and the incoming request parameter is set to the field <code>name</code> of the bean.</p>
 </div>
 <div class="listingblock">
 <div class="content">
@@ -216,7 +216,8 @@ public class InputServlet extends HttpSe
 <h2 id="_answerbean">AnswerBean</h2>
 <div class="sectionbody">
 <div class="paragraph">
-<p>AnswerBean is a request scoped bean with an injected 'SessionBean'. It has an postconstruct method wherein the value from the sessionBean is retrieved and set to a feild.</p>
+<p><code>AnswerBean</code> is a request scoped bean with an injected <code>SessionBean</code>. It has an <code>@PostConstruct</code> method
+wherein the value from the <code>SessionBean</code> is retrieved and set to a field.</p>
 </div>
 <div class="listingblock">
 <div class="content">
@@ -244,7 +245,7 @@ public class InputServlet extends HttpSe
 <h2 id="_outputservlet">OutputServlet</h2>
 <div class="sectionbody">
 <div class="paragraph">
-<p>OutputServlet is another servlet with  'AnswerBean' as an injected feild. When '/name' is called the value from 'Answerbean' is read and written to the response.</p>
+<p><code>OutputServlet</code> is another servlet with  <code>AnswerBean</code> as an injected field. When <code>/name</code> is called the value from <code>AnswerBean</code> is read and written to the response.</p>
 </div>
 <div class="listingblock">
 <div class="content">

Modified: websites/staging/tomee/trunk/content/tomee-8.0/examples/change-jaxws-url.html
==============================================================================
--- websites/staging/tomee/trunk/content/tomee-8.0/examples/change-jaxws-url.html (original)
+++ websites/staging/tomee/trunk/content/tomee-8.0/examples/change-jaxws-url.html Sat Sep  7 20:39:03 2019
@@ -95,10 +95,20 @@
         <div class="row">
             
             <div class="col-md-12">
-                <p><em>Help us document this example! Click the blue pencil icon in the upper right to edit this page.</em></p>
-<p>To change a webservice deployment URI one solution is to use openejb-jar.xml.</p>
-<p>In this sample we have a webservice though the class Rot13:</p>
-<pre><code>package org.superbiz.jaxws;
+                <div class="paragraph">
+<p><em>Help us document this example! Click the blue pencil icon in the upper
+right to edit this page.</em></p>
+</div>
+<div class="paragraph">
+<p>To change a web service deployment URI one solution is to use
+<code>openejb-jar.xml</code>.</p>
+</div>
+<div class="paragraph">
+<p>In this sample we have a web service through the class <code>Rot13</code>:</p>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>package org.superbiz.jaxws;
 
 import javax.ejb.Lock;
 import javax.ejb.LockType;
@@ -115,7 +125,7 @@ public class Rot13 {
             int cap = b &amp; 32;
             b &amp;= ~cap;
             if (Character.isUpperCase(b)) {
-                b = (b - &#39;A&#39; + 13) % 26 + &#39;A&#39;;
+                b = (b - 'A' + 13) % 26 + 'A';
             } else {
                 b = cap;
             }
@@ -124,23 +134,40 @@ public class Rot13 {
         }
         return builder.toString();
     }
-}
-</code></pre>
-<p>We decide to deploy to /tool/rot13 url.</p>
-<p>To do so we first define it in openejb-jar.xml:</p>
-<pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
-&lt;openejb-jar xmlns=&quot;http://www.openejb.org/xml/ns/openejb-jar-2.1&quot;&gt;
+}</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>We decide to deploy to <code>/tool/rot13</code> url.</p>
+</div>
+<div class="paragraph">
+<p>To do so we first define it in <code>openejb-jar.xml</code>:</p>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+&lt;openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.1"&gt;
   &lt;enterprise-beans&gt;
     &lt;session&gt;
       &lt;ejb-name&gt;Rot13&lt;/ejb-name&gt;
       &lt;web-service-address&gt;/tool/rot13&lt;/web-service-address&gt;
     &lt;/session&gt;
   &lt;/enterprise-beans&gt;
-&lt;/openejb-jar&gt;
-</code></pre>
-<p>It is not enough since by default TomEE deploys the webservices in a subcontext called webservices. To skip it simply set the system property tomee.jaxws.subcontext to / (done in arquillian.xml for our test).</p>
-<p>Then now our Rot13 webservice is deployed as expected to /tool/rot13 and we check it with arquillian and tomee embedded:</p>
-<pre><code> package org.superbiz.jaxws;
+&lt;/openejb-jar&gt;</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>It is not enough since by default TomEE deploys the webs ervices in a
+subcontext called <code>webservices</code>. To skip it simply set the system property
+<code>tomee.jaxws.subcontext</code> to <code>/</code> (done in <code>arquillian.xml</code> for our test).</p>
+</div>
+<div class="paragraph">
+<p>Then now our <code>Rot13</code> web service is deployed as expected to <code>/tool/rot13</code> and
+we check it with Arquillian and TomEE embedded:</p>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre> package org.superbiz.jaxws;
 
  import org.apache.ziplock.IO;
  import org.jboss.arquillian.container.test.api.Deployment;
@@ -169,16 +196,17 @@ public class Rot13 {
      public static WebArchive war() {
          return ShrinkWrap.create(WebArchive.class)
                      .addClass(Rot13.class)
-                     .addAsWebInfResource(new ClassLoaderAsset(&quot;META-INF/openejb-jar.xml&quot;), ArchivePaths.create(&quot;openejb-jar.xml&quot;));
+                     .addAsWebInfResource(new ClassLoaderAsset("META-INF/openejb-jar.xml"), ArchivePaths.create("openejb-jar.xml"));
      }
 
      @Test
      public void checkWSDLIsDeployedWhereItIsConfigured() throws Exception {
-         final String wsdl = IO.slurp(new URL(url.toExternalForm() + &quot;tool/rot13?wsdl&quot;));
-         assertThat(wsdl, containsString(&quot;Rot13&quot;));
+         final String wsdl = IO.slurp(new URL(url.toExternalForm() + "tool/rot13?wsdl"));
+         assertThat(wsdl, containsString("Rot13"));
      }
- }
-</code></pre>
+ }</pre>
+</div>
+</div>
             </div>
             
         </div>