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

[tomee] branch master updated: TOMEE-2562-Translate to portuguese-example-async-postconstruct.

This is an automated email from the ASF dual-hosted git repository.

jlmonteiro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomee.git


The following commit(s) were added to refs/heads/master by this push:
     new 612aaf5  TOMEE-2562-Translate to portuguese-example-async-postconstruct.
     new 66196ab  Merge pull request #504 from Daniel-Dos/TOMEE-2562
612aaf5 is described below

commit 612aaf560b155e7814e5462f0488c50dfa482dc2
Author: Daniel Dias <da...@gmail.com>
AuthorDate: Sat Jul 6 13:26:06 2019 -0300

    TOMEE-2562-Translate to portuguese-example-async-postconstruct.
---
 examples/async-postconstruct/README.adoc           |  4 +--
 .../{README.adoc => README_pt.adoc}                | 34 ++++++++++------------
 2 files changed, 18 insertions(+), 20 deletions(-)

diff --git a/examples/async-postconstruct/README.adoc b/examples/async-postconstruct/README.adoc
index 81ec181..58fdf08 100644
--- a/examples/async-postconstruct/README.adoc
+++ b/examples/async-postconstruct/README.adoc
@@ -9,7 +9,7 @@ just as well with little effort.
 
 The heart of this pattern is to:
 
-* pass the construction ``logic'' to an `@Asynchronous` method via a
+* pass the construction ``logic`` to an `@Asynchronous` method via a
 `java.util.concurrent.Callable`
 * ensure the bean does not process invocations till construction is
 complete via an `@AroundInvoke` method on the bean and the
@@ -75,7 +75,7 @@ public class SlowStarter {
 ....
 
 The `Executor` is a simple pattern, useful for many things, which
-exposes an interface functionaly equivalent to
+exposes an interface functionally equivalent to
 `java.util.concurrent.ExecutorService`, but with the underlying thread
 pool controlled by the container.
 
diff --git a/examples/async-postconstruct/README.adoc b/examples/async-postconstruct/README_pt.adoc
similarity index 69%
copy from examples/async-postconstruct/README.adoc
copy to examples/async-postconstruct/README_pt.adoc
index 81ec181..cd7b35b 100644
--- a/examples/async-postconstruct/README.adoc
+++ b/examples/async-postconstruct/README_pt.adoc
@@ -3,20 +3,19 @@
 :jbake-status: status=published
 = @Asynchronous @PostConstruct
 
-Placing `@Asynchronous` on the `@PostConstruct` of an EJB is not a
-supported part of Java EE, but this example shows a pattern which works
-just as well with little effort.
+Colocar `@ Asynchronous` no `@ PostConstruct` de um EJB não é uma
+parte suportada do Java EE, mas neste exemplo mostraremos um padrão que funciona
+tão bem com pouco esforço.
 
-The heart of this pattern is to:
+O coração deste padrão é para:
 
-* pass the construction ``logic'' to an `@Asynchronous` method via a
+* passar a construção `` logic`` para um método `@ Asynchronous` através de um
 `java.util.concurrent.Callable`
-* ensure the bean does not process invocations till construction is
-complete via an `@AroundInvoke` method on the bean and the
+* garantir que o bean não processe invocações até que a construção seja
+completada através de um método `@ AroundInvoke` no bean e no
 `java.util.concurrent.Future`
 
-Simple and effective. The result is a faster starting application that
-is still thread-safe.
+Simples e efetiva. O resultado é um inicialização rápida da aplicação que ainda é thread-safe.
 
 ....
 package org.superbiz.asyncpost;
@@ -74,10 +73,9 @@ public class SlowStarter {
 }
 ....
 
-The `Executor` is a simple pattern, useful for many things, which
-exposes an interface functionaly equivalent to
-`java.util.concurrent.ExecutorService`, but with the underlying thread
-pool controlled by the container.
+O `Executor` é um simples padrão, útil para muitas coisas, que expõe uma 
+interface funcionalmente equivalente a `java.util.concurrent.ExecutorService`, 
+mas com o conjunto de encadeamentos subjacente controlado pelo contêiner.
 
 ....
 package org.superbiz.asyncpost;
@@ -102,8 +100,8 @@ public class Executor {
 }
 ....
 
-Finally a test case shows the usefulness of `@AroundInvoke` call in our
-bean that calls `construct.get()`
+Finalmente um caso de teste mostrando a  utilidade do `@AroundInvoke` chamado no nosso
+bean que chama o `construct.get()`
 
 ....
 package org.superbiz.asyncpost;
@@ -122,11 +120,11 @@ public class SlowStarterTest {
     @Test
     public void test() throws Exception {
 
-        // Start the Container
+        // Inicia o Container
         EJBContainer.createEJBContainer().getContext().bind("inject", this);
 
-        // Immediately access the fields initialized in the PostConstruct
-        // This will fail without the @AroundInvoke call to construct.get()
+        // Imaediatamente acessa os campos inicializado no PostConstruct
+        // Isso falhará sem a chamada @AroundInvoke para construct.get ()
         Assert.assertEquals("orange", slowStarter.getColor());
         Assert.assertEquals("circle", slowStarter.getShape());
     }