Author: dblevins
Date: Sat Sep 7 14:25:49 2019
New Revision: 1866555
URL: http://svn.apache.org/viewvc?rev=1866555&view=rev
Log:
site update
Added:
tomee/site/trunk/content/master/pt/examples/access-timeout.html
tomee/site/trunk/content/master/pt/examples/applicationcomposer-jaxws-cdi.html
tomee/site/trunk/content/master/pt/examples/applicationexception.html
tomee/site/trunk/content/master/pt/examples/arquillian-jpa.html
tomee/site/trunk/content/master/pt/examples/async-methods.html
tomee/site/trunk/content/master/pt/examples/async-postconstruct.html
tomee/site/trunk/content/master/pt/examples/bean-validation-design-by-contract.html
tomee/site/trunk/content/master/pt/examples/cdi-application-scope.html
tomee/site/trunk/content/master/pt/examples/cdi-interceptors.html
tomee/site/trunk/content/master/pt/examples/cdi-produces-disposes.html
tomee/site/trunk/content/master/pt/examples/cdi-produces-field.html
tomee/site/trunk/content/master/pt/examples/cdi-qualifier.html
tomee/site/trunk/content/master/pt/examples/cdi-realm.html
tomee/site/trunk/content/master/pt/examples/cdi-request-scope.html
tomee/site/trunk/content/master/pt/examples/cdi-session-scope.html
tomee/site/trunk/content/master/pt/examples/change-jaxws-url.html
tomee/site/trunk/content/master/pt/examples/cloud-tomee-azure.html
tomee/site/trunk/content/master/pt/examples/jsf-cdi-and-ejb.html
Modified:
tomee/site/trunk/content/master/pt/examples/index.html
Added: tomee/site/trunk/content/master/pt/examples/access-timeout.html
URL:
http://svn.apache.org/viewvc/tomee/site/trunk/content/master/pt/examples/access-timeout.html?rev=1866555&view=auto
==============================================================================
--- tomee/site/trunk/content/master/pt/examples/access-timeout.html (added)
+++ tomee/site/trunk/content/master/pt/examples/access-timeout.html Sat Sep 7
14:25:49 2019
@@ -0,0 +1,471 @@
+<!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>Anotação @AccessTimeout</h1>
+ </div>
+ </div>
+ </div>
+ <div class="row">
+
+ <div class="col-md-12">
+ <div id="preamble">
+<div class="sectionbody">
+<div class="paragraph">
+<p>Antes de darmos uma olhada no <code>@AccessTimeout</code>, pode ajudar
entender quando uma chamada precisa "esperar".</p>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_esperando">Esperando…​</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="_stateful_bean">Stateful Bean</h3>
+<div class="admonitionblock note">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-note" title="Note"></i>
+</td>
+<td class="content">
+Por padrão, é permitido que clientes façam chamadas concorrentes para um
stateful session object e o container é requerido para serializar cada
requisição concorrente. O container nunca permite acesso multi-thread a
instancia de um componente stateful. Por essa razão, métodos de
leitura/escrita bloqueiam metadados assim como componentes que gerenciam a
própria concorrência (bean-managed concurrency) não são aplicáveis a um
stateful session bean e não devem ser usados.
+</td>
+</tr>
+</table>
+</div>
+<div class="paragraph">
+<p>Isso significa que quando um método <code>foo()</code> de uma instancia
stateful esta sendo executado e uma chega uma segunda requisição para esse ou
outro método, o container EJB serializa a segunda requisição. Isso não
permite com que o método seja executado concorrentemente mas espere ate o
primeiro método ser processado.</p>
+</div>
+<div class="paragraph">
+<p>O cliente também tem de esperar quando o bean <code>@Stateful</code> esta
em uma transação e o cliente o invocar de fora dessa transação.</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_stateless_bean">Stateless Bean</h3>
+<div class="paragraph">
+<p>Se existir 20 instancias de um bean no pool e todas elas estiverem
ocupadas, quando uma nova requisição chegar, o processo <strong>tem de
esperar</strong> ate algum bean estar disponÃvel no pool. (Nota: a semântica
de pool, se houver, não é coberta pela especificação. O server vendor pode
ou não envolver uma condição de espera)</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_singleton_bean">Singleton Bean</h3>
+<div class="paragraph">
+<p>O container força um acesso single-thread por padrão para um componente
singleton. Isso é parecido com o que a anotação <code>@Lock(WRITE)</code>
faz. Quando um método anotado com <code>@Lock(WRITE)</code> é executado,
todos os outros métodos <code>@Lock(WRITE)</code> e <code>@Lock(READ)</code>
que são chamados tem de esperar até que ele termine sua execução.</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_resumindo">Resumindo</h3>
+<div class="ulist">
+<ul>
+<li>
+<p><code>@Singleton</code> - Um método <code>@Lock(WRITE)</code> esta sendo
invocado e o gerenciamento de concorrência pelo container esta sendo usado.
Todos os métodos sao <code>@Lock(WRITE)</code> por padrão.</p>
+</li>
+<li>
+<p><code>@Stateful</code> - Qualquer método de uma instancia pode estar sendo
utilizado e uma segunda chamada pode acontecer. Ou o bean
<code>@Stateful</code> esta em uma transação e o cliente o chama de fora
dessa transação.</p>
+</li>
+<li>
+<p><code>@Stateless</code> - Sem instancias disponÃveis no pool. Como
observado, a semântica de pool (se houver) não é coberta pela
especificação. Caso exista uma semântica no server vendor que envolva uma
condição de espera, a anotação <code>@AccessTimeout</code> deveria ser
aplicada.</p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="__code_accesstimeout_code"><code>@AccessTimeout</code></h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>A anotação <code>@AccessTimeout</code> é simplesmente uma conveniência
em torno da tupla <code>long</code> e <code>TimeUnit</code> comumente usadas na
<code>java.util.concurrent</code> API.</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">import
java.util.concurrent.TimeUnit;
+@Target({METHOD, TYPE})
+@Retention(RUNTIME)
+public @interface AccessTimeout {
+ long value();
+ TimeUnit unit() default TimeUnit.MILLISECONDS;
+}</code></pre>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_uso">Uso</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>Um método ou uma classe pode ser anotada com <code>@AccessTimeout</code>
para especificar o temo máximo que uma chamada deve esperar para acessar o
bean quando acontecer uma condição de espera.</p>
+</div>
+<div class="paragraph">
+<p>A semântica para o <code>value</code> é a seguinte:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>value</code> > 0 indica um tempo de espera que é especificado
pelo elemento <code>unit</code>.</p>
+</li>
+<li>
+<p><code>value</code> de 0 significa que acesso concorrente não é
permitido.</p>
+</li>
+<li>
+<p><code>value</code> de -1 indica que a chamada do cliente vai ficar
bloqueada por tempo indeterminado ate que possa proceder.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Simples!</p>
+</div>
+<div class="admonitionblock note">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-note" title="Note"></i>
+</td>
+<td class="content">
+Quando acontecer um timeout, qual exceção o cliente recebe?
+Citando a especificação: "if a client-invoked business method is in progress
on an instance when another client-invoked call, from the same or different
client, arrives at the same instance of a stateful session bean, if the second
client is a client of the bean’s business interface or no-interface view,
the concurrent invocation must result in the second client receiving a
javax.ejb.ConcurrentAccessException[15]. If the EJB 2.1 client view is used,
the container must throw a java.rmi.RemoteException if the second client is a
remote client, or a javax.ejb.EJBException if the second client is a local
client"
+Ou seja pode receber <code>javax.ejb.ConcurrentAccessException</code>. Ou no
caso de EJB 2.1 estar sendo utilizado pode receber
<code>java.rmi.RemoteException</code> se for um cliente externo ou
<code>javax.ejb.EJBException</code> se for local.
+</td>
+</tr>
+</table>
+</div>
+<div class="sect2">
+<h3 id="_sem_padrão">Sem padrão</h3>
+<div class="paragraph">
+<p>Note que o atributo <code>value</code> não tem um valor padrão. Isso foi
intencional, tendo a intenção de informar que se o
<code>@AccessTimeout</code> não for explicitamente usado, o comportamento sera
o do server vendor.</p>
+</div>
+<div class="paragraph">
+<p>Alguns servidores vão esperar por um tempo pre determinado e lançar a
exceção <code>javax.ejb.ConcurrentAccessException</code>, outros podem
lançar de imediato.</p>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_exemplo">Exemplo</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>Aqui nos temos um simples <code>@Singleton</code> bean que possui tres
métodos sÃncronos e um método anotado com <code>@Asynchronous</code>. O
componente esta anotado com <code>@Lock(WRITE)</code> então apenas uma thread
pode acessar o <code>@Singleton</code> por vez. Este é o comportamento padrão
de um componente <code>@Singleton</code>, então usar a anotação
<code>@Lock(WRITE)</code> não é necessário mas é importante para deixar
claro que o componente tem um comportamento single-thread.</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">@Singleton
+@Lock(WRITE)
+public class BusyBee {
+
+ @Asynchronous
+ public Future stayBusy(CountDownLatch ready) {
+ ready.countDown();
+
+ try {
+ new CountDownLatch(1).await();
+ } catch (InterruptedException e) {
+ Thread.interrupted();
+ }
+
+ return null;
+ }
+
+ @AccessTimeout(0)
+ public void doItNow() {
+ // faz alguma coisa
+ }
+
+ @AccessTimeout(value = 5, unit = TimeUnit.SECONDS)
+ public void doItSoon() {
+ // faz alguma coisa
+ }
+
+ @AccessTimeout(-1)
+ public void justDoIt() {
+ // faz alguma coisa
+ }
+}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>O método <code>@Asynchronous</code> não tem uma relação direta com o
<code>@AccessTimeout</code>, mas serve como uma forma simple de travar
("lockar") o bean para realizarmos o teste. Ele nos permite testar o
comportamento concorrente do componente.</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">public
class BusyBeeTest extends TestCase {
+
+ public void test() throws Exception {
+
+ final Context context = EJBContainer.createEJBContainer().getContext();
+
+ final CountDownLatch ready = new CountDownLatch(1);
+
+ final BusyBee busyBee = (BusyBee)
context.lookup("java:global/access-timeout/BusyBee");
+
+ // Esse método assÃncrono nunca termina.
+ busyBee.stayBusy(ready);
+
+ // Você ainda esta trabalhando abelhinha?
+ ready.await();
+
+
+ // Beleza, a abelha esta ocupada.
+
+
+ { // Timeout imediato
+ final long start = System.nanoTime();
+
+ try {
+ busyBee.doItNow();
+
+ fail("A abelha continua ocupada");
+ } catch (Exception e) {
+ // A abelha continua muito ocupada como esperado.
+ }
+
+ assertEquals(0, seconds(start));
+ }
+
+ { // Timeout em 5 segundos
+ final long start = System.nanoTime();
+
+ try {
+ busyBee.doItSoon();
+
+ fail("A abelha deve estar ocupada");
+ } catch (Exception e) {
+ // A abelha continua ocupada como esperado.
+ }
+
+ assertEquals(5, seconds(start));
+ }
+
+ // Esse método vai te fazer esperar para sempre, apenas teste se
estiver com bastante tempo :D
+ // busyBee.justDoIt();
+ }
+
+ private long seconds(long start) {
+ return TimeUnit.NANOSECONDS.toSeconds(System.nanoTime() - start);
+ }
+}</code></pre>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_executando">Executando</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-bash" data-lang="bash">mvn clean
test</code></pre>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_saida">Saida</h3>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-bash"
data-lang="bash">-------------------------------------------------------
+ T E S T S
+-------------------------------------------------------
+Running org.superbiz.accesstimeout.BusyBeeTest
+Apache OpenEJB 4.0.0-beta-1 build: 20111002-04:06
+http://tomee.apache.org/
+INFO - openejb.home = /Users/dblevins/examples/access-timeout
+INFO - openejb.base = /Users/dblevins/examples/access-timeout
+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/access-timeout/target/classes
+INFO - Beginning load: /Users/dblevins/examples/access-timeout/target/classes
+INFO - Configuring enterprise application:
/Users/dblevins/examples/access-timeout
+INFO - Configuring Service(id=Default Singleton Container, type=Container,
provider-id=Default Singleton Container)
+INFO - Auto-creating a container for bean BusyBee: Container(type=SINGLETON,
id=Default Singleton Container)
+INFO - Configuring Service(id=Default Managed Container, type=Container,
provider-id=Default Managed Container)
+INFO - Auto-creating a container for bean
org.superbiz.accesstimeout.BusyBeeTest: Container(type=MANAGED, id=Default
Managed Container)
+INFO - Enterprise application "/Users/dblevins/examples/access-timeout" loaded.
+INFO - Assembling app: /Users/dblevins/examples/access-timeout
+INFO -
Jndi(name="java:global/access-timeout/BusyBee!org.superbiz.accesstimeout.BusyBee")
+INFO - Jndi(name="java:global/access-timeout/BusyBee")
+INFO -
Jndi(name="java:global/EjbModule748454644/org.superbiz.accesstimeout.BusyBeeTest!org.superbiz.accesstimeout.BusyBeeTest")
+INFO -
Jndi(name="java:global/EjbModule748454644/org.superbiz.accesstimeout.BusyBeeTest")
+INFO - Created Ejb(deployment-id=org.superbiz.accesstimeout.BusyBeeTest,
ejb-name=org.superbiz.accesstimeout.BusyBeeTest, container=Default Managed
Container)
+INFO - Created Ejb(deployment-id=BusyBee, ejb-name=BusyBee, container=Default
Singleton Container)
+INFO - Started Ejb(deployment-id=org.superbiz.accesstimeout.BusyBeeTest,
ejb-name=org.superbiz.accesstimeout.BusyBeeTest, container=Default Managed
Container)
+INFO - Started Ejb(deployment-id=BusyBee, ejb-name=BusyBee, container=Default
Singleton Container)
+INFO - Deployed Application(path=/Users/dblevins/examples/access-timeout)
+Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.071 sec
+
+Results :
+
+Tests run: 1, Failures: 0, Errors: 0, Skipped: 0</code></pre>
+</div>
+</div>
+</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>
+
Added:
tomee/site/trunk/content/master/pt/examples/applicationcomposer-jaxws-cdi.html
URL:
http://svn.apache.org/viewvc/tomee/site/trunk/content/master/pt/examples/applicationcomposer-jaxws-cdi.html?rev=1866555&view=auto
==============================================================================
---
tomee/site/trunk/content/master/pt/examples/applicationcomposer-jaxws-cdi.html
(added)
+++
tomee/site/trunk/content/master/pt/examples/applicationcomposer-jaxws-cdi.html
Sat Sep 7 14:25:49 2019
@@ -0,0 +1,443 @@
+<!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>Application Composer com JAX-WS and CDI</h1>
+ </div>
+ </div>
+ </div>
+ <div class="row">
+
+ <div class="col-md-12">
+ <div id="preamble">
+<div class="sectionbody">
+<div class="paragraph">
+<p>Application Composer é uma API para criar uma aplicação EE
programaticamente. Ãsto é muito útil em um contexto de texto, por isso não
é de admirar que se originou a partir daqui.
+Para mais informação sobre o Application Composer, por favor acessar o link
<a
href="http://tomee.apache.org/tomee-8.0/docs/application-composer/index.html">Seção
do Compositor de Aplicativos na documentação</a>.</p>
+</div>
+<div class="paragraph">
+<p>Neste exemplo, vamos usar o <code>@ApplicationComposer</code> no contexto
de uma aplicação JAX-WS .</p>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_exemplo">Exemplo</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>Este exemplo é uma aplicação de planejamento de reuniões. à um
aplicativo JAX-WS e aceita requisições para a reserva de reuniões. A
aplicação primeiro verifica se a requisão pode ser reservada, se possivel,
ela é reservada e retorna para o cliente se o pedido foi reservado (um valor
booleano). Esta é uma aplicação simples, com propósito de demonstração,
por isso é bastante simplificado. Uma solicitação de reserva é representada
apenas pela data de inÃcio da reunião (um valor <code>java.util.Date</code>).
+Uma solicitação de reserva pode ser reservada se começar após a data
atual.</p>
+</div>
+<div class="paragraph">
+<p>A logica de negócio é implementada usando uma classe
<code>MeetingPlannerImpl</code> (implementando` MeetingPlanner`). Esta classe
é um serviço JAX-WS, expondo o seguinte método: <code>boolean book (final
Date date)</code>.
+O cliente vai enviar uma requisição, contendo uma data; o serviço vai
retornar true ou false, se o pedido pode ser reservado. O serviço JAX-WS
exposto usa, além disso, uma caracterÃstica diferente, CDI, injetar uma
+classe de serviço de lógica de negócios, verificando se a solicitação
pode ser reservada. Então, quando chegar a hora de testar a anotação <code>@
ApplicationComposer</code>, verificaremos se o CDI funcionou em nossa
aplicação e se o serviço JAX-WS está em execução (ou funcionando).</p>
+</div>
+<div class="paragraph">
+<p>A lógica de negócios que verifica se uma solicitação é registrável é
definida pela seguinte interface:</p>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>import java.util.Date;
+
+public interface Agenda {
+ boolean isBookable(Date d);
+}</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>A implementação é simples, sem muitos detalhes:</p>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>import java.util.Date;
+
+public class LazyAgenda implements Agenda {
+ @Override
+ public boolean isBookable(final Date d) {
+ return d.after(new Date());
+ }
+}</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>O serviço JAX-WS é definido pela seguinte interface:</p>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>import javax.jws.WebMethod;
+import javax.jws.WebService;
+import java.util.Date;
+
+@WebService
+public interface MeetingPlanner {
+
+ @WebMethod(operationName = "book", exclude = false)
+ boolean book(final Date date);
+}</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>A classe que implementa essa interface é:</p>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>import javax.inject.Inject;
+import javax.jws.WebService;
+import java.util.Date;
+
+@WebService
+public class MeetingPlannerImpl implements MeetingPlanner {
+ @Inject
+ private Agenda agenda;
+
+ @Override
+ public boolean book(final Date date) {
+ return agenda.isBookable(date);
+ }
+}</pre>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_usando_o_application_composer">Usando o Application Composer</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>Agora, que a aplicação está completa, é hora de testa-la. Pra isto,
iremos adcionar um teste unitário que ira usar o Application Composer para
iniciar e fazer deploy da nossa aplicação em um ambiente Java EE Full .</p>
+</div>
+<div class="paragraph">
+<p>O teste completo:</p>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>import org.apache.openejb.jee.WebApp;
+import org.apache.openejb.junit.ApplicationComposer;
+import org.apache.openejb.testing.Classes;
+import org.apache.openejb.testing.Configuration;
+import org.apache.openejb.testing.EnableServices;
+import org.apache.openejb.testing.Module;
+import org.apache.openejb.testng.PropertiesBuilder;
+import org.apache.openejb.util.NetworkUtil;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Dispatch;
+import javax.xml.ws.Service;
+import java.net.URL;
+import java.util.Date;
+import java.util.Properties;
+
+import static org.junit.Assert.assertTrue;
+
+@EnableServices("jax-ws")
+@RunWith(ApplicationComposer.class)
+public class MeetingPlannerTest {
+ private static final int JAX_WS_PORT = NetworkUtil.getNextAvailablePort();
+
+ @Configuration
+ public Properties configuration() {
+ return new PropertiesBuilder().p("httpejbd.port",
Integer.toString(JAX_WS_PORT)).build();
+ }
+
+ @Module
+ @Classes(cdi = true, value = {MeetingPlannerImpl.class, LazyAgenda.class})
+ public WebApp war() {
+ return new WebApp()
+ .contextRoot("/demo")
+ .addServlet("jaxws", MeetingPlannerImpl.class.getName(),
"/meeting-planner");
+ }
+
+ @Test
+ public void bookPort() throws Exception {
+ final Service service = Service.create(
+ new URL("http://127.0.0.1:" + JAX_WS_PORT +
"/demo/meeting-planner?wsdl"),
+ new QName("http://jaxws.example.superbiz.org/",
"MeetingPlannerImplService"));
+ final MeetingPlanner planner = service.getPort(MeetingPlanner.class);
+ assertTrue(planner.book(new Date(System.currentTimeMillis() +
1000000)));
+ }
+}</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>A primeira coisa que podemos notar é que, nós usamos o Application
Composer como executor JUnit. Então, Nosso teste se integra com as ferramentas
atuais, assim como qualquer outro teste JUnit. A configuração do teste é
definida no método anotado com <code>@ Configuration</code>.</p>
+</div>
+<div class="paragraph">
+<p>A aplicação é iniciada no método tendo a annotatação
<code>@Module</code> . Neste exemplo, especificamos as classes que queremos
analisar e o fato de que queremos usar o CDI.</p>
+</div>
+<div class="paragraph">
+<p>Nosso teste faz um pedido de reserva, enviando uma data no futuro, ele
verifica se a reserva está concluÃda.</p>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_executando_o_teste">Executando o teste</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>Executando o teste nós podemos ver que a aplicação iniciou com sucesso,
que o serviço JAX-WS está em execução e que atende corretamente as
solicitações recebidas.</p>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>-------------------------------------------------------
+ T E S T S
+-------------------------------------------------------
+Running org.superbiz.example.jaxws.MeetingPlannerTest
+INFO - Created new singletonService
org.apache.openejb.cdi.ThreadSingletonServiceImpl@49993335
+INFO - Succeeded in installing singleton service
+INFO - Cannot find the configuration file [conf/openejb.xml]. Will attempt to
create one for the beans deployed.
+INFO - Configuring Service(id=Default Security Service, type=SecurityService,
provider-id=Default Security Service)
+INFO - Configuring Service(id=Default Transaction Manager,
type=TransactionManager, provider-id=Default Transaction Manager)
+INFO - Creating TransactionManager(id=Default Transaction Manager)
+INFO - Creating SecurityService(id=Default Security Service)
+INFO - Initializing network services
+INFO - Creating ServerService(id=cxf)
+INFO - Creating ServerService(id=httpejbd)
+INFO - Created ServicePool 'httpejbd' with (10) core threads, limited to (200)
threads with a queue of (9)
+INFO - Initializing network services
+INFO - ** Bound Services **
+INFO - NAME IP PORT
+INFO - httpejbd 127.0.0.1 39649
+INFO - -------
+INFO - Ready!
+INFO - Configuring enterprise application:
/home/bogdan/open_source/tomee-master/examples/applicationcomposer-jaxws-cdi/MeetingPlannerTest
+INFO - Configuring Service(id=Default Managed Container, type=Container,
provider-id=Default Managed Container)
+INFO - Auto-creating a container for bean
org.superbiz.example.jaxws.MeetingPlannerTest: Container(type=MANAGED,
id=Default Managed Container)
+INFO - Creating Container(id=Default Managed Container)
+INFO - Using directory /tmp for stateful session passivation
+INFO - Enterprise application
"/home/bogdan/open_source/tomee-master/examples/applicationcomposer-jaxws-cdi/MeetingPlannerTest"
loaded.
+INFO - Creating dedicated application classloader for MeetingPlannerTest
+INFO - Assembling app:
/home/bogdan/open_source/tomee-master/examples/applicationcomposer-jaxws-cdi/MeetingPlannerTest
+INFO - Existing thread singleton service in SystemInstance():
org.apache.openejb.cdi.ThreadSingletonServiceImpl@49993335
+INFO - Some Principal APIs could not be loaded:
org.eclipse.microprofile.jwt.JsonWebToken out of
org.eclipse.microprofile.jwt.JsonWebToken not found
+INFO - OpenWebBeans Container is starting...
+INFO - Adding OpenWebBeansPlugin : [CdiPlugin]
+INFO - All injection points were validated successfully.
+INFO - OpenWebBeans Container has started, it took 406 ms.
+INFO - Webservice(wsdl=http://127.0.0.1:39649/demo/meeting-planner,
qname={http://jaxws.example.superbiz.org/}MeetingPlannerImplService) -->
Pojo(id=null./demo.jaxws)
+INFO - Deployed
Application(path=/home/bogdan/open_source/tomee-master/examples/applicationcomposer-jaxws-cdi/MeetingPlannerTest)
+INFO - Creating Service
{http://jaxws.example.superbiz.org/}MeetingPlannerImplService from WSDL:
http://127.0.0.1:39649/demo/meeting-planner?wsdl
+INFO - Creating Service
{http://jaxws.example.superbiz.org/}MeetingPlannerImplService from WSDL:
http://127.0.0.1:39649/demo/meeting-planner?wsdl
+INFO - Undeploying app:
/home/bogdan/open_source/tomee-master/examples/applicationcomposer-jaxws-cdi/MeetingPlannerTest
+INFO - Stopping network services
+INFO - Stopping server services
+INFO - Created new singletonService
org.apache.openejb.cdi.ThreadSingletonServiceImpl@49993335
+INFO - Succeeded in installing singleton service
+INFO - Cannot find the configuration file [conf/openejb.xml]. Will attempt to
create one for the beans deployed.
+INFO - Configuring Service(id=Default Security Service, type=SecurityService,
provider-id=Default Security Service)
+INFO - Configuring Service(id=Default Transaction Manager,
type=TransactionManager, provider-id=Default Transaction Manager)
+INFO - Creating TransactionManager(id=Default Transaction Manager)
+INFO - Creating SecurityService(id=Default Security Service)
+INFO - Initializing network services
+INFO - Creating ServerService(id=cxf)
+INFO - Creating ServerService(id=httpejbd)
+INFO - Created ServicePool 'httpejbd' with (10) core threads, limited to (200)
threads with a queue of (9)
+INFO - Initializing network services
+INFO - ** Bound Services **
+INFO - NAME IP PORT
+INFO - httpejbd 127.0.0.1 39649
+INFO - -------
+INFO - Ready!
+INFO - Configuring enterprise application:
/home/bogdan/open_source/tomee-master/examples/applicationcomposer-jaxws-cdi/MeetingPlannerTest
+INFO - Configuring Service(id=Default Managed Container, type=Container,
provider-id=Default Managed Container)
+INFO - Auto-creating a container for bean
org.superbiz.example.jaxws.MeetingPlannerTest: Container(type=MANAGED,
id=Default Managed Container)
+INFO - Creating Container(id=Default Managed Container)
+INFO - Using directory /tmp for stateful session passivation
+INFO - Enterprise application
"/home/bogdan/open_source/tomee-master/examples/applicationcomposer-jaxws-cdi/MeetingPlannerTest"
loaded.
+INFO - Creating dedicated application classloader for MeetingPlannerTest
+INFO - Assembling app:
/home/bogdan/open_source/tomee-master/examples/applicationcomposer-jaxws-cdi/MeetingPlannerTest
+INFO - Existing thread singleton service in SystemInstance():
org.apache.openejb.cdi.ThreadSingletonServiceImpl@49993335
+INFO - Some Principal APIs could not be loaded:
org.eclipse.microprofile.jwt.JsonWebToken out of
org.eclipse.microprofile.jwt.JsonWebToken not found
+INFO - OpenWebBeans Container is starting...
+INFO - Adding OpenWebBeansPlugin : [CdiPlugin]
+INFO - All injection points were validated successfully.
+INFO - OpenWebBeans Container has started, it took 52 ms.
+INFO - Webservice(wsdl=http://127.0.0.1:39649/demo/meeting-planner,
qname={http://jaxws.example.superbiz.org/}MeetingPlannerImplService) -->
Pojo(id=null./demo.jaxws)
+INFO - Deployed
Application(path=/home/bogdan/open_source/tomee-master/examples/applicationcomposer-jaxws-cdi/MeetingPlannerTest)
+INFO - Undeploying app:
/home/bogdan/open_source/tomee-master/examples/applicationcomposer-jaxws-cdi/MeetingPlannerTest
+INFO - Stopping network services
+INFO - Stopping server services
+Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.076 sec
+
+Results :
+
+Tests run: 2, Failures: 0, Errors: 0, Skipped: 0</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Um exemplo completo pode ser encontrado aqui: <a
href="https://github.com/apache/tomee/tree/master/examples/applicationcomposer-jaxws-cdi">here</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>
+
Added: tomee/site/trunk/content/master/pt/examples/applicationexception.html
URL:
http://svn.apache.org/viewvc/tomee/site/trunk/content/master/pt/examples/applicationexception.html?rev=1866555&view=auto
==============================================================================
--- tomee/site/trunk/content/master/pt/examples/applicationexception.html
(added)
+++ tomee/site/trunk/content/master/pt/examples/applicationexception.html Sat
Sep 7 14:25:49 2019
@@ -0,0 +1,292 @@
+<!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>Anotação @ApplicationException</h1>
+ </div>
+ </div>
+ </div>
+ <div class="row">
+
+ <div class="col-md-12">
+ <h1 id="_declarando_um_applicationexception"
class="sect0">Declarando um @ApplicationException</h1>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code> import javax.ejb.ApplicationException;
+
+ /**
+ * @version $Rev: 784112 $ $Date: 2009-06-12 06:23:57 -0700 (Fri, 12 Jun
2009) $
+ */
+ @ApplicationException(rollback = true)
+ public abstract class BusinessException extends RuntimeException {
+ }</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>por padrão, @ApplicationException é herdado</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code> public class ValueRequiredException extends
BusinessException {
+ }</code></pre>
+</div>
+</div>
+<h1 id="_no_código_do_bean" class="sect0">No código do bean</h1>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code> @Stateless
+ public class ThrowBusinessExceptionImpl implements ThrowBusinessException {
+
+ public void throwValueRequiredException() throws BusinessException {
+ throw new ValueRequiredException();
+ }
+
+ }</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Normalmente lançando um <code>RuntimeException</code> que faria o
contêiner reverter a transação e destruir a instância do bean que lançou a
exceção.</p>
+</div>
+<div class="paragraph">
+<p>Como a <code>BusinessException</code> foi anotada com o
<code>@ApplicationException(rollback = true)</code> somente a transação de
rollback ocorrerá e o bean não será destruÃdo.</p>
+</div>
+<h1 id="_caso_de_teste" class="sect0">Caso de Teste</h1>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java"> import
org.junit.Assert;
+ import org.junit.Before;
+ import org.junit.Test;
+
+ import javax.naming.Context;
+ import javax.naming.InitialContext;
+ import java.util.Properties;
+
+ public class ThrowBusinessExceptionImplTest {
+
+ private InitialContext initialContext;
+
+ @Before
+ public void setUp() throws Exception {
+ Properties properties = new Properties();
+ properties.setProperty(Context.INITIAL_CONTEXT_FACTORY,
"org.apache.openejb.core.LocalInitialContextFactory");
+
+ initialContext = new InitialContext(properties);
+ }
+
+ @Test(expected = ValueRequiredException.class)
+ public void testCounterViaRemoteInterface() throws Exception {
+ Object object =
initialContext.lookup("ThrowBusinessExceptionImplRemote");
+
+ Assert.assertNotNull(object);
+ Assert.assertTrue(object instanceof ThrowBusinessException);
+ ThrowBusinessException bean = (ThrowBusinessException) object;
+ bean.throwValueRequiredException();
+ }
+ }</code></pre>
+</div>
+</div>
+<h1 id="_executando" class="sect0">Executando</h1>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code>
-------------------------------------------------------
+ T E S T S
+ -------------------------------------------------------
+ Running org.superbiz.appexception.ThrowBusinessExceptionImplTest
+ Apache OpenEJB 4.0.0-beta-1 build: 20111002-04:06
+ http://tomee.apache.org/
+ INFO - openejb.home = /Users/dblevins/examples/applicationexception
+ INFO - openejb.base = /Users/dblevins/examples/applicationexception
+ 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/applicationexception/target/classes
+ INFO - Beginning load:
/Users/dblevins/examples/applicationexception/target/classes
+ INFO - Configuring enterprise application:
/Users/dblevins/examples/applicationexception/classpath.ear
+ INFO - Configuring Service(id=Default Stateless Container, type=Container,
provider-id=Default Stateless Container)
+ INFO - Auto-creating a container for bean ThrowBusinessExceptionImpl:
Container(type=STATELESS, id=Default Stateless Container)
+ INFO - Enterprise application
"/Users/dblevins/examples/applicationexception/classpath.ear" loaded.
+ INFO - Assembling app:
/Users/dblevins/examples/applicationexception/classpath.ear
+ INFO - Jndi(name=ThrowBusinessExceptionImplRemote) -->
Ejb(deployment-id=ThrowBusinessExceptionImpl)
+ INFO -
Jndi(name=global/classpath.ear/applicationexception/ThrowBusinessExceptionImpl!org.superbiz.appexception.ThrowBusinessException)
--> Ejb(deployment-id=ThrowBusinessExceptionImpl)
+ INFO -
Jndi(name=global/classpath.ear/applicationexception/ThrowBusinessExceptionImpl)
--> Ejb(deployment-id=ThrowBusinessExceptionImpl)
+ INFO - Created Ejb(deployment-id=ThrowBusinessExceptionImpl,
ejb-name=ThrowBusinessExceptionImpl, container=Default Stateless Container)
+ INFO - Started Ejb(deployment-id=ThrowBusinessExceptionImpl,
ejb-name=ThrowBusinessExceptionImpl, container=Default Stateless Container)
+ INFO - Deployed
Application(path=/Users/dblevins/examples/applicationexception/classpath.ear)
+ Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.434 sec
+
+ Results :
+
+ Tests run: 1, Failures: 0, Errors: 0, Skipped: 0</code></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>
+
Added: tomee/site/trunk/content/master/pt/examples/arquillian-jpa.html
URL:
http://svn.apache.org/viewvc/tomee/site/trunk/content/master/pt/examples/arquillian-jpa.html?rev=1866555&view=auto
==============================================================================
--- tomee/site/trunk/content/master/pt/examples/arquillian-jpa.html (added)
+++ tomee/site/trunk/content/master/pt/examples/arquillian-jpa.html Sat Sep 7
14:25:49 2019
@@ -0,0 +1,356 @@
+<!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>Arquillian Persistence Extension</h1>
+ </div>
+ </div>
+ </div>
+ <div class="row">
+
+ <div class="col-md-12">
+ <div id="preamble">
+<div class="sectionbody">
+<div class="paragraph">
+<p>Uma amostra mostrando como usar o TomEE, Arquillian e sua extensão de
persistência.</p>
+</div>
+<div class="paragraph">
+<p>Observe que ele não funciona com contêineres incorporados (openejb,
tomee-embedded)
+se você não usar soluções alternativas como <a
href="https://github.com/rmannibucau/persistence-with-openejb-and-arquillian"
class="bare">https://github.com/rmannibucau/persistence-with-openejb-and-arquillian</a>
+(ver a pasta src/test/resources).</p>
+</div>
+</div>
+</div>
+<h1 id="_executando_saÃda" class="sect0">Executando (saÃda)</h1>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code>
-------------------------------------------------------
+ T E S T S
+ -------------------------------------------------------
+ Running org.superbiz.arquillian.test.persistence.PersistenceTest
+ oct. 01, 2014 6:30:23 PM org.apache.openejb.arquillian.common.Setup
findHome
+ INFOS: Unable to find home in:
/home/rmannibucau/dev/Apache/tomee-trunk/examples/arquillian-jpa/target/apache-tomee-remote
+ oct. 01, 2014 6:30:23 PM org.apache.openejb.arquillian.common.MavenCache
getArtifact
+ INFOS: Downloading
org.apache.openejb:apache-tomee:7.0.0-SNAPSHOT:zip:webprofile please wait...
+ oct. 01, 2014 6:30:23 PM org.apache.openejb.arquillian.common.Zips unzip
+ INFOS: Extracting
'/home/rmannibucau/.m2/repository/org/apache/openejb/apache-tomee/7.0.0-SNAPSHOT/apache-tomee-7.0.0-SNAPSHOT-webprofile.zip'
to
'/home/rmannibucau/dev/Apache/tomee-trunk/examples/arquillian-jpa/target/apache-tomee-remote'
+ oct. 01, 2014 6:30:24 PM
org.apache.tomee.arquillian.remote.RemoteTomEEContainer configure
+ INFOS: Downloaded container to:
/home/rmannibucau/dev/Apache/tomee-trunk/examples/arquillian-jpa/target/apache-tomee-remote/apache-tomee-webprofile-7.0.0-SNAPSHOT
+ INFOS - Server version: Apache Tomcat/8.0.14
+ INFOS - Server built: Sep 24 2014 09:01:51
+ INFOS - Server number: 8.0.14.0
+ INFOS - OS Name: Linux
+ INFOS - OS Version: 3.13.0-35-generic
+ INFOS - Architecture: amd64
+ INFOS - JVM Version: 1.7.0_67-b01
+ INFOS - JVM Vendor: Oracle Corporation
+ INFOS - The APR based Apache Tomcat Native library which allows optimal
performance in production environments was not found on the java.library.path:
/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
+ INFOS - Initializing ProtocolHandler ["http-nio-52256"]
+ INFOS - Using a shared selector for servlet write/read
+ INFOS - Initializing ProtocolHandler ["ajp-nio-40071"]
+ INFOS - Using a shared selector for servlet write/read
+ INFOS - Using
'openejb.jdbc.datasource-creator=org.apache.tomee.jdbc.TomEEDataSourceCreator'
+ INFOS -
********************************************************************************
+ INFOS - OpenEJB http://tomee.apache.org/
+ INFOS - Startup: Wed Oct 01 18:30:26 CEST 2014
+ INFOS - Copyright 1999-2013 (C) Apache OpenEJB Project, All Rights
Reserved.
+ INFOS - Version: 7.0.0-SNAPSHOT
+ INFOS - Build date: 20141001
+ INFOS - Build time: 04:53
+ INFOS -
********************************************************************************
+ INFOS - openejb.home =
/home/rmannibucau/dev/Apache/tomee-trunk/examples/arquillian-jpa/target/apache-tomee-remote/apache-tomee-webprofile-7.0.0-SNAPSHOT
+ INFOS - openejb.base =
/home/rmannibucau/dev/Apache/tomee-trunk/examples/arquillian-jpa/target/apache-tomee-remote/apache-tomee-webprofile-7.0.0-SNAPSHOT
+ INFOS - Created new singletonService
org.apache.openejb.cdi.ThreadSingletonServiceImpl@13158bbd
+ INFOS - Succeeded in installing singleton service
+ INFOS - openejb configuration file is
'/home/rmannibucau/dev/Apache/tomee-trunk/examples/arquillian-jpa/target/apache-tomee-remote/apache-tomee-webprofile-7.0.0-SNAPSHOT/conf/tomee.xml'
+ INFOS - Configuring Service(id=Tomcat Security Service,
type=SecurityService, provider-id=Tomcat Security Service)
+ INFOS - Configuring Service(id=Default Transaction Manager,
type=TransactionManager, provider-id=Default Transaction Manager)
+ INFOS - Configuring Service(id=demoDataSource, type=Resource,
provider-id=Default JDBC Database)
+ INFOS - Using 'openejb.system.apps=true'
+ INFOS - Configuring enterprise application: openejb
+ INFOS - Using openejb.deploymentId.format '{ejbName}'
+ INFOS - Auto-deploying ejb openejb/Deployer:
EjbDeployment(deployment-id=openejb/Deployer)
+ INFOS - Auto-deploying ejb openejb/ConfigurationInfo:
EjbDeployment(deployment-id=openejb/ConfigurationInfo)
+ INFOS - Auto-deploying ejb MEJB: EjbDeployment(deployment-id=MEJB)
+ INFOS - Configuring Service(id=Default Stateless Container,
type=Container, provider-id=Default Stateless Container)
+ INFOS - Auto-creating a container for bean openejb/Deployer:
Container(type=STATELESS, id=Default Stateless Container)
+ INFOS - Enterprise application "openejb" loaded.
+ INFOS - Creating TransactionManager(id=Default Transaction Manager)
+ INFOS - Creating SecurityService(id=Tomcat Security Service)
+ INFOS - Creating Resource(id=demoDataSource)
+ INFOS - Disabling testOnBorrow since no validation query is provided
+ INFOS - Creating Container(id=Default Stateless Container)
+ INFOS - Not creating another application classloader for openejb
+ INFOS - Assembling app: openejb
+ INFOS - Using
'openejb.jndiname.format={deploymentId}{interfaceType.openejbLegacyName}'
+ INFOS - Jndi(name=openejb/DeployerBusinessRemote) -->
Ejb(deployment-id=openejb/Deployer)
+ INFOS -
Jndi(name=global/openejb/openejb/Deployer!org.apache.openejb.assembler.Deployer)
--> Ejb(deployment-id=openejb/Deployer)
+ INFOS - Jndi(name=global/openejb/openejb/Deployer) -->
Ejb(deployment-id=openejb/Deployer)
+ INFOS - Jndi(name=openejb/ConfigurationInfoBusinessRemote) -->
Ejb(deployment-id=openejb/ConfigurationInfo)
+ INFOS -
Jndi(name=global/openejb/openejb/ConfigurationInfo!org.apache.openejb.assembler.classic.cmd.ConfigurationInfo)
--> Ejb(deployment-id=openejb/ConfigurationInfo)
+ INFOS - Jndi(name=global/openejb/openejb/ConfigurationInfo) -->
Ejb(deployment-id=openejb/ConfigurationInfo)
+ INFOS - Jndi(name=MEJB) --> Ejb(deployment-id=MEJB)
+ INFOS -
Jndi(name=global/openejb/MEJB!javax.management.j2ee.ManagementHome) -->
Ejb(deployment-id=MEJB)
+ INFOS - Jndi(name=global/openejb/MEJB) --> Ejb(deployment-id=MEJB)
+ INFOS - Created Ejb(deployment-id=openejb/Deployer,
ejb-name=openejb/Deployer, container=Default Stateless Container)
+ INFOS - Created Ejb(deployment-id=MEJB, ejb-name=MEJB, container=Default
Stateless Container)
+ INFOS - Created Ejb(deployment-id=openejb/ConfigurationInfo,
ejb-name=openejb/ConfigurationInfo, container=Default Stateless Container)
+ INFOS - Started Ejb(deployment-id=openejb/Deployer,
ejb-name=openejb/Deployer, container=Default Stateless Container)
+ INFOS - Started Ejb(deployment-id=MEJB, ejb-name=MEJB, container=Default
Stateless Container)
+ INFOS - Started Ejb(deployment-id=openejb/ConfigurationInfo,
ejb-name=openejb/ConfigurationInfo, container=Default Stateless Container)
+ INFOS - Deployed
MBean(openejb.user.mbeans:application=openejb,group=org.apache.openejb.assembler.monitoring,name=JMXDeployer)
+ INFOS - Deployed Application(path=openejb)
+ INFOS - Creating ServerService(id=cxf-rs)
+ INFOS - ** Bound Services **
+ INFOS - NAME IP PORT
+ INFOS - -------
+ INFOS - Ready!
+ INFOS - Initialization processed in 2589 ms
+ INFOS - Importing a Tomcat Resource with id 'UserDatabase' of type
'org.apache.catalina.UserDatabase'.
+ INFOS - Creating Resource(id=UserDatabase)
+ INFOS - Démarrage du service Catalina
+ INFOS - Starting Servlet Engine: Apache Tomcat (TomEE)/8.0.14
(7.0.0-SNAPSHOT)
+ INFOS - Starting ProtocolHandler ["http-nio-52256"]
+ INFOS - Starting ProtocolHandler ["ajp-nio-40071"]
+ INFOS - Server startup in 140 ms
+ oct. 01, 2014 6:30:30 PM org.apache.openejb.client.EventLogger log
+ INFOS:
RemoteInitialContextCreated{providerUri=http://localhost:52256/tomee/ejb}
+ INFOS - Extracting jar:
/home/rmannibucau/dev/Apache/tomee-trunk/examples/arquillian-jpa/target/arquillian-test-working-dir/0/UserPersistenceTest.war
+ INFOS - Extracted path:
/home/rmannibucau/dev/Apache/tomee-trunk/examples/arquillian-jpa/target/arquillian-test-working-dir/0/UserPersistenceTest
+ INFOS - using default host: localhost
+ INFOS - ------------------------- localhost -> /UserPersistenceTest
+ INFOS - Using
'openejb.session.manager=org.apache.tomee.catalina.session.QuickSessionManager'
+ INFOS - Configuring enterprise application:
/home/rmannibucau/dev/Apache/tomee-trunk/examples/arquillian-jpa/target/arquillian-test-working-dir/0/UserPersistenceTest
+ INFOS - Configuring Service(id=Default Managed Container, type=Container,
provider-id=Default Managed Container)
+ INFOS - Auto-creating a container for bean
UserPersistenceTest_org.superbiz.arquillian.test.persistence.PersistenceTest:
Container(type=MANAGED, id=Default Managed Container)
+ INFOS - Creating Container(id=Default Managed Container)
+ INFOS - Using directory
/home/rmannibucau/dev/Apache/tomee-trunk/examples/arquillian-jpa/target/apache-tomee-remote/apache-tomee-webprofile-7.0.0-SNAPSHOT/temp
for stateful session passivation
+ INFOS - Configuring PersistenceUnit(name=demoApplicationPU)
+ INFOS - Auto-creating a Resource with id 'demoDataSourceNonJta' of type
'DataSource for 'demoApplicationPU'.
+ INFOS - Configuring Service(id=demoDataSourceNonJta, type=Resource,
provider-id=demoDataSource)
+ INFOS - Creating Resource(id=demoDataSourceNonJta)
+ INFOS - Disabling testOnBorrow since no validation query is provided
+ INFOS - Adjusting PersistenceUnit demoApplicationPU
<non-jta-data-source> to Resource ID 'demoDataSourceNonJta' from 'null'
+ INFOS - Enterprise application
"/home/rmannibucau/dev/Apache/tomee-trunk/examples/arquillian-jpa/target/arquillian-test-working-dir/0/UserPersistenceTest"
loaded.
+ INFOS - Assembling app:
/home/rmannibucau/dev/Apache/tomee-trunk/examples/arquillian-jpa/target/arquillian-test-working-dir/0/UserPersistenceTest
+ INFOS - OpenJPA dynamically loaded a validation provider.
+ INFOS - Starting OpenJPA 2.4.0-nonfinal-1598334
+ INFOS - Using dictionary class
"org.apache.openjpa.jdbc.sql.HSQLDictionary" (HSQL Database Engine 2.3.2 ,HSQL
Database Engine Driver 2.3.2).
+ INFOS - Connected to HSQL Database Engine version 2.2 using JDBC driver
HSQL Database Engine Driver version 2.3.2.
+ INFOS - SELECT SEQUENCE_SCHEMA, SEQUENCE_NAME FROM
INFORMATION_SCHEMA.SYSTEM_SEQUENCES --> 0ms
+ INFOS - CREATE TABLE User (id BIGINT NOT NULL, name VARCHAR(255), PRIMARY
KEY (id)) --> 0ms
+ INFOS - PersistenceUnit(name=demoApplicationPU,
provider=org.apache.openjpa.persistence.PersistenceProviderImpl) - provider
time 1075ms
+ INFOS - Existing thread singleton service in SystemInstance():
org.apache.openejb.cdi.ThreadSingletonServiceImpl@13158bbd
+ INFOS - OpenWebBeans Container is starting...
+ INFOS - Adding OpenWebBeansPlugin : [CdiPlugin]
+ INFOS - All injection points were validated successfully.
+ INFOS - OpenWebBeans Container has started, it took 224 ms.
+ INFOS - Deployed
Application(path=/home/rmannibucau/dev/Apache/tomee-trunk/examples/arquillian-jpa/target/arquillian-test-working-dir/0/UserPersistenceTest)
+ INFOS - At least one JAR was scanned for TLDs yet contained no TLDs.
Enable debug logging for this logger for a complete list of JARs that were
scanned but no TLDs were found in them. Skipping unneeded JARs during scanning
can improve startup time and JSP compilation time.
+ AVERTISSEMENT - Potential problem found: The configured data type factory
'class org.dbunit.dataset.datatype.DefaultDataTypeFactory' might cause problems
with the current database 'HSQL Database Engine' (e.g. some datatypes may not
be supported properly). In rare cases you might see this message because the
list of supported database products is incomplete (list=[derby]). If so please
request a java-class update via the forums.If you are using your own
IDataTypeFactory extending DefaultDataTypeFactory, ensure that you override
getValidDbProducts() to specify the supported database products.
+ INFOS - insert into USER (ID, NAME) values (1, TomEE) --> 1ms
+ INFOS - insert into USER (ID, NAME) values (1, 2)TomEE,Old) --> 0ms
+ INFOS - SELECT COUNT(t0.id) FROM User t0 --> 0ms
+ INFOS - SELECT t0.name FROM User t0 WHERE t0.id = 2 --> 0ms
+ INFOS - UPDATE User SET name = OpenEJB WHERE id = 2 --> 1ms
+ INFOS - select ID, NAME from USER order by ID --> 0ms
+ INFOS - select ID, NAME from USER order by ID --> 0ms
+ INFOS - select ID, NAME from USER order by ID --> 0ms
+ INFOS - select ID, NAME from USER order by ID --> 0ms
+ INFOS - delete from USER --> 0ms
+ oct. 01, 2014 6:30:34 PM org.apache.openejb.client.EventLogger log
+ INFOS:
RemoteInitialContextCreated{providerUri=http://localhost:52256/tomee/ejb}
+ INFOS - Undeploying app:
/home/rmannibucau/dev/Apache/tomee-trunk/examples/arquillian-jpa/target/arquillian-test-working-dir/0/UserPersistenceTest
+ oct. 01, 2014 6:30:34 PM
org.apache.openejb.arquillian.common.TomEEContainer undeploy
+ INFOS: cleaning
/home/rmannibucau/dev/Apache/tomee-trunk/examples/arquillian-jpa/target/arquillian-test-working-dir/0
+ Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 11.242 sec
+ INFOS - A valid shutdown command was received via the shutdown port.
Stopping the Server instance.
+ INFOS - Pausing ProtocolHandler ["http-nio-52256"]
+ INFOS - Pausing ProtocolHandler ["ajp-nio-40071"]
+ INFOS - Arrêt du service Catalina
+ INFOS - Stopping ProtocolHandler ["http-nio-52256"]
+ INFOS - Stopping ProtocolHandler ["ajp-nio-40071"]
+ INFOS - Stopping server services
+ INFOS - Undeploying app: openejb
+ INFOS - Closing DataSource: demoDataSource
+ INFOS - Closing DataSource: demoDataSourceNonJta
+ INFOS - Destroying ProtocolHandler ["http-nio-52256"]
+ INFOS - Destroying ProtocolHandler ["ajp-nio-40071"]
+
+ Results :
+
+ Tests run: 1, Failures: 0, Errors: 0, Skipped: 0</code></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>
+