You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by dd...@apache.org on 2020/08/18 06:10:42 UTC

[tomee] branch master updated: Add Spanish Trans. injection-of-ejbs & adjusments

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

dds 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 1493359  Add Spanish Trans. injection-of-ejbs & adjusments
     new d5daf2c  Merge pull request #707 from emecas/TOMEE-2899-ejbs
1493359 is described below

commit 14933592edbc03a797fff93d5024df2fc2d29a01
Author: Emerson Castaneda <em...@users.noreply.github.com>
AuthorDate: Sat Aug 15 20:32:45 2020 -0400

    Add Spanish Trans. injection-of-ejbs & adjusments
    
       - Updated EJB annotation syntax on files
       - Removed non-required comments on code
       - Removed `recently` from Java EE 5 context
    
    Signed-off-by: Emerson Castaneda <em...@users.noreply.github.com>
---
 examples/injection-of-ejbs/README.adoc             | 16 ++--
 .../{README.adoc => README_es.adoc}                | 89 +++++++++++-----------
 examples/injection-of-ejbs/README_pt.adoc          |  2 +-
 3 files changed, 53 insertions(+), 54 deletions(-)

diff --git a/examples/injection-of-ejbs/README.adoc b/examples/injection-of-ejbs/README.adoc
index ff4d61c..9c10add 100644
--- a/examples/injection-of-ejbs/README.adoc
+++ b/examples/injection-of-ejbs/README.adoc
@@ -3,12 +3,12 @@
 :jbake-status: status=published
 = Injection Of Ejbs
 
