tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblev...@apache.org
Subject svn commit: r1850005 [2/2] - in /tomee/site/trunk/content: community/ latest/examples/ master/examples/ tomee-8.0/examples/
Date Sun, 30 Dec 2018 21:47:45 GMT
Modified: tomee/site/trunk/content/master/examples/decorators.html
URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/master/examples/decorators.html?rev=1850005&r1=1850004&r2=1850005&view=diff
==============================================================================
--- tomee/site/trunk/content/master/examples/decorators.html (original)
+++ tomee/site/trunk/content/master/examples/decorators.html Sun Dec 30 21:47:45 2018
@@ -88,16 +88,25 @@
           <div class="col-md-12">
             <div class='page-header'>
               
-              <h1>Decorators</h1>
+              <h1>null</h1>
             </div>
           </div>
         </div>
         <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>
-<h2>AccessDeniedException</h2>
-<pre><code>package org.superbiz.cdi.decorators;
+                <div class="paragraph">
+<p>index-group=CDI
+type=page
+status=published</p>
+</div>
+<h1 id="_decorators" class="sect0">Decorators</h1>
+<div class="sect1">
+<h2 id="_accessdeniedexception">AccessDeniedException</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.cdi.decorators;
 
 import javax.ejb.ApplicationException;
 
@@ -109,10 +118,17 @@ public class AccessDeniedException exten
     public AccessDeniedException(String s) {
         super(s);
     }
