Author: dblevins
Date: Mon May 27 04:15:36 2019
New Revision: 1860103
URL: http://svn.apache.org/viewvc?rev=1860103&view=rev
Log:
Regenerated site
Added:
tomee/site/trunk/content/latest/examples/tomee-jms-portability.html
tomee/site/trunk/content/latest/pt/examples/jpa-enumerated.html
tomee/site/trunk/content/latest/pt/examples/simple-rest.html
tomee/site/trunk/content/master/examples/tomee-jms-portability.html
tomee/site/trunk/content/master/pt/examples/jpa-enumerated.html
tomee/site/trunk/content/master/pt/examples/simple-rest.html
tomee/site/trunk/content/tomee-8.0/examples/tomee-jms-portability.html
tomee/site/trunk/content/tomee-8.0/pt/examples/jpa-enumerated.html
tomee/site/trunk/content/tomee-8.0/pt/examples/simple-rest.html
Modified:
tomee/site/trunk/content/community/contributors.html
tomee/site/trunk/content/jakartaee-8.0/javadoc/javax/ws/rs/ext/ParamConverter.html
tomee/site/trunk/content/latest/examples/index.html
tomee/site/trunk/content/latest/examples/simple-rest.html
tomee/site/trunk/content/latest/pt/examples/index.html
tomee/site/trunk/content/master/examples/index.html
tomee/site/trunk/content/master/examples/simple-rest.html
tomee/site/trunk/content/master/pt/examples/index.html
tomee/site/trunk/content/sitemap.xml
tomee/site/trunk/content/tomee-8.0/docs/activemqresourceadapter-config.html
tomee/site/trunk/content/tomee-8.0/examples/index.html
tomee/site/trunk/content/tomee-8.0/examples/simple-rest.html
tomee/site/trunk/content/tomee-8.0/javadoc/javax/ws/rs/ext/ParamConverter.html
tomee/site/trunk/content/tomee-8.0/pt/examples/index.html
Modified: tomee/site/trunk/content/community/contributors.html
URL:
http://svn.apache.org/viewvc/tomee/site/trunk/content/community/contributors.html?rev=1860103&r1=1860102&r2=1860103&view=diff
==============================================================================
--- tomee/site/trunk/content/community/contributors.html (original)
+++ tomee/site/trunk/content/community/contributors.html Mon May 27 04:15:36
2019
@@ -110,11 +110,11 @@
<div class="col-sm-4">
<div class="photo col-sm-5">
- <img alt="Jason van Zyl"
src="http://www.gravatar.com/avatar/dd2ab408381395402fb0b183d002165c?s=140"
style="width:140px">
+ <img alt="Dain Sundstrom"
src="http://www.gravatar.com/avatar/9b67307a606e8dbc311c449cd4cae2aa?s=140"
style="width:140px">
<i class="pull-right fa fa-star-o"
style="color:#F38F24;"></i>
</div>
<div class="col-sm-7">
- <h3 class="contributor-name"
style="font-size:1.4em;">Jason van Zyl</h3>
+ <h3 class="contributor-name"
style="font-size:1.4em;">Dain Sundstrom</h3>
<p></p>
<ul class="list-inline">
@@ -144,11 +144,11 @@
<div class="col-sm-4">
<div class="photo col-sm-5">
- <img alt="Jeremy Whitlock"
src="http://www.gravatar.com/avatar/34820bca697fbf1598774b393c5ca4fe?s=140"
style="width:140px">
+ <img alt="Jason van Zyl"
src="http://www.gravatar.com/avatar/dd2ab408381395402fb0b183d002165c?s=140"
style="width:140px">
<i class="pull-right fa fa-star-o"
style="color:#F38F24;"></i>
</div>
<div class="col-sm-7">
- <h3 class="contributor-name"
style="font-size:1.4em;">Jeremy Whitlock</h3>
+ <h3 class="contributor-name"
style="font-size:1.4em;">Jason van Zyl</h3>
<p></p>
<ul class="list-inline">
@@ -157,66 +157,66 @@
<div class="col-sm-4">
<div class="photo col-sm-5">
- <img alt="Romain Manni-Bucau"
src="http://www.gravatar.com/avatar/a8010b78704a70577a7b079f1bc2c981?s=140"
style="width:140px">
+ <img alt="Jeremy Whitlock"
src="http://www.gravatar.com/avatar/34820bca697fbf1598774b393c5ca4fe?s=140"
style="width:140px">
<i class="pull-right fa fa-star-o"
style="color:#F38F24;"></i>
</div>
<div class="col-sm-7">
- <h3 class="contributor-name"
style="font-size:1.4em;">Romain Manni-Bucau</h3>
+ <h3 class="contributor-name"
style="font-size:1.4em;">Jeremy Whitlock</h3>
<p></p>
<ul class="list-inline">
- <li><a
href="http://blog-rmannibucau.rhcloud.com">Blog</a></li>
-
- <li><a href="http://github.com">Github</a></li>
-
- <li><a
href="http://javaeefactory-rmannibucau.rhcloud.com">JavaEE Factory</a></li>
-
- <li><a
href="http://www.linkedin.com/in/rmannibucau">linkedin</a></li>
-
- <li><a
href="http://twitter.com/rmannibucau">twitter</a></li>
-
- <li><a
href="http://rmannibucau.wordpress.com/">wordpress</a></li>
-
</div>
</div>
<div class="col-sm-4">
<div class="photo col-sm-5">
- <img alt="Thiago Veronezi"
src="http://www.gravatar.com/avatar/a02777ec107dbbdaa723f4115397dbb0?s=140"
style="width:140px">
+ <img alt="Mark Struberg"
src="http://www.gravatar.com/avatar/30fae5bce90608fb3df5c018c586aea6?s=140"
style="width:140px">
<i class="pull-right fa fa-star-o"
style="color:#F38F24;"></i>
</div>
<div class="col-sm-7">
- <h3 class="contributor-name"
style="font-size:1.4em;">Thiago Veronezi</h3>
+ <h3 class="contributor-name"
style="font-size:1.4em;">Mark Struberg</h3>
<p></p>
<ul class="list-inline">
+ <li><a href="https://twitter.com/struberg">@struberg on
Twitter</a></li>
+
+ <li><a
href="https://people.apache.org/committer-index.html#struberg">Apache Software
Foundation Profile</a></li>
+
</div>
</div>
<div class="col-sm-4">
<div class="photo col-sm-5">
- <img alt="Mark Struberg"
src="http://www.gravatar.com/avatar/30fae5bce90608fb3df5c018c586aea6?s=140"
style="width:140px">
+ <img alt="Romain Manni-Bucau"
src="http://www.gravatar.com/avatar/a8010b78704a70577a7b079f1bc2c981?s=140"
style="width:140px">
<i class="pull-right fa fa-star-o"
style="color:#F38F24;"></i>
</div>
<div class="col-sm-7">
- <h3 class="contributor-name"
style="font-size:1.4em;">Mark Struberg</h3>
+ <h3 class="contributor-name"
style="font-size:1.4em;">Romain Manni-Bucau</h3>
<p></p>
<ul class="list-inline">
- <li><a href="https://twitter.com/struberg">@struberg on
Twitter</a></li>
+ <li><a
href="http://blog-rmannibucau.rhcloud.com">Blog</a></li>
- <li><a
href="https://people.apache.org/committer-index.html#struberg">Apache Software
Foundation Profile</a></li>
+ <li><a href="http://github.com">Github</a></li>
+
+ <li><a
href="http://javaeefactory-rmannibucau.rhcloud.com">JavaEE Factory</a></li>
+
+ <li><a
href="http://www.linkedin.com/in/rmannibucau">linkedin</a></li>
+
+ <li><a
href="http://twitter.com/rmannibucau">twitter</a></li>
+
+ <li><a
href="http://rmannibucau.wordpress.com/">wordpress</a></li>
</div>
</div>
<div class="col-sm-4">
<div class="photo col-sm-5">
- <img alt="Dain Sundstrom"
src="http://www.gravatar.com/avatar/9b67307a606e8dbc311c449cd4cae2aa?s=140"
style="width:140px">
+ <img alt="Thiago Veronezi"
src="http://www.gravatar.com/avatar/a02777ec107dbbdaa723f4115397dbb0?s=140"
style="width:140px">
<i class="pull-right fa fa-star-o"
style="color:#F38F24;"></i>
</div>
<div class="col-sm-7">
- <h3 class="contributor-name"
style="font-size:1.4em;">Dain Sundstrom</h3>
+ <h3 class="contributor-name"
style="font-size:1.4em;">Thiago Veronezi</h3>
<p></p>
<ul class="list-inline">
@@ -225,11 +225,11 @@
<div class="col-sm-4">
<div class="photo col-sm-5">
- <img alt="Kevan Lee Miller"
src="https://twitter.com/kevanmiller/profile_image?size=bigger"
style="width:140px">
+ <img alt="Vishwanath"
src="https://twitter.com/stratwine/profile_image?size=bigger"
style="width:140px">
<i class="pull-right fa fa-star-o"
style="color:#F38F24;"></i>
</div>
<div class="col-sm-7">
- <h3 class="contributor-name"
style="font-size:1.4em;">Kevan Lee Miller</h3>
+ <h3 class="contributor-name"
style="font-size:1.4em;">Vishwanath</h3>
<p></p>
<ul class="list-inline">
@@ -238,11 +238,11 @@
<div class="col-sm-4">
<div class="photo col-sm-5">
- <img alt="Vishwanath"
src="https://twitter.com/stratwine/profile_image?size=bigger"
style="width:140px">
+ <img alt="Haihong Xu" src="../img/xuhaihong.jpg"
style="width:140px">
<i class="pull-right fa fa-star-o"
style="color:#F38F24;"></i>
</div>
<div class="col-sm-7">
- <h3 class="contributor-name"
style="font-size:1.4em;">Vishwanath</h3>
+ <h3 class="contributor-name"
style="font-size:1.4em;">Haihong Xu</h3>
<p></p>
<ul class="list-inline">
@@ -251,11 +251,11 @@
<div class="col-sm-4">
<div class="photo col-sm-5">
- <img alt="Haihong Xu" src="../img/xuhaihong.jpg"
style="width:140px">
+ <img alt="Rick McGuire" src="../img/rickmcguire.jpg"
style="width:140px">
<i class="pull-right fa fa-star-o"
style="color:#F38F24;"></i>
</div>
<div class="col-sm-7">
- <h3 class="contributor-name"
style="font-size:1.4em;">Haihong Xu</h3>
+ <h3 class="contributor-name"
style="font-size:1.4em;">Rick McGuire</h3>
<p></p>
<ul class="list-inline">
@@ -264,11 +264,11 @@
<div class="col-sm-4">
<div class="photo col-sm-5">
- <img alt="Mohammad Nour El-Din" src="../img/mnour.jpg"
style="width:140px">
+ <img alt="Lajos Moczar" src="../img/noimg.png"
style="width:140px">
<i class="pull-right fa fa-star-o"
style="color:#F38F24;"></i>
</div>
<div class="col-sm-7">
- <h3 class="contributor-name"
style="font-size:1.4em;">Mohammad Nour El-Din</h3>
+ <h3 class="contributor-name"
style="font-size:1.4em;">Lajos Moczar</h3>
<p></p>
<ul class="list-inline">
@@ -277,11 +277,11 @@
<div class="col-sm-4">
<div class="photo col-sm-5">
- <img alt="Manu George" src="../img/manugeorge.jpg"
style="width:140px">
+ <img alt="Mohammad Nour El-Din" src="../img/mnour.jpg"
style="width:140px">
<i class="pull-right fa fa-star-o"
style="color:#F38F24;"></i>
</div>
<div class="col-sm-7">
- <h3 class="contributor-name"
style="font-size:1.4em;">Manu George</h3>
+ <h3 class="contributor-name"
style="font-size:1.4em;">Mohammad Nour El-Din</h3>
<p></p>
<ul class="list-inline">
@@ -290,11 +290,11 @@
<div class="col-sm-4">
<div class="photo col-sm-5">
- <img alt="Karan Singh Malhi"
src="https://twitter.com/KrnMal/profile_image?size=bigger" style="width:140px">
+ <img alt="Kevan Lee Miller"
src="https://twitter.com/kevanmiller/profile_image?size=bigger"
style="width:140px">
<i class="pull-right fa fa-star-o"
style="color:#F38F24;"></i>
</div>
<div class="col-sm-7">
- <h3 class="contributor-name"
style="font-size:1.4em;">Karan Singh Malhi</h3>
+ <h3 class="contributor-name"
style="font-size:1.4em;">Kevan Lee Miller</h3>
<p></p>
<ul class="list-inline">
@@ -303,11 +303,11 @@
<div class="col-sm-4">
<div class="photo col-sm-5">
- <img alt="Rick McGuire" src="../img/rickmcguire.jpg"
style="width:140px">
+ <img alt="Karan Singh Malhi"
src="https://twitter.com/KrnMal/profile_image?size=bigger" style="width:140px">
<i class="pull-right fa fa-star-o"
style="color:#F38F24;"></i>
</div>
<div class="col-sm-7">
- <h3 class="contributor-name"
style="font-size:1.4em;">Rick McGuire</h3>
+ <h3 class="contributor-name"
style="font-size:1.4em;">Karan Singh Malhi</h3>
<p></p>
<ul class="list-inline">
@@ -316,11 +316,11 @@
<div class="col-sm-4">
<div class="photo col-sm-5">
- <img alt="Lajos Moczar" src="../img/noimg.png"
style="width:140px">
+ <img alt="Manu George" src="../img/manugeorge.jpg"
style="width:140px">
<i class="pull-right fa fa-star-o"
style="color:#F38F24;"></i>
</div>
<div class="col-sm-7">
- <h3 class="contributor-name"
style="font-size:1.4em;">Lajos Moczar</h3>
+ <h3 class="contributor-name"
style="font-size:1.4em;">Manu George</h3>
<p></p>
<ul class="list-inline">
@@ -355,11 +355,11 @@
<div class="col-sm-4">
<div class="photo col-sm-5">
- <img alt="Jacek Laskowski"
src="https://twitter.com/jaceklaskowski/profile_image?size=bigger"
style="width:140px">
+ <img alt="Jarek Gawor"
src="https://twitter.com/jgawor/profile_image?size=bigger" style="width:140px">
<i class="pull-right fa fa-star-o"
style="color:#F38F24;"></i>
</div>
<div class="col-sm-7">
- <h3 class="contributor-name"
style="font-size:1.4em;">Jacek Laskowski</h3>
+ <h3 class="contributor-name"
style="font-size:1.4em;">Jarek Gawor</h3>
<p></p>
<ul class="list-inline">
@@ -368,11 +368,11 @@
<div class="col-sm-4">
<div class="photo col-sm-5">
- <img alt="Jean-Louis Monteiro"
src="https://twitter.com/JLouisMonteiro/profile_image?size=bigger"
style="width:140px">
+ <img alt="Jacek Laskowski"
src="https://twitter.com/jaceklaskowski/profile_image?size=bigger"
style="width:140px">
<i class="pull-right fa fa-star-o"
style="color:#F38F24;"></i>
</div>
<div class="col-sm-7">
- <h3 class="contributor-name"
style="font-size:1.4em;">Jean-Louis Monteiro</h3>
+ <h3 class="contributor-name"
style="font-size:1.4em;">Jacek Laskowski</h3>
<p></p>
<ul class="list-inline">
@@ -381,11 +381,11 @@
<div class="col-sm-4">
<div class="photo col-sm-5">
- <img alt="Jarek Gawor"
src="https://twitter.com/jgawor/profile_image?size=bigger" style="width:140px">
+ <img alt="Jeff Genender" src="../img/jgenender.jpg"
style="width:140px">
<i class="pull-right fa fa-star-o"
style="color:#F38F24;"></i>
</div>
<div class="col-sm-7">
- <h3 class="contributor-name"
style="font-size:1.4em;">Jarek Gawor</h3>
+ <h3 class="contributor-name"
style="font-size:1.4em;">Jeff Genender</h3>
<p></p>
<ul class="list-inline">
@@ -394,11 +394,11 @@
<div class="col-sm-4">
<div class="photo col-sm-5">
- <img alt="Lin Quan Jiang" src="../img/genspring.jpg"
style="width:140px">
+ <img alt="Matt Richard Hogstrom"
src="https://twitter.com/hogstrom/profile_image?size=bigger"
style="width:140px">
<i class="pull-right fa fa-star-o"
style="color:#F38F24;"></i>
</div>
<div class="col-sm-7">
- <h3 class="contributor-name"
style="font-size:1.4em;">Lin Quan Jiang</h3>
+ <h3 class="contributor-name"
style="font-size:1.4em;">Matt Richard Hogstrom</h3>
<p></p>
<ul class="list-inline">
@@ -407,11 +407,11 @@
<div class="col-sm-4">
<div class="photo col-sm-5">
- <img alt="Jeff Genender" src="../img/jgenender.jpg"
style="width:140px">
+ <img alt="Daniel Stefan Haischt"
src="https://twitter.com/uebermodean/profile_image?size=bigger"
style="width:140px">
<i class="pull-right fa fa-star-o"
style="color:#F38F24;"></i>
</div>
<div class="col-sm-7">
- <h3 class="contributor-name"
style="font-size:1.4em;">Jeff Genender</h3>
+ <h3 class="contributor-name"
style="font-size:1.4em;">Daniel Stefan Haischt</h3>
<p></p>
<ul class="list-inline">
@@ -420,11 +420,11 @@
<div class="col-sm-4">
<div class="photo col-sm-5">
- <img alt="David Jencks" src="../img/noimg.png"
style="width:140px">
+ <img alt="Jean-Louis Monteiro"
src="https://twitter.com/JLouisMonteiro/profile_image?size=bigger"
style="width:140px">
<i class="pull-right fa fa-star-o"
style="color:#F38F24;"></i>
</div>
<div class="col-sm-7">
- <h3 class="contributor-name"
style="font-size:1.4em;">David Jencks</h3>
+ <h3 class="contributor-name"
style="font-size:1.4em;">Jean-Louis Monteiro</h3>
<p></p>
<ul class="list-inline">
@@ -433,11 +433,11 @@
<div class="col-sm-4">
<div class="photo col-sm-5">
- <img alt="Gianny Damour" src="../img/gdamour.jpg"
style="width:140px">
+ <img alt="Aaron Mulder" src="../img/ammulder.png"
style="width:140px">
<i class="pull-right fa fa-star-o"
style="color:#F38F24;"></i>
</div>
<div class="col-sm-7">
- <h3 class="contributor-name"
style="font-size:1.4em;">Gianny Damour</h3>
+ <h3 class="contributor-name"
style="font-size:1.4em;">Aaron Mulder</h3>
<p></p>
<ul class="list-inline">
@@ -446,11 +446,11 @@
<div class="col-sm-4">
<div class="photo col-sm-5">
- <img alt="Matt Richard Hogstrom"
src="https://twitter.com/hogstrom/profile_image?size=bigger"
style="width:140px">
+ <img alt="Gianny Damour" src="../img/gdamour.jpg"
style="width:140px">
<i class="pull-right fa fa-star-o"
style="color:#F38F24;"></i>
</div>
<div class="col-sm-7">
- <h3 class="contributor-name"
style="font-size:1.4em;">Matt Richard Hogstrom</h3>
+ <h3 class="contributor-name"
style="font-size:1.4em;">Gianny Damour</h3>
<p></p>
<ul class="list-inline">
@@ -459,11 +459,11 @@
<div class="col-sm-4">
<div class="photo col-sm-5">
- <img alt="Daniel Stefan Haischt"
src="https://twitter.com/uebermodean/profile_image?size=bigger"
style="width:140px">
+ <img alt="Lin Quan Jiang" src="../img/genspring.jpg"
style="width:140px">
<i class="pull-right fa fa-star-o"
style="color:#F38F24;"></i>
</div>
<div class="col-sm-7">
- <h3 class="contributor-name"
style="font-size:1.4em;">Daniel Stefan Haischt</h3>
+ <h3 class="contributor-name"
style="font-size:1.4em;">Lin Quan Jiang</h3>
<p></p>
<ul class="list-inline">
@@ -472,11 +472,11 @@
<div class="col-sm-4">
<div class="photo col-sm-5">
- <img alt="Aaron Mulder" src="../img/ammulder.png"
style="width:140px">
+ <img alt="David Jencks" src="../img/noimg.png"
style="width:140px">
<i class="pull-right fa fa-star-o"
style="color:#F38F24;"></i>
</div>
<div class="col-sm-7">
- <h3 class="contributor-name"
style="font-size:1.4em;">Aaron Mulder</h3>
+ <h3 class="contributor-name"
style="font-size:1.4em;">David Jencks</h3>
<p></p>
<ul class="list-inline">
Modified:
tomee/site/trunk/content/jakartaee-8.0/javadoc/javax/ws/rs/ext/ParamConverter.html
URL:
http://svn.apache.org/viewvc/tomee/site/trunk/content/jakartaee-8.0/javadoc/javax/ws/rs/ext/ParamConverter.html?rev=1860103&r1=1860102&r2=1860103&view=diff
==============================================================================
---
tomee/site/trunk/content/jakartaee-8.0/javadoc/javax/ws/rs/ext/ParamConverter.html
(original)
+++
tomee/site/trunk/content/jakartaee-8.0/javadoc/javax/ws/rs/ext/ParamConverter.html
Mon May 27 04:15:36 2019
@@ -112,6 +112,10 @@ var activeTableTab = "activeTableTab";
<a href="../../../../javax/ws/rs/MatrixParam.html" title="annotation in
javax.ws.rs"><code>@MatrixParam</code></a>, <a
href="../../../../javax/ws/rs/FormParam.html" title="annotation in
javax.ws.rs"><code>@FormParam</code></a>,
<a href="../../../../javax/ws/rs/CookieParam.html" title="annotation in
javax.ws.rs"><code>@CookieParam</code></a> and <a
href="../../../../javax/ws/rs/HeaderParam.html" title="annotation in
javax.ws.rs"><code>@HeaderParam</code></a>
is supported.
+ JAX-RS implementations MUST support the <code>ParamConverter</code> mechanism
for all Java types.
+ If a <code>ParamConverter</code> is available for a type, it MUST be
preferred over all other
+ conversion strategies mentioned in section 3.2 (i.e. single
<code>String</code> argument constructor,
+ static <code>valueOf</code> or <code>fromString</code> methods, etc.).
<p>
By default, when used for injection of parameter values, a selected
<code>ParamConverter</code>
instance MUST be used eagerly by a JAX-RS runtime to convert any <a
href="../../../../javax/ws/rs/DefaultValue.html" title="annotation in
javax.ws.rs"><code>default value</code></a> in the resource or provider model,
that is during the application deployment,
Modified: tomee/site/trunk/content/latest/examples/index.html
URL:
http://svn.apache.org/viewvc/tomee/site/trunk/content/latest/examples/index.html?rev=1860103&r1=1860102&r2=1860103&view=diff
==============================================================================
--- tomee/site/trunk/content/latest/examples/index.html (original)
+++ tomee/site/trunk/content/latest/examples/index.html Mon May 27 04:15:36 2019
@@ -289,6 +289,18 @@
</div>
</div>
<div class="row">
+ <div class="col-md-4">
+ <div class="group-title">JMS</div>
+ <ul class="group">
+ <li class="group-item"><span class="group-item-i" ><i class="fa
fa-angle-right"></i></span><a href="tomee-jms-portability.html">Portability
between ActiveMQ and IBM MQ</a></li>
+ </ul>
+ </div>
+ <div class="col-md-4">
+ </div>
+ <div class="col-md-4">
+ </div>
+ </div>
+ <div class="row">
<div class="col-md-12">
<div class="group-title large">CDI</div>
</div>
@@ -329,23 +341,24 @@
<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="java-modules.html">java-modules</a></li>
+ <li class="group-item"><span class="group-item-i" ><i class="fa
fa-angle-right"></i></span><a
href="examples/mp-metrics-gauge.html">mp-metrics-gauge</a></li>
<li class="group-item"><span class="group-item-i" ><i class="fa
fa-angle-right"></i></span><a
href="examples/schedule-methods-meta.html">schedule-methods-meta</a></li>
<li class="group-item"><span class="group-item-i" ><i class="fa
fa-angle-right"></i></span><a
href="examples/testing-security-meta.html">testing-security-meta</a></li>
<li class="group-item"><span class="group-item-i" ><i class="fa
fa-angle-right"></i></span><a href="cloud-tomee-azure.html">TomEE deployment on
Azure</a></li>
- <li class="group-item"><span class="group-item-i" ><i class="fa
fa-angle-right"></i></span><a
href="vaadin-lts-v08-simple.html">vaadin-lts-v08-simple</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="vaadin-lts-v08-simple.html">vaadin-lts-v08-simple</a></li>
<li class="group-item"><span class="group-item-i" ><i class="fa
fa-angle-right"></i></span><a
href="vaadin-lts-v10-simple.html">vaadin-lts-v10-simple</a></li>
<li class="group-item"><span class="group-item-i" ><i class="fa
fa-angle-right"></i></span><a
href="vaadin-vxx-simple.html">vaadin-vxx-simple</a></li>
<li class="group-item"><span class="group-item-i" ><i class="fa
fa-angle-right"></i></span><a
href="examples/webservice-holder.html">webservice-holder</a></li>
<li class="group-item"><span class="group-item-i" ><i class="fa
fa-angle-right"></i></span><a
href="examples/webservice-inheritance.html">webservice-inheritance</a></li>
- <li class="group-item"><span class="group-item-i" ><i class="fa
fa-angle-right"></i></span><a
href="examples/webservice-security.html">webservice-security</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="examples/webservice-security.html">webservice-security</a></li>
<li class="group-item"><span class="group-item-i" ><i class="fa
fa-angle-right"></i></span><a
href="examples/webservice-ssl-client-cert.html">webservice-ssl-client-cert</a></li>
<li class="group-item"><span class="group-item-i" ><i class="fa
fa-angle-right"></i></span><a
href="examples/webservice-ws-security.html">webservice-ws-security</a></li>
<li class="group-item"><span class="group-item-i" ><i class="fa
fa-angle-right"></i></span><a
href="examples/websocket-tls-basic-auth.html">websocket-tls-basic-auth</a></li>
Modified: tomee/site/trunk/content/latest/examples/simple-rest.html
URL:
http://svn.apache.org/viewvc/tomee/site/trunk/content/latest/examples/simple-rest.html?rev=1860103&r1=1860102&r2=1860103&view=diff
==============================================================================
--- tomee/site/trunk/content/latest/examples/simple-rest.html (original)
+++ tomee/site/trunk/content/latest/examples/simple-rest.html Mon May 27
04:15:36 2019
@@ -98,25 +98,16 @@
<div id="preamble">
<div class="sectionbody">
<div class="paragraph">
-<p>Defining a REST service is pretty easy, simply ad @Path annotation to a
-class then define on methods the HTTP method to use (@GET, @POST, â¦).</p>
-</div>
-<div class="paragraph">
-<p>#The Code</p>
+<p>Defining a REST service is pretty easy, simply ad <code>@Path</code>
annotation to a class then define on methods the HTTP method to use
(<code>@GET</code>, <code>@POST</code>, â¦).</p>
</div>
</div>
</div>
+<h1 id="_the_code" class="sect0">The Code</h1>
<div class="sect1">
-<h2 id="_the_rest_service_path_get_post">The REST service: @Path, @GET,
@POST</h2>
+<h2 id="_the_rest_service_code_path_code_code_get_code_code_post_code">The
REST service: <code>@Path</code>, <code>@GET</code>, <code>@POST</code></h2>
<div class="sectionbody">
<div class="paragraph">
-<p>Here we see a bean that uses the Bean-Managed Concurrency option as well
-as the @Startup annotation which causes the bean to be instantiated by
-the container when the application starts. Singleton beans with
-@ConcurrencyManagement(BEAN) are responsible for their own
-thread-safety. The bean shown is a simple properties ``registry'' and
-provides a place where options could be set and retrieved by all beans
-in the application.</p>
+<p>Here we have a simple REST, we annotate the class with
<code>@Path("/greeting")</code> to indicate the route corresponding to class
<code>GreetingService</code>. So we define <code>message()</code> as
<code>@GET</code> and <code>lowerCase()</code> as <code>@POST</code> for this
<code>/greeting</code> route. There we have a service, pretty simple huh?</p>
</div>
<div class="literalblock">
<div class="content">
@@ -151,19 +142,13 @@ public class GreetingService {
<p>The test uses the OpenEJB ApplicationComposer to make it trivial.</p>
</div>
<div class="paragraph">
-<p>The idea is first to activate the jaxrs services. This is done using
-@EnableServices annotation.</p>
+<p>The idea is first to activate the <code>jaxrs</code> services. This is done
using <code>@EnableServices</code> annotation.</p>
</div>
<div class="paragraph">
-<p>Then we create on the fly the application simply returning an object
-representing the web.xml. Here we simply use it to define the context
-root but you can use it to define your REST Application too. And to
-complete the application definition we add @Classes annotation to define
-the set of classes to use in this app.</p>
+<p>Then we create on the fly the application simply returning an object
representing the <code>web.xml</code>. Here we simply use it to define the
context root but you can use it to define your REST Application too. And to
complete the application definition we add <code>@Classes</code> annotation to
define the set of classes to use in this app.</p>
</div>
<div class="paragraph">
-<p>Finally to test it we use cxf client API to call the REST service in
-get() and post() methods.</p>
+<p>Finally to test it we use cxf client API to call the REST service in
<code>get()</code> and <code>post()</code> methods.</p>
</div>
<div class="literalblock">
<div class="content">
@@ -203,12 +188,12 @@ public class GreetingServiceTest {
}</pre>
</div>
</div>
-<div class="paragraph">
-<p>#Running</p>
</div>
+</div>
+</div>
+<h1 id="_running" class="sect0">Running</h1>
<div class="paragraph">
-<p>Running the example is fairly simple. In the ``simple-rest'' directory
-run:</p>
+<p>Running the example is fairly simple. In the <code>simple-rest</code>
directory run:</p>
</div>
<div class="literalblock">
<div class="content">
@@ -265,9 +250,6 @@ Results :
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0</pre>
</div>
</div>
-</div>
-</div>
-</div>
</div>
</div>
Added: tomee/site/trunk/content/latest/examples/tomee-jms-portability.html
URL:
http://svn.apache.org/viewvc/tomee/site/trunk/content/latest/examples/tomee-jms-portability.html?rev=1860103&view=auto
==============================================================================
--- tomee/site/trunk/content/latest/examples/tomee-jms-portability.html (added)
+++ tomee/site/trunk/content/latest/examples/tomee-jms-portability.html Mon May
27 04:15:36 2019
@@ -0,0 +1,325 @@
+<!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>Portability between ActiveMQ and IBM MQ</h1>
+ </div>
+ </div>
+ </div>
+ <div class="row">
+
+ <div class="col-md-12">
+ <div id="preamble">
+<div class="sectionbody">
+<div class="paragraph">
+<p>This app demonstrates capability to achive portability/interoperability
between ActiveMQ and IBM MQ for tomee based application of type MDB and Custom
Java based JMS connection. It covers patterns and learnings as listed below</p>
+</div>
+<div class="olist arabic">
+<ol class="arabic">
+<li>
+<p>How to run multiple mdb containers in same JVM</p>
+</li>
+<li>
+<p>Various ways of configuring IBM Queues/Topics vs AMQ Queues/Topics</p>
+</li>
+<li>
+<p>MDB configuration for IBM MQ vs AMQ, Annotations vs Configuration</p>
+</li>
+<li>
+<p>Static vs Dynamic declaration/override of queues/topics</p>
+</li>
+<li>
+<p>Use and importance of RA (Resource Adapaters), Connection Factory</p>
+</li>
+<li>
+<p>Web service samples to write data to IBM Queues and AMQ Queues using
injection of resources (connection factories and queue/topics)</p>
+</li>
+<li>
+<p>JNDI reference to resources (see WMQReadBean configuration in
ejb-jar.xml)</p>
+</li>
+</ol>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_running_this_application">Running this application</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="_environment">Environment</h3>
+<div class="paragraph">
+<p>Application can be imported in IDE like eclipse as a maven project and is
tested using apache-tomee-plume-7.0.2, apache-activemq-5.14.3 (running as
standalone on localhost, IBM MQ 8.x.x (connections details hidden to avoid
misuse, those how want to test can reach out to middleware team to get access
to managed IBM MQ instance and AppWatch ))</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_additional_libraries">Additional Libraries</h3>
+<div class="paragraph">
+<p>In order to connect to IBM MQ, tomee requires additional libraries
containing implementation for JCA Resource Adapter, IBM MQ connection
factories, queue/topic resources, ActivationConfigs etc. These libraries come
with IBM subscription and all of them are not available on maven central, below
is list of all IBM specific jar files</p>
+</div>
+<div class="paragraph">
+<p>com.ibm.mq.connector.jar
+com.ibm.mq.jar
+com.ibm.mq.pcf.jar
+com.ibm.mq.headers.jar
+com.ibm.mq.jmqi.jar
+com.ibm.mqjms.jar
+providerutil.jar</p>
+</div>
+<div class="paragraph">
+<p>com.ibm.mq.connector.jar can be extracted from wmq.jmsra.rar which is
availble with IBM MQ installation (not available on internet)</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_tomee_xml">tomee.xml</h3>
+<div class="paragraph">
+<p>This file (located under tomee_home/conf is left blank as we would like our
application to manage all resources.Any resource declared here would be
available to all application deployed on the server.
+(File not included in this git repo)</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-xml" data-lang="xml"><?xml
version="1.0" encoding="UTF-8"?>
+<tomee>
+</tomee></code></pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_catalina_properties">catalina.properties</h3>
+<div class="paragraph">
+<p>This file can be used to convinently provide -D java arguments as an input
to tomee. However in real world these parameters would be configured using
environment variables to avoid adding application specific properties in tomme
conf (File not included in this git repo)</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-xml"
data-lang="xml">com.ibm.msg.client.commonservices.log.status=OFF
+
+AMQReadBean2.activation.destination=overriden_queue_IMQReadBean
+#queue destinations
+amq.variable.destination=my_overriden_value
+#Resource overrides
+#amq_ra.ServerUrl=tcp://xxxxx.xxx.xxx.com:61616
+
+#MDB Activation Config overrides
+#Hirarchy for activation override rules (specific to generic)
+#1 -D<deploymentId>.activation.<property>=<value>
+#2. -D<ejbName>.activation.<property>=<value>
+#3.
-D<message-listener-interface>.activation.<property>=<value>
+#4. -Dmdb.activation.<property>=<value>
+#mdb.activation.destination=overriden_queue_value
+WMQReadBean.activation.HostName=10.234.56.789</code></pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_resources_xml">resources.xml</h3>
+<div class="paragraph">
+<p>This file is application specific placeholder for resources (it will
override any matching resources declared in tomee.xml) like resource-adapters,
connection-factories, queues, topics, mdb-containers etc.
+This example makes heavy use of this file which is under
src/main/webapp/WEB-INF, for applications deployed as war file it get copied to
<mark>#</mark>/webapps/application-name/WEB-INF/resources.xml .</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_ejb_jar_xml">ejb-jar.xml</h3>
+<div class="paragraph">
+<p>This file is located under src/main/resources/META-INF/ and contains
application specific configuration for enterprise beans, in the demo we have
configured our message beans in this file. Definitions in this file are
equivalent of annotations , version="3.1" will support a combination of
configured and annotated beans. One important difference between annotated
beans and configured beans is as follows. If there are multiple containers
defined or use in same application(Like this application uses amq-container and
imq-container)
+Any annotated bean is sequentially binded to the container resource, this can
bring inpredictability and may result in a Bean getting binded to incorrect
target container. As an example ChatBean MDB is intentionally commented as it
may throw errors by getting incorrectly binded to IMQ. To deal with such
problems, configuration based approach can be used in conjunction with
openejb-jar.xml (as described below)</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_openejb_jar_xml">openejb-jar.xml</h3>
+<div class="paragraph">
+<p>This file is located under src/main/resources/META-INF/ and contains
additional mapping between ejb and targeted containers. It also has a
deployment id which can be used to create multiple deployments for same ejb in
a container or across containers. This is very useful when you want to bind a
specific bean to desired container (example WMQReadBean should necessarily bind
to simple-tomee-1.0/imq_container container)</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_web_xml">web.xml</h3>
+<div class="paragraph">
+<p>Typical web resource file, not used much in this tutorial app</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_beans_xml">beans.xml</h3>
+<div class="paragraph">
+<p>To use @Inject, the first thing you need is a META-INF/beans.xml file in
the module or jar. This effectively turns on CDI and allows the @Inject
references to work. No META-INF/beans.xml no injection, period
+Not used in this tutorial app</p>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_developers">Developers</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>Suyog Barve <<a
href="mailto:[email protected]">[email protected]</a>></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 © 1999-2016 The
Apache Software Foundation, Licensed under the Apache License, Version 2.0.
Apache TomEE, TomEE, Apache, the Apache feather logo, and the Apache TomEE
project logo are trademarks of The Apache Software Foundation. All other marks
mentioned may be trademarks or registered trademarks of their respective
owners.</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+ <!-- Holder for mobile navigation -->
+ <div class="mobile-nav">
+ <ul>
+ <li><a hef="../../latest/docs/admin/index.html">Administrators</a>
+ <li><a hef="../../latest/docs/developer/index.html">Developers</a>
+ <li><a hef="../../latest/docs/advanced/index.html">Advanced</a>
+ <li><a hef="../../community/index.html">Community</a>
+ </ul>
+ <a href="#" class="close-link"><i class="arrow_up"></i></a>
+ </div>
+ <!-- Scripts -->
+ <script src="../../js/jquery-1.11.1.min.js"></script>
+ <script src="../../js/owl.carousel.min.js"></script>
+ <script src="../../js/bootstrap.min.js"></script>
+ <script src="../../js/wow.min.js"></script>
+ <script src="../../js/typewriter.js"></script>
+ <script src="../../js/jquery.onepagenav.js"></script>
+ <script src="../../js/tree.jquery.js"></script>
+ <script src="../../js/highlight.pack.js"></script>
+ <script src="../../js/main.js"></script>
+ </body>
+
+</html>
+
Modified: tomee/site/trunk/content/latest/pt/examples/index.html
URL:
http://svn.apache.org/viewvc/tomee/site/trunk/content/latest/pt/examples/index.html?rev=1860103&r1=1860102&r2=1860103&view=diff
==============================================================================
--- tomee/site/trunk/content/latest/pt/examples/index.html (original)
+++ tomee/site/trunk/content/latest/pt/examples/index.html Mon May 27 04:15:36
2019
@@ -95,6 +95,7 @@
<div class="col-md-4">
<div class="group-title">JPA</div>
<ul class="group">
+ <li class="group-item"><span class="group-item-i" ><i class="fa
fa-angle-right"></i></span><a href="jpa-enumerated.html">JPA and Enums via
@Enumerated</a></li>
<li class="group-item"><span class="group-item-i" ><i class="fa
fa-angle-right"></i></span><a href="jpa-eclipselink.html">JPA
Eclipselink</a></li>
<li class="group-item"><span class="group-item-i" ><i class="fa
fa-angle-right"></i></span><a href="jpa-hibernate.html">JPA Hibernate</a></li>
</ul>
@@ -115,12 +116,16 @@
</div>
<div class="row">
<div class="col-md-4">
- <div class="group-title">Misc</div>
+ <div class="group-title">REST</div>
<ul class="group">
- <li class="group-item"><span class="group-item-i" ><i class="fa
fa-angle-right"></i></span><a
href="mvc-cxf-hibernate.html">MVC-CXF-Hibernate</a></li>
+ <li class="group-item"><span class="group-item-i" ><i class="fa
fa-angle-right"></i></span><a href="simple-rest.html">REST Simples</a></li>
</ul>
</div>
<div class="col-md-4">
+ <div class="group-title">Misc</div>
+ <ul class="group">
+ <li class="group-item"><span class="group-item-i" ><i class="fa
fa-angle-right"></i></span><a
href="mvc-cxf-hibernate.html">MVC-CXF-Hibernate</a></li>
+ </ul>
</div>
<div class="col-md-4">
</div>
Added: tomee/site/trunk/content/latest/pt/examples/jpa-enumerated.html
URL:
http://svn.apache.org/viewvc/tomee/site/trunk/content/latest/pt/examples/jpa-enumerated.html?rev=1860103&view=auto
==============================================================================
--- tomee/site/trunk/content/latest/pt/examples/jpa-enumerated.html (added)
+++ tomee/site/trunk/content/latest/pt/examples/jpa-enumerated.html Mon May 27
04:15:36 2019
@@ -0,0 +1,503 @@
+<!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>JPA and Enums via @Enumerated</h1>
+ </div>
+ </div>
+ </div>
+ <div class="row">
+
+ <div class="col-md-12">
+ <div id="preamble">
+<div class="sectionbody">
+<div class="paragraph">
+<p>Ãs vezes pode ser desejável ter um tipo <code>enum</code> do Java para
representar uma coluna especÃfica em um banco de dados. A JPA oferece suporte
à conversão dos dados de um banco de dados para ou a partir de um tipo
<code>enum</code> do Java por meio da anotação
<code>@javax.persistence.Enumerated</code>.</p>
+</div>
+<div class="paragraph">
+<p>Esse exemplo mostrará o uso básico do <code>@Enumerated</code> em um
campo de uma <code>@Entity</code>, bem como <code>enum</code> como parâmetro
de uma <code>Query</code>.
+Também veremos que a representação de um banco de dados real pode ser
<code>String</code> ou <code>int</code>.</p>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_enum">Enum</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>Para o nosso exemplo, vamos aproveitar a familiar entidade
<code>Movie</code> e adicionar um novo campo para representar a classificação
MPAA.org do filme. Isso é definido por meio de um <code>enum</code> simples
que não requer anotações especÃficas da JPA.</p>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>public enum Rating {
+ UNRATED,
+ G,
+ PG,
+ PG13,
+ R,
+ NC17
+}</pre>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="__enumerated">@Enumerated</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>Em nossa entidade <code>Movie</code>, nós adicionamos um campo
<code>rating</code> do enum do tipo <code>Rating</code> e anotamos com
<code>@Enumerated(EnumType.STRING)</code> para declarar que seu valor deve ser
convertido do que é efetivamente uma <code>String</code> no banco de dados
para o tipo <code>Rating</code>.</p>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>@Entity
+public class Movie {
+
+ @Id
+ @GeneratedValue
+ private int id;
+ private String director;
+ private String title;
+ private int year;
+
+ @Enumerated(EnumType.STRING)
+ private Rating rating;
+
+ public Movie() {
+ }
+
+ public Movie(String director, String title, int year, Rating rating) {
+ this.director = director;
+ this.title = title;
+ this.year = year;
+ this.rating = rating;
+ }
+
+ public String getDirector() {
+ return director;
+ }
+
+ public void setDirector(String director) {
+ this.director = director;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ public int getYear() {
+ return year;
+ }
+
+ public void setYear(int year) {
+ this.year = year;
+ }
+
+ public Rating getRating() {
+ return rating;
+ }
+
+ public void setRating(Rating rating) {
+ this.rating = rating;
+ }
+}</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>O código acima é suficiente e estará efetivamente feito. Por uma
questão de completude, mostraremos um exemplo de uma <code>Query</code></p>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_enum_em_uma_query_jpql">Enum em uma Query JPQL</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>Observe o método <code>findByRating</code> que cria uma <code>Query</code>
com um parâmetro denominado <code>rating</code>. A principal coisa a notar é
que a instância do enum <code>rating</code> propriamente dita é passada para
o método
+ <code>query.setParameter</code>, <strong>não</strong>
<code>rating.name()</code> ou <code>rating.ordinal()</code>.</p>
+</div>
+<div class="paragraph">
+<p>Independentemente se você usar <code>EnumType.STRING</code> ou
<code>EnumType.ORDINAL</code>, você ainda sempre tem que passar o enum
propriamente dito em chamadas para <code>query.setParameter</code>.</p>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>@Stateful
+public class Movies {
+
+ @PersistenceContext(unitName = "movie-unit", type =
PersistenceContextType.EXTENDED)
+ private EntityManager entityManager;
+
+ public void addMovie(Movie movie) {
+ entityManager.persist(movie);
+ }
+
+ public void deleteMovie(Movie movie) {
+ entityManager.remove(movie);
+ }
+
+ public List<Movie> findByRating(Rating rating) {
+ final Query query = entityManager.createQuery("SELECT m FROM Movie as
m WHERE m.rating = :rating");
+ query.setParameter("rating", rating);
+ return query.getResultList();
+ }
+
+ public List<Movie> getMovies() throws Exception {
+ Query query = entityManager.createQuery("SELECT m from Movie as m");
+ return query.getResultList();
+ }
+
+}</pre>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_enumtype_string_vs_enumtype_ordinal">EnumType.STRING vs
EnumType.ORDINAL</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>à uma questão de estilo como você gostaria que seus dados
<code>enum</code> representados no banco de dados. Qualquer um deles
<code>name()</code> ou <code>ordinal()</code> são suportados:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>@Enumerated(EnumType.STRING) Rating rating</code> o valor de
<code>rating.name()</code> é gravado e lido a partir da coluna correspondente
no banco de dados; por exemplo <code>G</code>, <code>PG</code>,
<code>PG13</code></p>
+</li>
+<li>
+<p><code>@Enumerated(EnumType.ORDINAL) Rating rating</code> o valor de
<code>rating.ordinal()</code> é gravado e lido a partir da coluna
correspondente no banco de dados; por exemplo <code>0</code>, <code>1</code>,
<code>2</code></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>O padrão é <code>EnumType.ORDINAL</code></p>
+</div>
+<div class="paragraph">
+<p>Essas são as vantagens e desvantagens de cada.</p>
+</div>
+<div class="sect2">
+<h3 id="_desvantagem_do_enumtype_ordinal">Desvantagem do EnumType.ORDINAL</h3>
+<div class="paragraph">
+<p>A desvantagem do <code>EnumType.ORDINAL</code> é o efeito do tempo e o
desejo de manter <code>enums</code> em uma ordem lógica. Com
<code>EnumType.ORDINAL</code> quaisquer novos elementos enum devem ser
adicionados ao
+<strong>final</strong> da lista ou você irá alterar acidentalmente o
significado de todos os seus registros.</p>
+</div>
+<div class="paragraph">
+<p>Vamos usar o nosso enum <code>Rating</code> e ver como ele teria que
evoluir ao longo do tempo para acompanhar as mudanças no sistema de
classificações MPAA.org.</p>
+</div>
+<div class="paragraph">
+<p><strong>1980</strong></p>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>public enum Rating {
+ G,
+ PG,
+ R,
+ UNRATED
+}</pre>
+</div>
+</div>
+<div class="paragraph">
+<p><strong>1984</strong> PG-13 é adicionado</p>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>public enum Rating {
+ G,
+ PG,
+ R,
+ UNRATED,
+ PG13
+}</pre>
+</div>
+</div>
+<div class="paragraph">
+<p><strong>1990</strong> NC-17 é adicionado</p>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>public enum Rating {
+ G,
+ PG,
+ R,
+ UNRATED,
+ PG13,
+ NC17
+}</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Se <code>EnumType.STRING</code> foi usado, em seguida, o enum poderia ser
reordenado a qualquer momento e, em vez disso, olhar como nós o definimos
originalmente com classificações começando em <code>G</code> e aumentando em
severidade para <code>NC17</code> e, eventualmente, <code>UNRATED</code>. Com
<code>EnumType.ORDINAL</code> a ordenação lógica não teria resistido o
teste de tempo como novos valores foram adicionados.</p>
+</div>
+<div class="paragraph">
+<p>Se a ordem dos valores enum for significativa para seu código, evite
<code>EnumType.ORDINAL</code></p>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_testando_unitariamente_a_jpa_enumerated">Testando Unitariamente a JPA
@Enumerated</h2>
+<div class="sectionbody">
+<div class="literalblock">
+<div class="content">
+<pre>public class MoviesTest extends TestCase {
+
+ public void test() 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");
+
+ EJBContainer container = EJBContainer.createEJBContainer(p);
+ final Context context = container.getContext();
+
+ final Movies movies = (Movies)
context.lookup("java:global/jpa-scratch/Movies");
+
+ movies.addMovie(new Movie("James Frawley", "The Muppet Movie", 1979,
Rating.G));
+ movies.addMovie(new Movie("Jim Henson", "The Great Muppet Caper",
1981, Rating.G));
+ movies.addMovie(new Movie("Frank Oz", "The Muppets Take Manhattan",
1984, Rating.G));
+ movies.addMovie(new Movie("James Bobin", "The Muppets", 2011,
Rating.PG));
+
+ assertEquals("List.size()", 4, movies.getMovies().size());
+
+ assertEquals("List.size()", 3, movies.findByRating(Rating.G).size());
+
+ assertEquals("List.size()", 1, movies.findByRating(Rating.PG).size());
+
+ assertEquals("List.size()", 0, movies.findByRating(Rating.R).size());
+
+ container.close();
+ }
+}</pre>
+</div>
+</div>
+</div>
+</div>
+<h1 id="_executando" class="sect0">Executando</h1>
+<div class="paragraph">
+<p>Para executar o exemplo via maven:</p>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>cd jpa-enumerated
+mvn clean install</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Que irá gerar saÃda semelhante ao seguinte:</p>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>-------------------------------------------------------
+ T E S T S
+-------------------------------------------------------
+Running org.superbiz.jpa.enums.MoviesTest
+Apache OpenEJB 4.0.0-beta-2 build: 20120115-08:26
+http://tomee.apache.org/
+INFO - openejb.home = /Users/dblevins/openejb/examples/jpa-enumerated
+INFO - openejb.base = /Users/dblevins/openejb/examples/jpa-enumerated
+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)
+INFO - Found EjbModule in classpath:
/Users/dblevins/openejb/examples/jpa-enumerated/target/classes
+INFO - Beginning load:
/Users/dblevins/openejb/examples/jpa-enumerated/target/classes
+INFO - Configuring enterprise application:
/Users/dblevins/openejb/examples/jpa-enumerated
+INFO - Configuring Service(id=Default Stateful Container, type=Container,
provider-id=Default Stateful Container)
+INFO - Auto-creating a container for bean Movies: Container(type=STATEFUL,
id=Default Stateful Container)
+INFO - Configuring Service(id=Default Managed Container, type=Container,
provider-id=Default Managed Container)
+INFO - Auto-creating a container for bean org.superbiz.jpa.enums.MoviesTest:
Container(type=MANAGED, id=Default Managed Container)
+INFO - Configuring PersistenceUnit(name=movie-unit)
+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 <non-jta-data-source> to
Resource ID 'movieDatabaseNonJta' from 'movieDatabaseUnmanaged'
+INFO - Enterprise application
"/Users/dblevins/openejb/examples/jpa-enumerated" loaded.
+INFO - Assembling app: /Users/dblevins/openejb/examples/jpa-enumerated
+INFO - PersistenceUnit(name=movie-unit,
provider=org.apache.openjpa.persistence.PersistenceProviderImpl) - provider
time 406ms
+INFO -
Jndi(name="java:global/jpa-enumerated/Movies!org.superbiz.jpa.enums.Movies")
+INFO - Jndi(name="java:global/jpa-enumerated/Movies")
+INFO - Created Ejb(deployment-id=Movies, ejb-name=Movies, container=Default
Stateful Container)
+INFO - Started Ejb(deployment-id=Movies, ejb-name=Movies, container=Default
Stateful Container)
+INFO - Deployed
Application(path=/Users/dblevins/openejb/examples/jpa-enumerated)
+INFO - Undeploying app: /Users/dblevins/openejb/examples/jpa-enumerated
+INFO - Closing DataSource: movieDatabase
+INFO - Closing DataSource: movieDatabaseNonJta
+Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.831 sec
+
+Results :
+
+Tests run: 1, Failures: 0, Errors: 0, Skipped: 0</pre>
+</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 © 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>
+