-This example shows how to use the @EJB annotation on a bean class to
+This example shows how to use the `@EJB` annotation on a bean class to
 refer to other beans.
 
 This functionality is often referred as dependency injection (see
 http://www.martinfowler.com/articles/injection.html), and has been
-recently introduced in Java EE 5.
+introduced in Java EE 5.
 
 In this particular example, we will create two session stateless beans
 
@@ -17,7 +17,7 @@ In this particular example, we will create two session stateless beans
 
 The DataReader bean uses the DataStore to retrieve some informations,
 and we will see how we can, inside the DataReader bean, get a reference
-to the DataStore bean using the @EJB annotation, thus avoiding the use
+to the DataStore bean using the `@EJB` annotation, thus avoiding the use
 of the JNDI API.
 
 == DataReader
@@ -44,7 +44,7 @@ import javax.ejb.Stateless;
  * this means that the application server, at runtime, will inject in this instance
  * variable a reference to the EJB DataStoreLocal
  */
-//START SNIPPET: code
+
 @Stateless
 public class DataReader {
 
@@ -85,7 +85,7 @@ import javax.ejb.Stateless;
  * This EJB has 2 business interfaces: DataStoreRemote, a remote business
  * interface, and DataStoreLocal, a local business interface
  */
-//START SNIPPET: code
+
 @Stateless
 @LocalBean
 public class DataStore implements DataStoreLocal, DataStoreRemote {
@@ -110,7 +110,7 @@ import javax.ejb.Local;
  * annotation, but it's optional. A business interface which is
  * not annotated with @Local or @Remote is assumed to be Local
  */
-//START SNIPPET: code
+
 @Local
 public interface DataStoreLocal {
 
@@ -131,7 +131,7 @@ import javax.ejb.Remote;
  * A remote business interface must be annotated with the @Remote
  * annotation
  */
-//START SNIPPET: code
+
 @Remote
 public interface DataStoreRemote {
 
@@ -153,7 +153,7 @@ import javax.naming.Context;
 /**
  * A test case for DataReaderImpl ejb, testing both the remote and local interface
  */
-//START SNIPPET: code
+
 public class EjbDependencyTest extends TestCase {
 
     public void test() throws Exception {
diff --git a/examples/injection-of-ejbs/README.adoc b/examples/injection-of-ejbs/README_es.adoc
similarity index 70%
copy from examples/injection-of-ejbs/README.adoc
copy to examples/injection-of-ejbs/README_es.adoc
index ff4d61c..f4abb14 100644
--- a/examples/injection-of-ejbs/README.adoc
+++ b/examples/injection-of-ejbs/README_es.adoc
@@ -1,24 +1,24 @@
 :index-group: Referencing EJBs
 :jbake-type: page
 :jbake-status: status=published
-= Injection Of Ejbs
+= Inyección de Ejbs
 
-This example shows how to use the @EJB annotation on a bean class to
-refer to other beans.
+Este ejemplo muestra cómo usar la anotación `@EJB` en una clase de bean para
+referenciar otros beans.
 
-This functionality is often referred as dependency injection (see
-http://www.martinfowler.com/articles/injection.html), and has been
-recently introduced in Java EE 5.
+Esta funcionalidad a menudo se denomina inyección de dependencia (consulte
+http://www.martinfowler.com/articles/injection.html), y ha sido
+introducido en Java EE 5.
 
-In this particular example, we will create two session stateless beans
+En este ejemplo particular, crearemos dos beans de sesión sin estado (stateless) 
 
-* a DataStore session bean
-* a DataReader session bean
+* un bean de sesión de DataStore
+* un bean de sesión DataReader
 
-The DataReader bean uses the DataStore to retrieve some informations,
-and we will see how we can, inside the DataReader bean, get a reference
-to the DataStore bean using the @EJB annotation, thus avoiding the use
-of the JNDI API.
+El bean DataReader usa el bean DataStore para recuperar información,
+dentro del bean DataReader se obtiene una referencia
+al bean DataStore usando la anotación `@EJB`, evitando así el uso
+de la API JNDI.
 
 == DataReader
 
@@ -30,21 +30,20 @@ import javax.ejb.EJB;
 import javax.ejb.Stateless;
 
 /**
- * This is an EJB 3.1 style pojo stateless session bean
- * Every stateless session bean implementation must be annotated
- * using the annotation @Stateless
- * This EJB has 2 business interfaces: DataReaderRemote, a remote business
- * interface, and DataReaderLocal, a local business interface
- * <p/>
- * The instance variables 'dataStoreRemote' is annotated with the @EJB annotation:
- * this means that the application server, at runtime, will inject in this instance
- * variable a reference to the EJB DataStoreRemote
- * <p/>
- * The instance variables 'dataStoreLocal' is annotated with the @EJB annotation:
- * this means that the application server, at runtime, will inject in this instance
- * variable a reference to the EJB DataStoreLocal
+ * Este es un bean pojo sesión sin estado estilo EJB 3.1
+ * Cada implementación de bean de sesión sin estado debe estar anotada
+ * usando la anotación @Stateless
+ * Este EJB tiene 2 interfaces de negocio: DataReaderRemote, una interfaz remota
+ *  negocio y DataReaderLocal, una interfaz de nogocio local
+ * <p />
+ * Las variables de instancia 'dataStoreRemote' están anotadas con la anotación @EJB:
+ * esto significa que el servidor de aplicaciones, en tiempo de ejecución, inyectará en esta instancia variable una referencia al EJB DataStoreRemote
+ * <p />
+ * Las variables de instancia 'dataStoreLocal' están anotadas con la anotación @EJB:
+ * esto significa que el servidor de aplicaciones, en tiempo de ejecución inyectará en esta instancia
+ * variable una referencia a EJB DataStoreLocal
  */
-//START SNIPPET: code
+
 @Stateless
 public class DataReader {
 
@@ -79,13 +78,13 @@ import javax.ejb.LocalBean;
 import javax.ejb.Stateless;
 
 /**
- * This is an EJB 3 style pojo stateless session bean
- * Every stateless session bean implementation must be annotated
- * using the annotation @Stateless
- * This EJB has 2 business interfaces: DataStoreRemote, a remote business
- * interface, and DataStoreLocal, a local business interface
+ * Este es un bean pojo de sesión sin estado estilo EJB 3
+ * Cada implementación de bean de sesión sin estado debe estar anotada
+ * usando la anotación @Stateless
+ * Este EJB tiene 2 interfaces de negocio: DataStoreRemote, una interfaz de negocio remota
+ * y DataStoreLocal, una interfaz de negocio local
  */
-//START SNIPPET: code
+
 @Stateless
 @LocalBean
 public class DataStore implements DataStoreLocal, DataStoreRemote {
@@ -105,12 +104,12 @@ package org.superbiz.injection;
 import javax.ejb.Local;
 
 /**
- * This is an EJB 3 local business interface
- * A local business interface may be annotated with the @Local
- * annotation, but it's optional. A business interface which is
- * not annotated with @Local or @Remote is assumed to be Local
+ * Esta es una interfaz de negociolocal EJB 3
+ * Una interfaz de negocio local se puede anotar con la anotación @Local,
+ * @Local es una anotación opcional. Una interfaz de negocio que
+ * no esta anotado con @Local o @Remote se supone se asume como Local
  */
-//START SNIPPET: code
+
 @Local
 public interface DataStoreLocal {
 
@@ -127,11 +126,10 @@ package org.superbiz.injection;
 import javax.ejb.Remote;
 
 /**
- * This is an EJB 3 remote business interface
- * A remote business interface must be annotated with the @Remote
- * annotation
+ * Esta es una interfaz de negocio remota EJB 3
+ * Se debe anotar una interfaz de negocio remota con la anotación @Remote
  */
-//START SNIPPET: code
+
 @Remote
 public interface DataStoreRemote {
 
@@ -151,9 +149,10 @@ import javax.ejb.embeddable.EJBContainer;
 import javax.naming.Context;
 
 /**
- * A test case for DataReaderImpl ejb, testing both the remote and local interface
+ * Un caso de prueba para DataReaderImpl ejb, probando tanto la interfaz remota 
+ * como la local
  */
-//START SNIPPET: code
+
 public class EjbDependencyTest extends TestCase {
 
     public void test() throws Exception {
@@ -170,7 +169,7 @@ public class EjbDependencyTest extends TestCase {
 }
 ----
 
-== Running
+== Ejecución
 
 [source,console]
 ----
diff --git a/examples/injection-of-ejbs/README_pt.adoc b/examples/injection-of-ejbs/README_pt.adoc
index 2ae02d7..a9ef4ff 100644
--- a/examples/injection-of-ejbs/README_pt.adoc
+++ b/examples/injection-of-ejbs/README_pt.adoc
@@ -7,7 +7,7 @@ Este exemplo mostra como usar a anotação `@EJB` em uma classe bean para refere
 
 Essa funcionalidade é geralmente chamada de injeção de dependência (consulte
 http://www.martinfowler.com/articles/injection.html) e foi
-recentemente introduzido no Java EE 5.
+ introduzido no Java EE 5.
 
 Neste exemplo em particular, nós vamos criar dois bean de sessão sem estado