-}
-</code></pre>
-<h2>Calculator</h2>
-<pre><code>package org.superbiz.cdi.decorators;
+}</code></pre>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_calculator">Calculator</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.cdi.decorators;
 
 /**
  * @version $Revision$ $Date$
@@ -128,10 +144,17 @@ public interface Calculator {
     public int divide(int a, int b);
 
     public int remainder(int a, int b);
-}
-</code></pre>
-<h2>CalculatorBean</h2>
-<pre><code>package org.superbiz.cdi.decorators;
+}</code></pre>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_calculatorbean">CalculatorBean</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.cdi.decorators;
 
 import javax.annotation.Resource;
 import javax.ejb.SessionContext;
@@ -164,10 +187,17 @@ public class CalculatorBean implements C
     public int remainder(int a, int b) {
         return a % b;
     }
-}
-</code></pre>
-<h2>CalculatorLogging</h2>
-<pre><code>package org.superbiz.cdi.decorators;
+}</code></pre>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_calculatorlogging">CalculatorLogging</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.cdi.decorators;
 
 import javax.decorator.Decorator;
 import javax.decorator.Delegate;
@@ -177,7 +207,7 @@ import java.util.logging.Logger;
 @Decorator
 public class CalculatorLogging implements Calculator {
 
-    private Logger logger = Logger.getLogger(&quot;Calculator&quot;);
+    private Logger logger = Logger.getLogger("Calculator");
 
     @Inject
     @Delegate
@@ -185,7 +215,7 @@ public class CalculatorLogging implement
 
     @Override
     public int add(int a, int b) {
-        logger.fine(String.format(&quot;add(%s, %s)&quot;, a, b));
+        logger.fine(String.format("add(%s, %s)", a, b));
         return calculator.add(a, b);
     }
 
@@ -196,7 +226,7 @@ public class CalculatorLogging implement
 
     @Override
     public int multiply(int a, int b) {
-        logger.finest(String.format(&quot;multiply(%s, %s)&quot;, a, b));
+        logger.finest(String.format("multiply(%s, %s)", a, b));
         return calculator.multiply(a, b);
     }
 
@@ -207,13 +237,20 @@ public class CalculatorLogging implement
 
     @Override
     public int remainder(int a, int b) {
-        logger.info(String.format(&quot;remainder(%s, %s)&quot;, a, b));
+        logger.info(String.format("remainder(%s, %s)", a, b));
         return calculator.remainder(a, b);
     }
-}
-</code></pre>
-<h2>CalculatorSecurity</h2>
-<pre><code>package org.superbiz.cdi.decorators;
+}</code></pre>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_calculatorsecurity">CalculatorSecurity</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.cdi.decorators;
 
 import javax.decorator.Decorator;
 import javax.decorator.Delegate;
@@ -238,7 +275,7 @@ public class CalculatorSecurity implemen
     @Override
     public int subtract(int a, int b) {
         // Caller must pass a security check to call subtract
-        if (!sessionContext.isCallerInRole(&quot;Manager&quot;)) throw new AccessDeniedException(sessionContext.getCallerPrincipal().getName());
+        if (!sessionContext.isCallerInRole("Manager")) throw new AccessDeniedException(sessionContext.getCallerPrincipal().getName());
 
         return calculator.subtract(a, b);
     }
@@ -257,10 +294,17 @@ public class CalculatorSecurity implemen
     public int remainder(int a, int b) {
         return calculator.remainder(a, b);
     }
-}
-</code></pre>
-<h2>beans.xml</h2>
-<pre><code>&lt;beans&gt;
+}</code></pre>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_beans_xml">beans.xml</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">&lt;beans&gt;
   &lt;!--
   Explicitly declaring decorators is required by the CDI specification.
   The order decorators are listed in the xml is the order in which they are invoked.
@@ -269,10 +313,17 @@ public class CalculatorSecurity implemen
     &lt;class&gt;org.superbiz.cdi.decorators.CalculatorSecurity&lt;/class&gt;
     &lt;class&gt;org.superbiz.cdi.decorators.CalculatorLogging&lt;/class&gt;
   &lt;/decorators&gt;
-&lt;/beans&gt;
-</code></pre>
-<h2>CalculatorTest</h2>
-<pre><code>package org.superbiz.cdi.decorators;
+&lt;/beans&gt;</code></pre>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_calculatortest">CalculatorTest</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.cdi.decorators;
 
 import junit.framework.TestCase;
 
@@ -296,7 +347,7 @@ public class CalculatorTest extends Test
      * @throws Exception
      */
     protected void setUp() throws Exception {
-        EJBContainer.createEJBContainer().getContext().bind(&quot;inject&quot;, this);
+        EJBContainer.createEJBContainer().getContext().bind("inject", this);
     }
 
     /**
@@ -315,7 +366,7 @@ public class CalculatorTest extends Test
         try {
             calculator.subtract(4, 6);
 
-            fail(&quot;AccessDeniedException should have been thrown for unauthenticated access&quot;);
+            fail("AccessDeniedException should have been thrown for unauthenticated access");
         } catch (AccessDeniedException expected) {
             // pass
         }
@@ -354,7 +405,7 @@ public class CalculatorTest extends Test
     }
 
     @Stateless
-    @RunAs(&quot;Manager&quot;)
+    @RunAs("Manager")
     public static class ManagerBean {
 
         public &lt;V&gt; V call(Callable&lt;V&gt; callable) {
@@ -365,10 +416,17 @@ public class CalculatorTest extends Test
             }
         }
     }
-}
-</code></pre>
-<h1>Running</h1>
-<pre><code>-------------------------------------------------------
+}</code></pre>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_running">Running</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="content">
+<pre>-------------------------------------------------------
  T E S T S
 -------------------------------------------------------
 Running org.superbiz.cdi.decorators.CalculatorTest
@@ -376,7 +434,7 @@ Apache OpenEJB 4.0.0-beta-1    build: 20
 http://tomee.apache.org/
 INFO - openejb.home = /Users/dblevins/examples/decorators
 INFO - openejb.base = /Users/dblevins/examples/decorators
-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/decorators/target/classes
@@ -384,21 +442,21 @@ INFO - Found EjbModule in classpath: /Us
 INFO - Beginning load: /Users/dblevins/examples/decorators/target/classes
 INFO - Beginning load: /Users/dblevins/examples/decorators/target/test-classes
 INFO - Configuring enterprise application: /Users/dblevins/examples/decorators
-WARN - Method &#39;lookup&#39; is not available for &#39;javax.annotation.Resource&#39;. Probably using an older Runtime.
+WARN - Method 'lookup' is not available for 'javax.annotation.Resource'. Probably using an older Runtime.
 INFO - Configuring Service(id=Default Managed Container, type=Container, provider-id=Default Managed Container)
 INFO - Auto-creating a container for bean decorators.Comp: Container(type=MANAGED, id=Default Managed Container)
 INFO - Configuring Service(id=Default Stateless Container, type=Container, provider-id=Default Stateless Container)
 INFO - Auto-creating a container for bean CalculatorBean: Container(type=STATELESS, id=Default Stateless Container)
-INFO - Enterprise application &quot;/Users/dblevins/examples/decorators&quot; loaded.
+INFO - Enterprise application "/Users/dblevins/examples/decorators" loaded.
 INFO - Assembling app: /Users/dblevins/examples/decorators
-INFO - Jndi(name=&quot;java:global/decorators/decorators.Comp!org.apache.openejb.BeanContext$Comp&quot;)
-INFO - Jndi(name=&quot;java:global/decorators/decorators.Comp&quot;)
-INFO - Jndi(name=&quot;java:global/decorators/CalculatorBean!org.superbiz.cdi.decorators.Calculator&quot;)
-INFO - Jndi(name=&quot;java:global/decorators/CalculatorBean&quot;)
-INFO - Jndi(name=&quot;java:global/decorators/ManagerBean!org.superbiz.cdi.decorators.CalculatorTest$ManagerBean&quot;)
-INFO - Jndi(name=&quot;java:global/decorators/ManagerBean&quot;)
-INFO - Jndi(name=&quot;java:global/EjbModule628834558/org.superbiz.cdi.decorators.CalculatorTest!org.superbiz.cdi.decorators.CalculatorTest&quot;)
-INFO - Jndi(name=&quot;java:global/EjbModule628834558/org.superbiz.cdi.decorators.CalculatorTest&quot;)
+INFO - Jndi(name="java:global/decorators/decorators.Comp!org.apache.openejb.BeanContext$Comp")
+INFO - Jndi(name="java:global/decorators/decorators.Comp")
+INFO - Jndi(name="java:global/decorators/CalculatorBean!org.superbiz.cdi.decorators.Calculator")
+INFO - Jndi(name="java:global/decorators/CalculatorBean")
+INFO - Jndi(name="java:global/decorators/ManagerBean!org.superbiz.cdi.decorators.CalculatorTest$ManagerBean")
+INFO - Jndi(name="java:global/decorators/ManagerBean")
+INFO - Jndi(name="java:global/EjbModule628834558/org.superbiz.cdi.decorators.CalculatorTest!org.superbiz.cdi.decorators.CalculatorTest")
+INFO - Jndi(name="java:global/EjbModule628834558/org.superbiz.cdi.decorators.CalculatorTest")
 INFO - Created Ejb(deployment-id=CalculatorBean, ejb-name=CalculatorBean, container=Default Stateless Container)
 INFO - Created Ejb(deployment-id=decorators.Comp, ejb-name=decorators.Comp, container=Default Managed Container)
 INFO - Created Ejb(deployment-id=ManagerBean, ejb-name=ManagerBean, container=Default Stateless Container)
@@ -470,7 +528,11 @@ Tests run: 5, Failures: 0, Errors: 0, Sk
 Results :
 
 Tests run: 5, Failures: 0, Errors: 0, Skipped: 0
-</code></pre>
+....</pre>
+</div>
+</div>
+</div>
+</div>
             </div>
             
         </div>

Modified: tomee/site/trunk/content/master/examples/index.html
URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/master/examples/index.html?rev=1850005&r1=1850004&r2=1850005&view=diff
==============================================================================
--- tomee/site/trunk/content/master/examples/index.html (original)
+++ tomee/site/trunk/content/master/examples/index.html Sun Dec 30 21:47:45 2018
@@ -102,7 +102,6 @@
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="cdi-produces-field.html">CDI Field Producer</a></li>
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="cdi-interceptors.html">CDI Interceptors</a></li>
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="cdi-produces-disposes.html">CDI Produces Disposes</a></li>
-              <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="decorators.html">Decorators</a></li>
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="simple-cdi-interceptor.html">Simple CDI Interceptor</a></li>
             </ul>
           </div>
@@ -153,6 +152,18 @@
             </ul>
           </div>
           <div class="col-md-4">
+            <div class="group-title">Unknown</div>
+            <ul class="group">
+              <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="cdi-alternative-and-stereotypes.html">cdi-alternative-and-stereotypes</a></li>
+              <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="cdi-session-scope.html">cdi-session-scope</a></li>
+              <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="connector-war.html">connector-war</a></li>
+              <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="decorators.html">decorators</a></li>
+              <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="java-modules.html">Java modules example with a simple REST resource</a></li>
+            </ul>
+          </div>
+        </div>
+        <div class="row">
+          <div class="col-md-4">
             <div class="group-title">Meta-Annotations</div>
             <ul class="group">
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="access-timeout-meta.html">@AccessTimeout the Meta-Annotation Way</a></li>
@@ -162,8 +173,6 @@
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="testing-security-meta.html">Testing Security Meta</a></li>
             </ul>
           </div>
-        </div>
-        <div class="row">
           <div class="col-md-4">
             <div class="group-title">Session Beans</div>
             <ul class="group">
@@ -182,6 +191,8 @@
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="resources-declared-in-webapp.html">Resources Declared in Webapp</a></li>
             </ul>
           </div>
+        </div>
+        <div class="row">
           <div class="col-md-4">
             <div class="group-title">Other Features</div>
             <ul class="group">
@@ -191,8 +202,6 @@
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="troubleshooting.html">Troubleshooting</a></li>
             </ul>
           </div>
-        </div>
-        <div class="row">
           <div class="col-md-4">
             <div class="group-title">EntityManagers</div>
             <ul class="group">
@@ -210,6 +219,8 @@
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="lookup-of-ejbs-with-descriptor.html">Lookup Of Ejbs with Descriptor</a></li>
             </ul>
           </div>
+        </div>
+        <div class="row">
           <div class="col-md-4">
             <div class="group-title">Security</div>
             <ul class="group">
@@ -218,8 +229,6 @@
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="testing-security-3.html">Testing Security 3</a></li>
             </ul>
           </div>
-        </div>
-        <div class="row">
           <div class="col-md-4">
             <div class="group-title">JMS and MDBs</div>
             <ul class="group">
@@ -236,6 +245,8 @@
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="transaction-rollback.html">Transaction Rollback</a></li>
             </ul>
           </div>
+        </div>
+        <div class="row">
           <div class="col-md-4">
             <div class="group-title">Proxy Beans</div>
             <ul class="group">
@@ -244,16 +255,6 @@
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="dynamic-proxy-to-access-mbean.html">Dynamic Proxy to Access MBean</a></li>
             </ul>
           </div>
-        </div>
-        <div class="row">
-          <div class="col-md-4">
-            <div class="group-title">Unknown</div>
-            <ul class="group">
-              <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="cdi-alternative-and-stereotypes.html">cdi-alternative-and-stereotypes</a></li>
-              <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="cdi-session-scope.html">cdi-session-scope</a></li>
-              <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="java-modules.html">Java modules example with a simple REST resource</a></li>
-            </ul>
-          </div>
           <div class="col-md-4">
             <div class="group-title">Frameworks</div>
             <ul class="group">
@@ -365,23 +366,22 @@
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="resources-jmx-example.html">Custom resources in an EAR archive</a></li>
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="datasource-versioning.html">DataSource Versioning</a></li>
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="realm-in-tomee.html">DataSourceRealm and TomEE DataSource</a></li>
-              <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="javamail.html">Javamail API</a></li>
             </ul>
           </div>
           <div class="col-md-4">
             <ul class="group">
-              <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="connector-war.html">Movies Complete</a></li>
+              <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="javamail.html">Javamail API</a></li>
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="mtom.html">mtom</a></li>
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="myfaces-codi-demo.html">MyFaces CODI Demo</a></li>
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="persistence-fragment.html">Persistence Fragment</a></li>
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="reload-persistence-unit-properties.html">Reload Persistence Unit Properties</a></li>
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="schedule-events.html">Schedule CDI Events</a></li>
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="simple-mdb-and-cdi.html">Simple MDB and CDI</a></li>
-              <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="rest-xml-json.html">Simple REST</a></li>
             </ul>
           </div>
           <div class="col-md-4">
             <ul class="group">
+              <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="rest-xml-json.html">Simple REST</a></li>
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="rest-cdi.html">Simple REST with CDI</a></li>
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="simple-stateful-callbacks.html">Simple Stateful with callback methods</a></li>
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="simple-stateless-callbacks.html">Simple Stateless with callback methods</a></li>

Modified: tomee/site/trunk/content/tomee-8.0/examples/connector-war.html
URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/tomee-8.0/examples/connector-war.html?rev=1850005&r1=1850004&r2=1850005&view=diff
==============================================================================
--- tomee/site/trunk/content/tomee-8.0/examples/connector-war.html (original)
+++ tomee/site/trunk/content/tomee-8.0/examples/connector-war.html Sun Dec 30 21:47:45 2018
@@ -88,17 +88,25 @@
           <div class="col-md-12">
             <div class='page-header'>
               
-              <h1>Movies Complete</h1>
+              <h1>null</h1>
             </div>
           </div>
         </div>
         <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><a href="https://codenvy.com/f?id=9er0fn1kh832sa35"><img src="https://tomitribe.github.io/codenvy/tryitout.svg" alt="Try it out in Codenvy" /></a></p>
-<h2>AddInterceptor</h2>
-<pre><code>package org.superbiz.injection.tx;
+                <div class="paragraph">
+<p>index-group=Java EE Connectors
+type=page
+status=published</p>
+</div>
+<h1 id="_connectors_in_war_files" class="sect0">Connectors in WAR Files</h1>
+<div class="sect1">
+<h2 id="_addinterceptor">AddInterceptor</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.injection.tx;
 
 import javax.interceptor.AroundInvoke;
 import javax.interceptor.InvocationContext;
@@ -113,10 +121,17 @@ public class AddInterceptor {
         // Log Add
         return context.proceed();
     }
-}
-</code></pre>
-<h2>DeleteInterceptor</h2>
-<pre><code>package org.superbiz.injection.tx;
+}</code></pre>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_deleteinterceptor">DeleteInterceptor</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.injection.tx;
 
 import javax.interceptor.AroundInvoke;
 import javax.interceptor.InvocationContext;
@@ -131,10 +146,17 @@ public class DeleteInterceptor {
         // Log Delete
         return context.proceed();
     }
-}
-</code></pre>
-<h2>Movie</h2>
-<pre><code>package org.superbiz.injection.tx;
+}</code></pre>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_movie">Movie</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.injection.tx;
 
 import javax.persistence.Entity;
 
@@ -178,10 +200,17 @@ public class Movie {
         this.year = year;
     }
 
-}
-</code></pre>
-<h2>Movies</h2>
-<pre><code>package org.superbiz.injection.tx;
+}</code></pre>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_movies">Movies</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="content">
+<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;
@@ -199,17 +228,17 @@ import java.util.List;
 @Stateful
 public class Movies {
 
-    @PersistenceContext(unitName = &quot;movie-unit&quot;, type = PersistenceContextType.TRANSACTION)
+    @PersistenceContext(unitName = "movie-unit", type = PersistenceContextType.TRANSACTION)
     private EntityManager entityManager;
 
-    @RolesAllowed({&quot;Employee&quot;, &quot;Manager&quot;})
+    @RolesAllowed({"Employee", "Manager"})
     @TransactionAttribute(TransactionAttributeType.REQUIRED)
     @Interceptors(AddInterceptor.class)
     public void addMovie(Movie movie) throws Exception {
         entityManager.persist(movie);
     }
 
-    @RolesAllowed({&quot;Manager&quot;})
+    @RolesAllowed({"Manager"})
     @TransactionAttribute(TransactionAttributeType.MANDATORY)
     @Interceptors(DeleteInterceptor.class)
     public void deleteMovie(Movie movie) throws Exception {
@@ -219,13 +248,20 @@ public class Movies {
     @PermitAll
     @TransactionAttribute(TransactionAttributeType.SUPPORTS)
     public List&lt;Movie&gt; getMovies() throws Exception {
-        Query query = entityManager.createQuery(&quot;SELECT m from Movie as m&quot;);
+        Query query = entityManager.createQuery("SELECT m from Movie as m");
         return query.getResultList();
     }
-}
-</code></pre>
-<h2>ReadInterceptor</h2>
-<pre><code>package org.superbiz.injection.tx;
+}</code></pre>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_readinterceptor">ReadInterceptor</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.injection.tx;
 
 import javax.interceptor.AroundInvoke;
 import javax.interceptor.InvocationContext;
@@ -241,27 +277,48 @@ public class ReadInterceptor {
         return context.proceed();
     }
 }
-</code></pre>
-<h2>persistence.xml</h2>
-<pre><code>&lt;persistence xmlns=&quot;http://java.sun.com/xml/ns/persistence&quot; version=&quot;1.0&quot;&gt;
-
-  &lt;persistence-unit name=&quot;movie-unit&quot;&gt;
-    &lt;jta-data-source&gt;movieDatabase&lt;/jta-data-source&gt;
-    &lt;non-jta-data-source&gt;movieDatabaseUnmanaged&lt;/non-jta-data-source&gt;
-    &lt;class&gt;org.superbiz.injection.tx.Movie&lt;/class&gt;
+....
+
+== persistence.xml
 
-    &lt;properties&gt;
-      &lt;property name=&quot;openjpa.jdbc.SynchronizeMappings&quot; value=&quot;buildSchema(ForeignKeys=true)&quot;/&gt;
+[source,xml]</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>&lt;persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0"&gt;</p>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>&lt;persistence-unit name="movie-unit"&gt;
+  &lt;jta-data-source&gt;movieDatabase&lt;/jta-data-source&gt;
+  &lt;non-jta-data-source&gt;movieDatabaseUnmanaged&lt;/non-jta-data-source&gt;
+  &lt;class&gt;org.superbiz.injection.tx.Movie&lt;/class&gt;</pre>
+</div>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>    &lt;properties&gt;
+      &lt;property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/&gt;
     &lt;/properties&gt;
   &lt;/persistence-unit&gt;
-&lt;/persistence&gt;
-</code></pre>
-<h2>MoviesTest</h2>
-<pre><code>package org.superbiz.injection.tx;
-
-import junit.framework.TestCase;
-
-import javax.annotation.security.RunAs;
+&lt;/persistence&gt;</pre>
+</div>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>== MoviesTest
+
+[source,java]</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>package org.superbiz.injection.tx;</p>
+</div>
+<div class="paragraph">
+<p>import junit.framework.TestCase;</p>
+</div>
+<div class="paragraph">
+<p>import javax.annotation.security.RunAs;
 import javax.ejb.EJB;
 import javax.ejb.Stateless;
 import javax.ejb.TransactionAttribute;
@@ -269,114 +326,172 @@ import javax.ejb.TransactionAttributeTyp
 import javax.ejb.embeddable.EJBContainer;
 import java.util.List;
 import java.util.Properties;
-import java.util.concurrent.Callable;
-
-import static javax.ejb.TransactionAttributeType.REQUIRES_NEW;
-
-/**
+import java.util.concurrent.Callable;</p>
+</div>
+<div class="paragraph">
+<p>import static javax.ejb.TransactionAttributeType.REQUIRES_NEW;</p>
+</div>
+<div class="paragraph">
+<p>/**
  * See the transaction-rollback example as it does the same thing
- * via UserTransaction and shows more techniques for rollback 
+ * via UserTransaction and shows more techniques for rollback
  */
-//START SNIPPET: code
-public class MoviesTest extends TestCase {
-
-    @EJB
-    private Movies movies;
-
-    @EJB(beanName = &quot;TransactionBean&quot;)
-    private Caller transactionalCaller;
-
-    @EJB(beanName = &quot;NoTransactionBean&quot;)
-    private Caller nonTransactionalCaller;
-
-    protected void setUp() throws Exception {
-        final Properties p = new Properties();
-        p.put(&quot;movieDatabase&quot;, &quot;new://Resource?type=DataSource&quot;);
-        p.put(&quot;movieDatabase.JdbcDriver&quot;, &quot;org.hsqldb.jdbcDriver&quot;);
-        p.put(&quot;movieDatabase.JdbcUrl&quot;, &quot;jdbc:hsqldb:mem:moviedb&quot;);
-
-        EJBContainer.createEJBContainer(p).getContext().bind(&quot;inject&quot;, this);
-    }
-
-    private void doWork() throws Exception {
-
-        movies.addMovie(new Movie(&quot;Quentin Tarantino&quot;, &quot;Reservoir Dogs&quot;, 1992));
-        movies.addMovie(new Movie(&quot;Joel Coen&quot;, &quot;Fargo&quot;, 1996));
-        movies.addMovie(new Movie(&quot;Joel Coen&quot;, &quot;The Big Lebowski&quot;, 1998));
-
-        List&lt;Movie&gt; list = movies.getMovies();
-        assertEquals(&quot;List.size()&quot;, 3, list.size());
-
-        for (Movie movie : list) {
-            movies.deleteMovie(movie);
+public class MoviesTest extends TestCase {</p>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>@EJB
+private Movies movies;</pre>
+</div>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>@EJB(beanName = "TransactionBean")
+private Caller transactionalCaller;</pre>
+</div>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>@EJB(beanName = "NoTransactionBean")
+private Caller nonTransactionalCaller;</pre>
+</div>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>protected void setUp() throws Exception {
+    final Properties p = new Properties();
+    p.put("movieDatabase", "new://Resource?type=DataSource");
+    p.put("movieDatabase.JdbcDriver", "org.hsqldb.jdbcDriver");
+    p.put("movieDatabase.JdbcUrl", "jdbc:hsqldb:mem:moviedb");</pre>
+</div>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>    EJBContainer.createEJBContainer(p).getContext().bind("inject", this);
+}</pre>
+</div>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>private void doWork() throws Exception {</pre>
+</div>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>movies.addMovie(new Movie("Quentin Tarantino", "Reservoir Dogs", 1992));
+movies.addMovie(new Movie("Joel Coen", "Fargo", 1996));
+movies.addMovie(new Movie("Joel Coen", "The Big Lebowski", 1998));</pre>
+</div>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>List&lt;Movie&gt; list = movies.getMovies();
+assertEquals("List.size()", 3, list.size());</pre>
+</div>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>for (Movie movie : list) {
+    movies.deleteMovie(movie);
+}</pre>
+</div>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>    assertEquals("Movies.getMovies()", 0, movies.getMovies().size());
+}</pre>
+</div>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>public void testWithTransaction() throws Exception {
+    transactionalCaller.call(new Callable() {
+        public Object call() throws Exception {
+            doWork();
+            return null;
         }
-
-        assertEquals(&quot;Movies.getMovies()&quot;, 0, movies.getMovies().size());
-    }
-
-    public void testWithTransaction() throws Exception {
-        transactionalCaller.call(new Callable() {
+    });
+}</pre>
+</div>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>public void testWithoutTransaction() throws Exception {
+    try {
+        nonTransactionalCaller.call(new Callable() {
             public Object call() throws Exception {
                 doWork();
                 return null;
             }
         });
-    }
-
-    public void testWithoutTransaction() throws Exception {
-        try {
-            nonTransactionalCaller.call(new Callable() {
-                public Object call() throws Exception {
-                    doWork();
-                    return null;
-                }
-            });
-            fail(&quot;The Movies bean should be using TransactionAttributeType.MANDATORY&quot;);
-        } catch (javax.ejb.EJBException e) {
-            // good, our Movies bean is using TransactionAttributeType.MANDATORY as we want
-        }
-    }
-
-
-    public static interface Caller {
-        public &lt;V&gt; V call(Callable&lt;V&gt; callable) throws Exception;
-    }
-
-    /**
-     * This little bit of magic allows our test code to execute in
-     * the scope of a container controlled transaction.
-     */
-    @Stateless
-    @RunAs(&quot;Manager&quot;)
-    @TransactionAttribute(REQUIRES_NEW)
-    public static class TransactionBean implements Caller {
-
-        public &lt;V&gt; V call(Callable&lt;V&gt; callable) throws Exception {
-            return callable.call();
-        }
-    }
-
-    @Stateless
-    @RunAs(&quot;Manager&quot;)
-    @TransactionAttribute(TransactionAttributeType.NEVER)
-    public static class NoTransactionBean implements Caller {
-
-        public &lt;V&gt; V call(Callable&lt;V&gt; callable) throws Exception {
+        fail("The Movies bean should be using TransactionAttributeType.MANDATORY");
+    } catch (javax.ejb.EJBException e) {
+        // good, our Movies bean is using TransactionAttributeType.MANDATORY as we want
+    }
+}</pre>
+</div>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>public static interface Caller {
+    public &lt;V&gt; V call(Callable&lt;V&gt; callable) throws Exception;
+}</pre>
+</div>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>/**
+ * This little bit of magic allows our test code to execute in
+ * the scope of a container controlled transaction.
+ */
+@Stateless
+@RunAs("Manager")
+@TransactionAttribute(REQUIRES_NEW)
+public static class TransactionBean implements Caller {</pre>
+</div>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>    public &lt;V&gt; V call(Callable&lt;V&gt; callable) throws Exception {
+        return callable.call();
+    }
+}</pre>
+</div>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>@Stateless
+@RunAs("Manager")
+@TransactionAttribute(TransactionAttributeType.NEVER)
+public static class NoTransactionBean implements Caller {</pre>
+</div>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>        public &lt;V&gt; V call(Callable&lt;V&gt; callable) throws Exception {
             return callable.call();
         }
     }
-}
-</code></pre>
-<h1>Running</h1>
-<pre><code>-------------------------------------------------------
- T E S T S
--------------------------------------------------------
-Running org.superbiz.injection.tx.MoviesTest
+}</pre>
+</div>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>== Running</pre>
+</div>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre> T E S T S</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Running org.superbiz.injection.tx.MoviesTest
 Apache OpenEJB 4.0.0-beta-1    build: 20111002-04:06
-http://tomee.apache.org/
+<a href="http://tomee.apache.org/" class="bare">http://tomee.apache.org/</a>
 INFO - openejb.home = /Users/dblevins/examples/movies-complete
 INFO - openejb.base = /Users/dblevins/examples/movies-complete
-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 - Configuring Service(id=movieDatabase, type=Resource, provider-id=Default JDBC Database)
@@ -392,20 +507,20 @@ INFO - Auto-creating a container for bea
 INFO - Configuring Service(id=Default Managed Container, type=Container, provider-id=Default Managed Container)
 INFO - Auto-creating a container for bean org.superbiz.injection.tx.MoviesTest: Container(type=MANAGED, id=Default Managed Container)
 INFO - Configuring PersistenceUnit(name=movie-unit)
-INFO - Auto-creating a Resource with id &#39;movieDatabaseNonJta&#39; of type &#39;DataSource for &#39;movie-unit&#39;.
+INFO - Auto-creating a Resource with id 'movieDatabaseNonJta' of type 'DataSource for 'movie-unit'.
 INFO - Configuring Service(id=movieDatabaseNonJta, type=Resource, provider-id=movieDatabase)
-INFO - Adjusting PersistenceUnit movie-unit &lt;non-jta-data-source&gt; to Resource ID &#39;movieDatabaseNonJta&#39; from &#39;movieDatabaseUnmanaged&#39;
-INFO - Enterprise application &quot;/Users/dblevins/examples/movies-complete&quot; loaded.
+INFO - Adjusting PersistenceUnit movie-unit &lt;non-jta-data-source&gt; to Resource ID 'movieDatabaseNonJta' from 'movieDatabaseUnmanaged'
+INFO - Enterprise application "/Users/dblevins/examples/movies-complete" loaded.
 INFO - Assembling app: /Users/dblevins/examples/movies-complete
 INFO - PersistenceUnit(name=movie-unit, provider=org.apache.openjpa.persistence.PersistenceProviderImpl) - provider time 402ms
-INFO - Jndi(name=&quot;java:global/movies-complete/Movies!org.superbiz.injection.tx.Movies&quot;)
-INFO - Jndi(name=&quot;java:global/movies-complete/Movies&quot;)
-INFO - Jndi(name=&quot;java:global/movies-complete/TransactionBean!org.superbiz.injection.tx.MoviesTest$Caller&quot;)
-INFO - Jndi(name=&quot;java:global/movies-complete/TransactionBean&quot;)
-INFO - Jndi(name=&quot;java:global/movies-complete/NoTransactionBean!org.superbiz.injection.tx.MoviesTest$Caller&quot;)
-INFO - Jndi(name=&quot;java:global/movies-complete/NoTransactionBean&quot;)
-INFO - Jndi(name=&quot;java:global/EjbModule1013462002/org.superbiz.injection.tx.MoviesTest!org.superbiz.injection.tx.MoviesTest&quot;)
-INFO - Jndi(name=&quot;java:global/EjbModule1013462002/org.superbiz.injection.tx.MoviesTest&quot;)
+INFO - Jndi(name="java:global/movies-complete/Movies!org.superbiz.injection.tx.Movies")
+INFO - Jndi(name="java:global/movies-complete/Movies")
+INFO - Jndi(name="java:global/movies-complete/TransactionBean!org.superbiz.injection.tx.MoviesTest$Caller")
+INFO - Jndi(name="java:global/movies-complete/TransactionBean")
+INFO - Jndi(name="java:global/movies-complete/NoTransactionBean!org.superbiz.injection.tx.MoviesTest$Caller")
+INFO - Jndi(name="java:global/movies-complete/NoTransactionBean")
+INFO - Jndi(name="java:global/EjbModule1013462002/org.superbiz.injection.tx.MoviesTest!org.superbiz.injection.tx.MoviesTest")
+INFO - Jndi(name="java:global/EjbModule1013462002/org.superbiz.injection.tx.MoviesTest")
 INFO - Created Ejb(deployment-id=Movies, ejb-name=Movies, container=Default Stateful Container)
 INFO - Created Ejb(deployment-id=NoTransactionBean, ejb-name=NoTransactionBean, container=Default Stateless Container)
 INFO - Created Ejb(deployment-id=TransactionBean, ejb-name=TransactionBean, container=Default Stateless Container)
@@ -416,12 +531,21 @@ INFO - Started Ejb(deployment-id=Transac
 INFO - Started Ejb(deployment-id=org.superbiz.injection.tx.MoviesTest, ejb-name=org.superbiz.injection.tx.MoviesTest, container=Default Managed Container)
 INFO - Deployed Application(path=/Users/dblevins/examples/movies-complete)
 INFO - EJBContainer already initialized.  Call ejbContainer.close() to allow reinitialization
-Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.418 sec
-
-Results :
-
-Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
-</code></pre>
+Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.418 sec</p>
+</div>
+<div class="paragraph">
+<p>Results :</p>
+</div>
+<div class="paragraph">
+<p>Tests run: 2, Failures: 0, Errors: 0, Skipped: 0</p>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre></pre>
+</div>
+</div>
+</div>
+</div>
             </div>
             
         </div>

Modified: tomee/site/trunk/content/tomee-8.0/examples/decorators.html
URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/tomee-8.0/examples/decorators.html?rev=1850005&r1=1850004&r2=1850005&view=diff
==============================================================================
--- tomee/site/trunk/content/tomee-8.0/examples/decorators.html (original)
+++ tomee/site/trunk/content/tomee-8.0/examples/decorators.html Sun Dec 30 21:47:45 2018
@@ -88,16 +88,25 @@
           <div class="col-md-12">
             <div class='page-header'>
               
-              <h1>Decorators</h1>
+              <h1>null</h1>
             </div>
           </div>
         </div>
         <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>
-<h2>AccessDeniedException</h2>
-<pre><code>package org.superbiz.cdi.decorators;
+                <div class="paragraph">
+<p>index-group=CDI
+type=page
+status=published</p>
+</div>
+<h1 id="_decorators" class="sect0">Decorators</h1>
+<div class="sect1">
+<h2 id="_accessdeniedexception">AccessDeniedException</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.cdi.decorators;
 
 import javax.ejb.ApplicationException;
 
@@ -109,10 +118,17 @@ public class AccessDeniedException exten
     public AccessDeniedException(String s) {
         super(s);
     }
-}
-</code></pre>
-<h2>Calculator</h2>
-<pre><code>package org.superbiz.cdi.decorators;
+}</code></pre>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_calculator">Calculator</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.cdi.decorators;
 
 /**
  * @version $Revision$ $Date$
@@ -128,10 +144,17 @@ public interface Calculator {
     public int divide(int a, int b);
 
     public int remainder(int a, int b);
-}
-</code></pre>
-<h2>CalculatorBean</h2>
-<pre><code>package org.superbiz.cdi.decorators;
+}</code></pre>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_calculatorbean">CalculatorBean</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.cdi.decorators;
 
 import javax.annotation.Resource;
 import javax.ejb.SessionContext;
@@ -164,10 +187,17 @@ public class CalculatorBean implements C
     public int remainder(int a, int b) {
         return a % b;
     }
-}
-</code></pre>
-<h2>CalculatorLogging</h2>
-<pre><code>package org.superbiz.cdi.decorators;
+}</code></pre>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_calculatorlogging">CalculatorLogging</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.cdi.decorators;
 
 import javax.decorator.Decorator;
 import javax.decorator.Delegate;
@@ -177,7 +207,7 @@ import java.util.logging.Logger;
 @Decorator
 public class CalculatorLogging implements Calculator {
 
-    private Logger logger = Logger.getLogger(&quot;Calculator&quot;);
+    private Logger logger = Logger.getLogger("Calculator");
 
     @Inject
     @Delegate
@@ -185,7 +215,7 @@ public class CalculatorLogging implement
 
     @Override
     public int add(int a, int b) {
-        logger.fine(String.format(&quot;add(%s, %s)&quot;, a, b));
+        logger.fine(String.format("add(%s, %s)", a, b));
         return calculator.add(a, b);
     }
 
@@ -196,7 +226,7 @@ public class CalculatorLogging implement
 
     @Override
     public int multiply(int a, int b) {
-        logger.finest(String.format(&quot;multiply(%s, %s)&quot;, a, b));
+        logger.finest(String.format("multiply(%s, %s)", a, b));
         return calculator.multiply(a, b);
     }
 
@@ -207,13 +237,20 @@ public class CalculatorLogging implement
 
     @Override
     public int remainder(int a, int b) {
-        logger.info(String.format(&quot;remainder(%s, %s)&quot;, a, b));
+        logger.info(String.format("remainder(%s, %s)", a, b));
         return calculator.remainder(a, b);
     }
-}
-</code></pre>
-<h2>CalculatorSecurity</h2>
-<pre><code>package org.superbiz.cdi.decorators;
+}</code></pre>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_calculatorsecurity">CalculatorSecurity</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.cdi.decorators;
 
 import javax.decorator.Decorator;
 import javax.decorator.Delegate;
@@ -238,7 +275,7 @@ public class CalculatorSecurity implemen
     @Override
     public int subtract(int a, int b) {
         // Caller must pass a security check to call subtract
-        if (!sessionContext.isCallerInRole(&quot;Manager&quot;)) throw new AccessDeniedException(sessionContext.getCallerPrincipal().getName());
+        if (!sessionContext.isCallerInRole("Manager")) throw new AccessDeniedException(sessionContext.getCallerPrincipal().getName());
 
         return calculator.subtract(a, b);
     }
@@ -257,10 +294,17 @@ public class CalculatorSecurity implemen
     public int remainder(int a, int b) {
         return calculator.remainder(a, b);
     }
-}
-</code></pre>
-<h2>beans.xml</h2>
-<pre><code>&lt;beans&gt;
+}</code></pre>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_beans_xml">beans.xml</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">&lt;beans&gt;
   &lt;!--
   Explicitly declaring decorators is required by the CDI specification.
   The order decorators are listed in the xml is the order in which they are invoked.
@@ -269,10 +313,17 @@ public class CalculatorSecurity implemen
     &lt;class&gt;org.superbiz.cdi.decorators.CalculatorSecurity&lt;/class&gt;
     &lt;class&gt;org.superbiz.cdi.decorators.CalculatorLogging&lt;/class&gt;
   &lt;/decorators&gt;
-&lt;/beans&gt;
-</code></pre>
-<h2>CalculatorTest</h2>
-<pre><code>package org.superbiz.cdi.decorators;
+&lt;/beans&gt;</code></pre>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_calculatortest">CalculatorTest</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">package org.superbiz.cdi.decorators;
 
 import junit.framework.TestCase;
 
@@ -296,7 +347,7 @@ public class CalculatorTest extends Test
      * @throws Exception
      */
     protected void setUp() throws Exception {
-        EJBContainer.createEJBContainer().getContext().bind(&quot;inject&quot;, this);
+        EJBContainer.createEJBContainer().getContext().bind("inject", this);
     }
 
     /**
@@ -315,7 +366,7 @@ public class CalculatorTest extends Test
         try {
             calculator.subtract(4, 6);
 
-            fail(&quot;AccessDeniedException should have been thrown for unauthenticated access&quot;);
+            fail("AccessDeniedException should have been thrown for unauthenticated access");
         } catch (AccessDeniedException expected) {
             // pass
         }
@@ -354,7 +405,7 @@ public class CalculatorTest extends Test
     }
 
     @Stateless
-    @RunAs(&quot;Manager&quot;)
+    @RunAs("Manager")
     public static class ManagerBean {
 
         public &lt;V&gt; V call(Callable&lt;V&gt; callable) {
@@ -365,10 +416,17 @@ public class CalculatorTest extends Test
             }
         }
     }
-}
-</code></pre>
-<h1>Running</h1>
-<pre><code>-------------------------------------------------------
+}</code></pre>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_running">Running</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="content">
+<pre>-------------------------------------------------------
  T E S T S
 -------------------------------------------------------
 Running org.superbiz.cdi.decorators.CalculatorTest
@@ -376,7 +434,7 @@ Apache OpenEJB 4.0.0-beta-1    build: 20
 http://tomee.apache.org/
 INFO - openejb.home = /Users/dblevins/examples/decorators
 INFO - openejb.base = /Users/dblevins/examples/decorators
-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/decorators/target/classes
@@ -384,21 +442,21 @@ INFO - Found EjbModule in classpath: /Us
 INFO - Beginning load: /Users/dblevins/examples/decorators/target/classes
 INFO - Beginning load: /Users/dblevins/examples/decorators/target/test-classes
 INFO - Configuring enterprise application: /Users/dblevins/examples/decorators
-WARN - Method &#39;lookup&#39; is not available for &#39;javax.annotation.Resource&#39;. Probably using an older Runtime.
+WARN - Method 'lookup' is not available for 'javax.annotation.Resource'. Probably using an older Runtime.
 INFO - Configuring Service(id=Default Managed Container, type=Container, provider-id=Default Managed Container)
 INFO - Auto-creating a container for bean decorators.Comp: Container(type=MANAGED, id=Default Managed Container)
 INFO - Configuring Service(id=Default Stateless Container, type=Container, provider-id=Default Stateless Container)
 INFO - Auto-creating a container for bean CalculatorBean: Container(type=STATELESS, id=Default Stateless Container)
-INFO - Enterprise application &quot;/Users/dblevins/examples/decorators&quot; loaded.
+INFO - Enterprise application "/Users/dblevins/examples/decorators" loaded.
 INFO - Assembling app: /Users/dblevins/examples/decorators
-INFO - Jndi(name=&quot;java:global/decorators/decorators.Comp!org.apache.openejb.BeanContext$Comp&quot;)
-INFO - Jndi(name=&quot;java:global/decorators/decorators.Comp&quot;)
-INFO - Jndi(name=&quot;java:global/decorators/CalculatorBean!org.superbiz.cdi.decorators.Calculator&quot;)
-INFO - Jndi(name=&quot;java:global/decorators/CalculatorBean&quot;)
-INFO - Jndi(name=&quot;java:global/decorators/ManagerBean!org.superbiz.cdi.decorators.CalculatorTest$ManagerBean&quot;)
-INFO - Jndi(name=&quot;java:global/decorators/ManagerBean&quot;)
-INFO - Jndi(name=&quot;java:global/EjbModule628834558/org.superbiz.cdi.decorators.CalculatorTest!org.superbiz.cdi.decorators.CalculatorTest&quot;)
-INFO - Jndi(name=&quot;java:global/EjbModule628834558/org.superbiz.cdi.decorators.CalculatorTest&quot;)
+INFO - Jndi(name="java:global/decorators/decorators.Comp!org.apache.openejb.BeanContext$Comp")
+INFO - Jndi(name="java:global/decorators/decorators.Comp")
+INFO - Jndi(name="java:global/decorators/CalculatorBean!org.superbiz.cdi.decorators.Calculator")
+INFO - Jndi(name="java:global/decorators/CalculatorBean")
+INFO - Jndi(name="java:global/decorators/ManagerBean!org.superbiz.cdi.decorators.CalculatorTest$ManagerBean")
+INFO - Jndi(name="java:global/decorators/ManagerBean")
+INFO - Jndi(name="java:global/EjbModule628834558/org.superbiz.cdi.decorators.CalculatorTest!org.superbiz.cdi.decorators.CalculatorTest")
+INFO - Jndi(name="java:global/EjbModule628834558/org.superbiz.cdi.decorators.CalculatorTest")
 INFO - Created Ejb(deployment-id=CalculatorBean, ejb-name=CalculatorBean, container=Default Stateless Container)
 INFO - Created Ejb(deployment-id=decorators.Comp, ejb-name=decorators.Comp, container=Default Managed Container)
 INFO - Created Ejb(deployment-id=ManagerBean, ejb-name=ManagerBean, container=Default Stateless Container)
@@ -470,7 +528,11 @@ Tests run: 5, Failures: 0, Errors: 0, Sk
 Results :
 
 Tests run: 5, Failures: 0, Errors: 0, Skipped: 0
-</code></pre>
+....</pre>
+</div>
+</div>
+</div>
+</div>
             </div>
             
         </div>

Modified: tomee/site/trunk/content/tomee-8.0/examples/index.html
URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/tomee-8.0/examples/index.html?rev=1850005&r1=1850004&r2=1850005&view=diff
==============================================================================
--- tomee/site/trunk/content/tomee-8.0/examples/index.html (original)
+++ tomee/site/trunk/content/tomee-8.0/examples/index.html Sun Dec 30 21:47:45 2018
@@ -102,7 +102,6 @@
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="cdi-produces-field.html">CDI Field Producer</a></li>
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="cdi-interceptors.html">CDI Interceptors</a></li>
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="cdi-produces-disposes.html">CDI Produces Disposes</a></li>
-              <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="decorators.html">Decorators</a></li>
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="simple-cdi-interceptor.html">Simple CDI Interceptor</a></li>
             </ul>
           </div>
@@ -153,6 +152,18 @@
             </ul>
           </div>
           <div class="col-md-4">
+            <div class="group-title">Unknown</div>
+            <ul class="group">
+              <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="cdi-alternative-and-stereotypes.html">cdi-alternative-and-stereotypes</a></li>
+              <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="cdi-session-scope.html">cdi-session-scope</a></li>
+              <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="connector-war.html">connector-war</a></li>
+              <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="decorators.html">decorators</a></li>
+              <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="java-modules.html">Java modules example with a simple REST resource</a></li>
+            </ul>
+          </div>
+        </div>
+        <div class="row">
+          <div class="col-md-4">
             <div class="group-title">Meta-Annotations</div>
             <ul class="group">
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="access-timeout-meta.html">@AccessTimeout the Meta-Annotation Way</a></li>
@@ -162,8 +173,6 @@
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="testing-security-meta.html">Testing Security Meta</a></li>
             </ul>
           </div>
-        </div>
-        <div class="row">
           <div class="col-md-4">
             <div class="group-title">Session Beans</div>
             <ul class="group">
@@ -182,6 +191,8 @@
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="resources-declared-in-webapp.html">Resources Declared in Webapp</a></li>
             </ul>
           </div>
+        </div>
+        <div class="row">
           <div class="col-md-4">
             <div class="group-title">Other Features</div>
             <ul class="group">
@@ -191,8 +202,6 @@
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="troubleshooting.html">Troubleshooting</a></li>
             </ul>
           </div>
-        </div>
-        <div class="row">
           <div class="col-md-4">
             <div class="group-title">EntityManagers</div>
             <ul class="group">
@@ -210,6 +219,8 @@
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="lookup-of-ejbs-with-descriptor.html">Lookup Of Ejbs with Descriptor</a></li>
             </ul>
           </div>
+        </div>
+        <div class="row">
           <div class="col-md-4">
             <div class="group-title">Security</div>
             <ul class="group">
@@ -218,8 +229,6 @@
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="testing-security-3.html">Testing Security 3</a></li>
             </ul>
           </div>
-        </div>
-        <div class="row">
           <div class="col-md-4">
             <div class="group-title">JMS and MDBs</div>
             <ul class="group">
@@ -236,6 +245,8 @@
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="transaction-rollback.html">Transaction Rollback</a></li>
             </ul>
           </div>
+        </div>
+        <div class="row">
           <div class="col-md-4">
             <div class="group-title">Proxy Beans</div>
             <ul class="group">
@@ -244,16 +255,6 @@
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="dynamic-proxy-to-access-mbean.html">Dynamic Proxy to Access MBean</a></li>
             </ul>
           </div>
-        </div>
-        <div class="row">
-          <div class="col-md-4">
-            <div class="group-title">Unknown</div>
-            <ul class="group">
-              <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="cdi-alternative-and-stereotypes.html">cdi-alternative-and-stereotypes</a></li>
-              <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="cdi-session-scope.html">cdi-session-scope</a></li>
-              <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="java-modules.html">Java modules example with a simple REST resource</a></li>
-            </ul>
-          </div>
           <div class="col-md-4">
             <div class="group-title">Frameworks</div>
             <ul class="group">
@@ -365,23 +366,22 @@
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="resources-jmx-example.html">Custom resources in an EAR archive</a></li>
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="datasource-versioning.html">DataSource Versioning</a></li>
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="realm-in-tomee.html">DataSourceRealm and TomEE DataSource</a></li>
-              <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="javamail.html">Javamail API</a></li>
             </ul>
           </div>
           <div class="col-md-4">
             <ul class="group">
-              <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="connector-war.html">Movies Complete</a></li>
+              <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="javamail.html">Javamail API</a></li>
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="mtom.html">mtom</a></li>
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="myfaces-codi-demo.html">MyFaces CODI Demo</a></li>
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="persistence-fragment.html">Persistence Fragment</a></li>
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="reload-persistence-unit-properties.html">Reload Persistence Unit Properties</a></li>
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="schedule-events.html">Schedule CDI Events</a></li>
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="simple-mdb-and-cdi.html">Simple MDB and CDI</a></li>
-              <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="rest-xml-json.html">Simple REST</a></li>
             </ul>
           </div>
           <div class="col-md-4">
             <ul class="group">
+              <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="rest-xml-json.html">Simple REST</a></li>
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="rest-cdi.html">Simple REST with CDI</a></li>
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="simple-stateful-callbacks.html">Simple Stateful with callback methods</a></li>
               <li class="group-item"><span class="group-item-i" ><i class="fa fa-angle-right"></i></span><a href="simple-stateless-callbacks.html">Simple Stateless with callback methods</a></li>



Mime
View raw message