[webbeans-commits] Webbeans SVN: r1754 - in tck/trunk/impl/src/main: java/org/jboss/jsr299/tck/tests/definition/deployment and 9 other directories.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-03-03 22:36:14 -0500 (Tue, 03 Mar 2009)
New Revision: 1754
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/BindingDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/deployment/DeploymentTypeDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/ScopeDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/StereotypeDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/interceptor/InterceptorDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/ProducerFieldDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/ProducerMethodDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/SimpleBeanLifecycleTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/realization/RealizationTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/InjectionTest.java
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
split out chapter 4 assertions, mapped tests - now i feel bad that i made our coverage drop by a couple of percent :(
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/BindingDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/BindingDefinitionTest.java 2009-03-03 20:29:13 UTC (rev 1753)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/BindingDefinitionTest.java 2009-03-04 03:36:14 UTC (rev 1754)
@@ -190,7 +190,7 @@
}
@Test
- @SpecAssertion(section = "4.1", id = "e")
+ @SpecAssertion(section = "4.1", id = "aa")
public void testBindingDeclaredInheritedIsInherited() throws Exception
{
Set<? extends Annotation> bindings = getCurrentManager().resolveByType(BorderCollie.class, new HairyBinding(false)).iterator().next().getBindings();
@@ -199,7 +199,7 @@
}
@Test
- @SpecAssertion(section = "4.1", id = "e")
+ @SpecAssertion(section = "4.1", id = "aa")
public void testBindingNotDeclaredInheritedIsNotInherited()
{
Set<? extends Annotation> bindings = getCurrentManager().resolveByType(ShetlandPony.class).iterator().next().getBindings();
@@ -208,7 +208,7 @@
}
@Test
- @SpecAssertion(section = "4.1", id = "e")
+ @SpecAssertion(section = "4.1", id = "aa")
public void testBindingDeclaredInheritedIsBlockedByIntermediateClass()
{
Set<? extends Annotation> bindings = getCurrentManager().resolveByType(ClippedBorderCollie.class, new HairyBinding(true)).iterator().next().getBindings();
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/deployment/DeploymentTypeDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/deployment/DeploymentTypeDefinitionTest.java 2009-03-03 20:29:13 UTC (rev 1753)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/deployment/DeploymentTypeDefinitionTest.java 2009-03-04 03:36:14 UTC (rev 1754)
@@ -100,7 +100,7 @@
@Test(groups = { "deploymentType" })
@SpecAssertions( { @SpecAssertion(section = "2.5.5", id = "c"),
@SpecAssertion(section = "2.7.2", id = "da"),
- @SpecAssertion(section = "4.1", id = "d") })
+ @SpecAssertion(section = "4.1", id = "da") })
public void testWebBeanDeploymentTypeOverridesStereotype()
{
assert getCurrentManager().resolveByType(Reindeer.class).size() == 1;
@@ -109,7 +109,7 @@
}
@Test(groups = { "deploymentType" })
- @SpecAssertion(section = "4.1", id = "c")
+ @SpecAssertion(section = "4.1", id = "ca")
public void testDeploymentTypeDeclaredInheritedIsInherited() throws Exception
{
assert getCurrentManager().resolveByType(BorderCollie.class).size() == 1;
@@ -117,7 +117,7 @@
}
@Test(groups = { "deploymentType" })
- @SpecAssertion(section = "4.1", id = "c")
+ @SpecAssertion(section = "4.1", id = "ca")
public void testDeploymentTypeNotDeclaredInheritedIsNotInherited()
{
assert getCurrentManager().resolveByType(ShetlandPony.class).size() == 1;
@@ -125,7 +125,7 @@
}
@Test(groups = { "deploymentType" })
- @SpecAssertion(section = "4.1", id = "c")
+ @SpecAssertion(section = "4.1", id = "ca")
public void testDeploymentTypeDeclaredInheritedIsBlockedByIntermediateDeploymentTypeNotMarkedInherited()
{
assert getCurrentManager().resolveByType(GoldenRetriever.class).size() == 1;
@@ -133,7 +133,7 @@
}
@Test(groups = { "deploymentType" })
- @SpecAssertion(section = "4.1", id = "c")
+ @SpecAssertion(section = "4.1", id = "ca")
public void testDeploymentTypeDeclaredInheritedIsBlockedByIntermediateDeploymentTypeMarkedInherited()
{
assert getCurrentManager().resolveByType(GoldenLabrador.class).size() == 1;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/ScopeDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/ScopeDefinitionTest.java 2009-03-03 20:29:13 UTC (rev 1753)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/ScopeDefinitionTest.java 2009-03-04 03:36:14 UTC (rev 1754)
@@ -96,7 +96,7 @@
@Test
@SpecAssertions({
@SpecAssertion(section = "2.7.2", id = "db"),
- @SpecAssertion(section = "4.1", id = "h")
+ @SpecAssertion(section = "4.1", id = "ab")
})
public void testWebBeanScopeTypeOverridesStereotype()
{
@@ -105,27 +105,27 @@
assert bean.getScopeType().equals(RequestScoped.class);
}
- @Test @SpecAssertion(section="4.1", id = "b")
+ @Test @SpecAssertion(section="4.1", id = "ba")
public void testScopeTypeDeclaredInheritedIsInherited() throws Exception
{
assert getCurrentManager().resolveByType(BorderCollie.class).size() == 1;
assert getCurrentManager().resolveByType(BorderCollie.class).iterator().next().getScopeType().equals(RequestScoped.class);
}
- @Test @SpecAssertion(section="4.1", id = "b")
+ @Test @SpecAssertion(section="4.1", id = "ba")
public void testScopeTypeNotDeclaredInheritedIsNotInherited()
{
assert getCurrentManager().resolveByType(ShetlandPony.class).size() == 1;
assert getCurrentManager().resolveByType(ShetlandPony.class).iterator().next().getScopeType().equals(Dependent.class);
}
- @Test @SpecAssertion(section="4.1", id = "b")
+ @Test @SpecAssertion(section="4.1", id = "ba")
public void testScopeTypeDeclaredInheritedIsBlockedByIntermediateScopeTypeMarkedInherited()
{
assert getCurrentManager().resolveByType(GoldenRetriever.class).size() == 1;
}
- @Test @SpecAssertion(section="4.1", id = "b")
+ @Test @SpecAssertion(section="4.1", id = "ba")
public void testScopeTypeDeclaredInheritedIsBlockedByIntermediateScopeTypeNotMarkedInherited()
{
assert getCurrentManager().resolveByType(GoldenLabrador.class).size() == 1;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/StereotypeDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/StereotypeDefinitionTest.java 2009-03-03 20:29:13 UTC (rev 1753)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/StereotypeDefinitionTest.java 2009-03-04 03:36:14 UTC (rev 1754)
@@ -149,7 +149,7 @@
}
@Test
- @SpecAssertion(section = "4.1", id = "a")
+ @SpecAssertion(section = "4.1", id = "ab")
public void testStereotypeDeclaredInheritedIsInherited() throws Exception
{
assert getCurrentManager().resolveByType(BorderCollie.class).size() == 1;
@@ -157,7 +157,7 @@
}
@Test
- @SpecAssertion(section = "4.1", id = "a")
+ @SpecAssertion(section = "4.1", id = "ab")
public void testStereotypeNotDeclaredInheritedIsNotInherited()
{
assert getCurrentManager().resolveByType(ShetlandPony.class).size() == 1;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/interceptor/InterceptorDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/interceptor/InterceptorDefinitionTest.java 2009-03-03 20:29:13 UTC (rev 1753)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/interceptor/InterceptorDefinitionTest.java 2009-03-04 03:36:14 UTC (rev 1754)
@@ -11,13 +11,13 @@
public class InterceptorDefinitionTest
{
- @Test(groups="stub") @SpecAssertion(section="4.2", id = "c")
+ @Test(groups="stub") @SpecAssertion(section="4.2", id = "ca")
public void testNonStaticWithInterceptorBindingInherited()
{
assert false;
}
- @Test(groups="stub") @SpecAssertion(section="4.2", id = "c")
+ @Test(groups="stub") @SpecAssertion(section="4.2", id = "ca")
public void testNonStaticWithInterceptorBindingBlockedByIntermediateClass()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/ProducerFieldDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/ProducerFieldDefinitionTest.java 2009-03-03 20:29:13 UTC (rev 1753)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/ProducerFieldDefinitionTest.java 2009-03-04 03:36:14 UTC (rev 1754)
@@ -214,7 +214,7 @@
}
@Test(groups = "producerField")
- @SpecAssertion(section = "4.2", id = "k")
+ @SpecAssertion(section = "4.2", id = "ea")
public void testNonStaticProducerFieldNotInherited()
{
assert !(getCurrentManager().getInstanceByType(Egg.class, FOO_LITERAL).getMother() instanceof InfertileChicken);
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/ProducerMethodDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/ProducerMethodDefinitionTest.java 2009-03-03 20:29:13 UTC (rev 1753)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/ProducerMethodDefinitionTest.java 2009-03-04 03:36:14 UTC (rev 1754)
@@ -192,7 +192,7 @@
}
@Test(groups="ri-broken")
- @SpecAssertion(section = "4.2", id = "d")
+ @SpecAssertion(section = "4.2", id = "da")
public void testNonStaticProducerMethodNotInherited()
{
assert getCurrentManager().resolveByType(Egg.class, new AnnotationLiteral<Yummy>() {}).size() == 1;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/SimpleBeanLifecycleTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/SimpleBeanLifecycleTest.java 2009-03-03 20:29:13 UTC (rev 1753)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/SimpleBeanLifecycleTest.java 2009-03-04 03:36:14 UTC (rev 1754)
@@ -150,7 +150,7 @@
}
@Test
- @SpecAssertion(section = "4.2", id = "ba")
+ @SpecAssertion(section = "4.2", id = "baa")
public void testSubClassInheritsPostConstructOnSuperclass() throws Exception
{
OrderProcessor.postConstructCalled = false;
@@ -167,7 +167,7 @@
}
@Test
- @SpecAssertion(section = "4.2", id = "bb")
+ @SpecAssertion(section = "4.2", id = "bba")
public void testSubClassInheritsPreDestroyOnSuperclass() throws Exception
{
OrderProcessor.preDestroyCalled = false;
@@ -186,7 +186,7 @@
}
@Test
- @SpecAssertion(section = "4.2", id = "ba")
+ @SpecAssertion(section = "4.2", id = "baa")
public void testSubClassDoesNotInheritPostConstructOnSuperclassBlockedByIntermediateClass() throws Exception
{
assert getCurrentManager().resolveByType(NovelOrderProcessor.class).size() == 1;
@@ -203,7 +203,7 @@
}
@Test
- @SpecAssertion(section = "4.2", id = "bb")
+ @SpecAssertion(section = "4.2", id = "bba")
public void testSubClassDoesNotInheritPreDestroyConstructOnSuperclassBlockedByIntermediateClass() throws Exception
{
OrderProcessor.preDestroyCalled = false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/realization/RealizationTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/realization/RealizationTest.java 2009-03-03 20:29:13 UTC (rev 1753)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/realization/RealizationTest.java 2009-03-04 03:36:14 UTC (rev 1754)
@@ -31,7 +31,7 @@
};
@Test
- @SpecAssertion(section = "4.4.1", id = "c")
+ @SpecAssertion(section = "4.4.1", id = "ca")
public void testRealizedBeanWithProducerMethodHasSameScope()
{
assert getCurrentManager().resolveByType(CowDung.class, SMELLY_LITERAL).size() == 1;
@@ -39,7 +39,7 @@
}
@Test
- @SpecAssertion(section = "4.4.1", id = "c")
+ @SpecAssertion(section = "4.4.1", id = "ca")
public void testRealizedBeanWithProducerMethodHasDeploymentTypeOfRealizingClass()
{
assert getCurrentManager().resolveByType(CowDung.class, SMELLY_LITERAL).size() == 1;
@@ -47,7 +47,7 @@
}
@Test
- @SpecAssertion(section = "4.4.1", id = "c")
+ @SpecAssertion(section = "4.4.1", id = "ca")
public void testRealizedBeanWithProducerMethodHasSameBindings()
{
assert getCurrentManager().resolveByType(CowDung.class, SMELLY_LITERAL).size() == 1;
@@ -57,7 +57,7 @@
@SuppressWarnings("unchecked")
@Test
- @SpecAssertion(section = "4.4.1", id = "c")
+ @SpecAssertion(section = "4.4.1", id = "ca")
public void testRealizedBeanWithProducerMethodHasBindingsOfMethodAndRealizingType()
{
assert getCurrentManager().resolveByType(CowDung.class, SMELLY_LITERAL, TAME_LITERAL).size() == 1;
@@ -66,7 +66,7 @@
}
@Test
- @SpecAssertion(section = "4.4.1", id = "c")
+ @SpecAssertion(section = "4.4.1", id = "ca")
public void testRealizedBeanWithProducerMethodHasSameStereotypes()
{
assert getCurrentManager().resolveByType(Dog.class).size() == 1;
@@ -74,14 +74,14 @@
}
@Test(groups = "stub")
- @SpecAssertion(section = "4.4.1", id = "c")
+ @SpecAssertion(section = "4.4.1", id = "ca")
public void testRealizedBeanWithProducerMethodHasSameInterceptorBindings()
{
assert false;
}
@Test
- @SpecAssertion(section = "4.4.1", id = "c")
+ @SpecAssertion(section = "4.4.1", id = "cb")
public void testRealizedBeanWithProducerFieldHasSameScope()
{
assert getCurrentManager().resolveByType(HorseDung.class, SMELLY_LITERAL).size() == 1;
@@ -89,7 +89,7 @@
}
@Test
- @SpecAssertion(section = "4.4.1", id = "c")
+ @SpecAssertion(section = "4.4.1", id = "cb")
public void testRealizedBeanWithProducerFieldHasDeploymentTypeOfRealizingClass()
{
assert getCurrentManager().resolveByType(HorseDung.class, SMELLY_LITERAL).size() == 1;
@@ -97,7 +97,7 @@
}
@Test
- @SpecAssertion(section = "4.4.1", id = "c")
+ @SpecAssertion(section = "4.4.1", id = "cb")
public void testRealizedBeanWithProducerFieldHasSameBindings()
{
assert getCurrentManager().resolveByType(HorseDung.class, SMELLY_LITERAL).size() == 1;
@@ -107,7 +107,7 @@
@SuppressWarnings("unchecked")
@Test
- @SpecAssertion(section = "4.4.1", id = "c")
+ @SpecAssertion(section = "4.4.1", id = "cb")
public void testRealizedBeanWithProducerFieldHasBindingsOfMethodAndRealizingType()
{
assert getCurrentManager().resolveByType(HorseDung.class, SMELLY_LITERAL, TAME_LITERAL).size() == 1;
@@ -116,7 +116,7 @@
}
@Test
- @SpecAssertion(section = "4.4.1", id = "c")
+ @SpecAssertion(section = "4.4.1", id = "cb")
public void testRealizedBeanWithProducerFieldHasSameStereotypes()
{
assert getCurrentManager().resolveByType(Donkey.class).size() == 1;
@@ -124,7 +124,7 @@
}
@Test(groups = "stub")
- @SpecAssertion(section = "4.4.1", id = "c")
+ @SpecAssertion(section = "4.4.1", id = "cb")
public void testRealizedBeanWithProducerFieldHasSameInterceptorBindings()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/InjectionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/InjectionTest.java 2009-03-03 20:29:13 UTC (rev 1753)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/InjectionTest.java 2009-03-04 03:36:14 UTC (rev 1754)
@@ -49,7 +49,7 @@
assert foxRun.fox.getName().equals("gavin");
}
- @Test @SpecAssertion(section="4.2", id = "a")
+ @Test @SpecAssertion(section="4.2", id = "aa")
public void testFieldDeclaredInSuperclassInjected() throws Exception
{
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-03-03 20:29:13 UTC (rev 1753)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-03-04 03:36:14 UTC (rev 1754)
@@ -2148,53 +2148,165 @@
</section>
<section id="4.1" title="Inheritance of type-level metadata">
-
- <assertion id="a">
- <text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, if X is annotated with a binding type, stereotype or interceptor binding type Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and neither Y nor any intermediate class that is a subclass of X and a superclass of Y declares an annotation of type Z.</text>
+
+ <assertion id="aa">
+ <text>For class X which is extended _directly_ by the bean class of a _simple_ bean Y, if X is annotated with a _binding type_ Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and neither Y nor any intermediate class that is a subclass of X and a superclass of Y declares an annotation of type Z.</text>
+ </assertion>
+
+ <assertion id="ab">
+ <text>For class X which is extended _directly_ by the bean class of a _simple_ bean Y, if X is annotated with a _stereotype_ Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and neither Y nor any intermediate class that is a subclass of X and a superclass of Y declares an annotation of type Z.</text>
+ </assertion>
+
+ <assertion id="ac">
+ <text>For class X which is extended _directly_ by the bean class of a _simple_ bean Y, if X is annotated with a _interceptor binding type_ Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and neither Y nor any intermediate class that is a subclass of X and a superclass of Y declares an annotation of type Z.</text>
+ </assertion>
+
+ <assertion id="ad">
+ <text>For class X which is extended _directly_ by the bean class of a _session_ bean Y, if X is annotated with a _binding type_ Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and neither Y nor any intermediate class that is a subclass of X and a superclass of Y declares an annotation of type Z.</text>
+ </assertion>
+
+ <assertion id="ae">
+ <text>For class X which is extended _directly_ by the bean class of a _session_ bean Y, if X is annotated with a _stereotype_ Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and neither Y nor any intermediate class that is a subclass of X and a superclass of Y declares an annotation of type Z.</text>
+ </assertion>
+
+ <assertion id="af">
+ <text>For class X which is extended _directly_ by the bean class of a _session_ bean Y, if X is annotated with a _interceptor binding type_ Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and neither Y nor any intermediate class that is a subclass of X and a superclass of Y declares an annotation of type Z.</text>
+ </assertion>
+
+ <assertion id="ag">
+ <text>For class X which is extended _indirectly_ by the bean class of a _simple_ bean Y, if X is annotated with a _binding type_ Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and neither Y nor any intermediate class that is a subclass of X and a superclass of Y declares an annotation of type Z.</text>
+ </assertion>
+
+ <assertion id="ah">
+ <text>For class X which is extended _indirectly_ by the bean class of a _simple_ bean Y, if X is annotated with a _stereotype_ Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and neither Y nor any intermediate class that is a subclass of X and a superclass of Y declares an annotation of type Z.</text>
+ </assertion>
+
+ <assertion id="ai">
+ <text>For class X which is extended _indirectly_ by the bean class of a _simple_ bean Y, if X is annotated with a _interceptor binding type_ Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and neither Y nor any intermediate class that is a subclass of X and a superclass of Y declares an annotation of type Z.</text>
+ </assertion>
+
+ <assertion id="aj">
+ <text>For class X which is extended _indirectly_ by the bean class of a _session_ bean Y, if X is annotated with a _binding type_ Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and neither Y nor any intermediate class that is a subclass of X and a superclass of Y declares an annotation of type Z.</text>
+ </assertion>
+
+ <assertion id="ak">
+ <text>For class X which is extended _indirectly_ by the bean class of a _session_ bean Y, if X is annotated with a _stereotype_ Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and neither Y nor any intermediate class that is a subclass of X and a superclass of Y declares an annotation of type Z.</text>
+ </assertion>
+
+ <assertion id="al">
+ <text>For class X which is extended _indirectly_ by the bean class of a _session_ bean Y, if X is annotated with a _interceptor binding type_ Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and neither Y nor any intermediate class that is a subclass of X and a superclass of Y declares an annotation of type Z.</text>
+ </assertion>
+
+ <assertion id="ba">
+ <text>For class X which is extended _directly_ by the bean class of a _simple_ bean Y, if X is annotated with a scope type Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and neither Y nor any intermediate class that is a subclass of X and a superclass of Y declares a scope type.</text>
</assertion>
- <assertion id="b">
- <text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, if X is annotated with a scope type Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and neither Y nor any intermediate class that is a subclass of X and a superclass of Y declares a scope type.</text>
+ <assertion id="bb">
+ <text>For class X which is extended _directly_ by the bean class of a _session_ bean Y, if X is annotated with a scope type Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and neither Y nor any intermediate class that is a subclass of X and a superclass of Y declares a scope type.</text>
</assertion>
- <assertion id="c">
- <text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, if X is annotated with a deployment type Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and neither Y nor any intermediate class that is a subclass of X and a superclass of Y declares a deployment type.</text>
+ <assertion id="bc">
+ <text>For class X which is extended _indirectly_ by the bean class of a _simple_ bean Y, if X is annotated with a scope type Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and neither Y nor any intermediate class that is a subclass of X and a superclass of Y declares a scope type.</text>
</assertion>
- <assertion id="d">
- <text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, the scope types and deployment types explicitly declared by and inherited from the class X take precedence over default scopes and deployment types declared by stereotypes.</text>
+ <assertion id="bd">
+ <text>For class X which is extended _indirectly_ by the bean class of a _session_ bean Y, if X is annotated with a scope type Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and neither Y nor any intermediate class that is a subclass of X and a superclass of Y declares a scope type.</text>
</assertion>
+
+ <assertion id="ca">
+ <text>For class X which is extended _directly_ by the bean class of a _simple_ bean Y, if X is annotated with a deployment type Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and neither Y nor any intermediate class that is a subclass of X and a superclass of Y declares a deployment type.</text>
+ </assertion>
- <assertion id="e">
- <text>For class X which is the bean class of a simple or session bean Y declared using XML, if X is annotated with a binding type, stereotype or interceptor binding type Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and Y does not explicitly declare an annotation of type Z using XML.</text>
+ <assertion id="cb">
+ <text>For class X which is extended _directly_ by the bean class of a _session_ bean Y, if X is annotated with a deployment type Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and neither Y nor any intermediate class that is a subclass of X and a superclass of Y declares a deployment type.</text>
</assertion>
- <assertion id="f">
- <text>For class X which is the bean class of a simple or session bean Y declared using XML, if X is annotated with a scope type Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and Y does not explicitly declare a scope type using XML.</text>
+ <assertion id="cc">
+ <text>For class X which is extended _indirectly_ by the bean class of a _simple_ bean Y, if X is annotated with a deployment type Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and neither Y nor any intermediate class that is a subclass of X and a superclass of Y declares a deployment type.</text>
</assertion>
- <assertion id="g">
- <text>For class X which is the bean class of a simple or session bean Y declared using XML, if X is annotated with a deployment type Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and Y does not explicitly declare a deployment type using XML.</text>
+ <assertion id="cd">
+ <text>For class X which is extended _indirectly_ by the bean class of a _session_ bean Y, if X is annotated with a deployment type Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and neither Y nor any intermediate class that is a subclass of X and a superclass of Y declares a deployment type.</text>
</assertion>
- <assertion id="h">
- <text>For class X which is the bean class of a simple or session bean Y declared using XML, the scope types and deployment types explicitly declared by and inherited from the class X take precedence over default scope and deployment types declared by stereotypes.</text>
+ <assertion id="da">
+ <text>For class X which is extended _directly_ by the bean class of a _simple_ bean Y, the scope types and deployment types explicitly declared by and inherited from the class X take precedence over default scopes and deployment types declared by stereotypes.</text>
</assertion>
+ <assertion id="db">
+ <text>For class X which is extended _directly_ by the bean class of a _session_ bean Y, the scope types and deployment types explicitly declared by and inherited from the class X take precedence over default scopes and deployment types declared by stereotypes.</text>
+ </assertion>
+
+ <assertion id="dc">
+ <text>For class X which is extended _indirectly_ by the bean class of a _simple_ bean Y, the scope types and deployment types explicitly declared by and inherited from the class X take precedence over default scopes and deployment types declared by stereotypes.</text>
+ </assertion>
+
+ <assertion id="dd">
+ <text>For class X which is extended _indirectly_ by the bean class of a _session_ bean Y, the scope types and deployment types explicitly declared by and inherited from the class X take precedence over default scopes and deployment types declared by stereotypes.</text>
+ </assertion>
+
+ <assertion id="ea">
+ <text>For class X which is the bean class of a _simple_ bean Y declared using XML, if X is annotated with a _binding type_ Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and Y does not explicitly declare an annotation of type Z using XML.</text>
+ </assertion>
+
+ <assertion id="eb">
+ <text>For class X which is the bean class of a _simple_ bean Y declared using XML, if X is annotated with a _stereotype_ Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and Y does not explicitly declare an annotation of type Z using XML.</text>
+ </assertion>
+
+ <assertion id="ec">
+ <text>For class X which is the bean class of a _simple_ bean Y declared using XML, if X is annotated with an _interceptor binding type_ Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and Y does not explicitly declare an annotation of type Z using XML.</text>
+ </assertion>
+
+ <assertion id="ed">
+ <text>For class X which is the bean class of a _session_ bean Y declared using XML, if X is annotated with a _binding type_ Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and Y does not explicitly declare an annotation of type Z using XML.</text>
+ </assertion>
+
+ <assertion id="ee">
+ <text>For class X which is the bean class of a _session_ bean Y declared using XML, if X is annotated with a _stereotype_ Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and Y does not explicitly declare an annotation of type Z using XML.</text>
+ </assertion>
+
+ <assertion id="ef">
+ <text>For class X which is the bean class of a _session_ bean Y declared using XML, if X is annotated with an _interceptor binding type_ Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and Y does not explicitly declare an annotation of type Z using XML.</text>
+ </assertion>
+
+ <assertion id="fa">
+ <text>For class X which is the bean class of a _simple_ bean Y declared using XML, if X is annotated with a scope type Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and Y does not explicitly declare a scope type using XML.</text>
+ </assertion>
+
+ <assertion id="fb">
+ <text>For class X which is the bean class of a _session_ bean Y declared using XML, if X is annotated with a scope type Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and Y does not explicitly declare a scope type using XML.</text>
+ </assertion>
+
+ <assertion id="ga">
+ <text>For class X which is the bean class of a _simple_ bean Y declared using XML, if X is annotated with a deployment type Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and Y does not explicitly declare a deployment type using XML.</text>
+ </assertion>
+
+ <assertion id="gb">
+ <text>For class X which is the bean class of a _session_ bean Y declared using XML, if X is annotated with a deployment type Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and Y does not explicitly declare a deployment type using XML.</text>
+ </assertion>
+
+ <assertion id="ha">
+ <text>For class X which is the bean class of a _simple_ bean Y declared using XML, the scope types and deployment types explicitly declared by and inherited from the class X take precedence over default scope and deployment types declared by stereotypes.</text>
+ </assertion>
+
+ <assertion id="hb">
+ <text>For class X which is the bean class of a _session_ bean Y declared using XML, the scope types and deployment types explicitly declared by and inherited from the class X take precedence over default scope and deployment types declared by stereotypes.</text>
+ </assertion>
+
<assertion id="i">
- <text>For annotations defined by the bean specification, all built-in scope types are declared @Inherited</text>
+ <text>For annotations defined by the bean specification, all built-in _scope types_ are declared @Inherited</text>
</assertion>
<assertion id="j">
- <text>For annotations defined by the bean specification, all built-in stereotypes are declared @Inherited</text>
+ <text>For annotations defined by the bean specification, all built-in _stereotypes_ are declared @Inherited</text>
</assertion>
<assertion id="k">
- <text>For annotations defined by the bean specification, no built-in binding type is declared @Inherited</text>
+ <text>For annotations defined by the bean specification, _no built-in binding type is declared @Inherited_</text>
</assertion>
<assertion id="l">
- <text>For annotations defined by the bean specification, the built-in deployment type is not declared @Inherited</text>
+ <text>For annotations defined by the bean specification, _the built-in deployment type is not declared @Inherited_</text>
</assertion>
<assertion id="m">
@@ -2204,57 +2316,262 @@
</section>
<section id="4.2" title="Inheritance of member-level metadata">
- <assertion id="a">
- <text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, if X declares an injected field x then Y inherits x.</text>
+
+ <assertion id="aa">
+ <text>For class X which is extended _directly_ by the bean class of a _simple_ bean Y, if X declares an injected field x then Y inherits x.</text>
</assertion>
- <assertion id="ba">
- <text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, if X declares a @PostConstruct method x() then Y inherits x() if and only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y overrides the method x()</text>
+ <assertion id="ab">
+ <text>For class X which is extended _directly_ by the bean class of a _session_ bean Y, if X declares an injected field x then Y inherits x.</text>
</assertion>
- <assertion id="bb">
- <text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, if X declares a @PreDestroy method x() then Y inherits x() if and only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y overrides the method x()</text>
+ <assertion id="ac">
+ <text>For class X which is extended _indirectly_ by the bean class of a _simple_ bean Y, if X declares an injected field x then Y inherits x.</text>
</assertion>
- <assertion id="c">
- <text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, if X declares a non-static method x() annotated with an interceptor binding type Z then Y inherits the binding if and only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y overrides the method x().</text>
+ <assertion id="ad">
+ <text>For class X which is extended _indirectly_ by the bean class of a _session_ bean Y, if X declares an injected field x then Y inherits x.</text>
</assertion>
+
+ <assertion id="baa">
+ <text>For class X which is extended _directly_ by the bean class of a _simple_ bean Y, if X declares a _@PostConstruct_ method x() then Y inherits x() if and only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y overrides the method x()</text>
+ </assertion>
- <assertion id="d">
- <text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, if X declares a non-static producer, disposal, or observer method x() then Y does not inherit this method unless Y is explicitly declared to specialize or realize X</text>
+ <assertion id="bab">
+ <text>For class X which is extended _directly_ by the bean class of a _session_ bean Y, if X declares a _@PostConstruct_ method x() then Y inherits x() if and only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y overrides the method x()</text>
</assertion>
- <assertion id="e">
- <text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, if X declares a non-static producer field x then Y does not inherit this field unless Y is explicitly declared to specialize or realize X.</text>
+ <assertion id="bac">
+ <text>For class X which is extended _indirectly_ by the bean class of a _simple_ bean Y, if X declares a _@PostConstruct_ method x() then Y inherits x() if and only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y overrides the method x()</text>
</assertion>
- <assertion id="f">
- <text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, if Y is a decorator and X declares a delegate attribute x then Y inherits x if and only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y defines a delegate attribute</text>
+ <assertion id="bad">
+ <text>For class X which is extended _indirectly_ by the bean class of a _session_ bean Y, if X declares a _@PostConstruct_ method x() then Y inherits x() if and only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y overrides the method x()</text>
</assertion>
+
+ <assertion id="bba">
+ <text>For class X which is extended _directly_ by the bean class of a _simple_ bean Y, if X declares a _@PreDestroy_ method x() then Y inherits x() if and only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y overrides the method x()</text>
+ </assertion>
- <assertion id="g">
- <text>For class X which is the bean class of a simple or session bean Y declared using XML, if X declares an injected field x then Y inherits x, unless Y explicitly declares x using XML.</text>
+ <assertion id="bbb">
+ <text>For class X which is extended _directly_ by the bean class of a _session_ bean Y, if X declares a _@PreDestroy_ method x() then Y inherits x() if and only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y overrides the method x()</text>
</assertion>
- <assertion id="h">
- <text>For class X which is the bean class of a simple or session bean Y declared using XML, if X declares an initializer method, @PostConstruct method or @PreDestroy method x() then Y inherits x(), unless Y explicitly declares x() using XML</text>
+ <assertion id="bbc">
+ <text>For class X which is extended _indirectly_ by the bean class of a _simple_ bean Y, if X declares a _@PreDestroy_ method x() then Y inherits x() if and only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y overrides the method x()</text>
</assertion>
- <assertion id="i">
- <text>For class X which is the bean class of a simple or session bean Y declared using XML, if X declares a non-static method x() annotated with an interceptor binding type Z then Y inherits the binding, unless Y explicitly declares x() using XML.</text>
+ <assertion id="bbd">
+ <text>For class X which is extended _indirectly_ by the bean class of a _session_ bean Y, if X declares a _@PreDestroy_ method x() then Y inherits x() if and only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y overrides the method x()</text>
</assertion>
+
+ <assertion id="ca">
+ <text>For class X which is extended _directly_ by the bean class of a _simple_ bean Y, if X declares a _non-static method_ x() annotated with an interceptor binding type Z then Y inherits the binding if and only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y overrides the method x().</text>
+ </assertion>
- <assertion id="j">
- <text>For class X which is the bean class of a simple or session bean Y declared using XML, if X declares a non-static producer, disposal, or observer method x() then Y does not inherit this method, unless Y is explicitly declared to specialize or realize X.</text>
+ <assertion id="cb">
+ <text>For class X which is extended _directly_ by the bean class of a _session_ bean Y, if X declares a _non-static method_ x() annotated with an interceptor binding type Z then Y inherits the binding if and only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y overrides the method x().</text>
</assertion>
- <assertion id="k">
- <text>For class X which is the bean class of a simple or session bean Y declared using XML, if X declares a non-static producer field x then Y does not inherit this field, unless Y is explicitly declared to specialize or realize X.</text>
+ <assertion id="cc">
+ <text>For class X which is extended _indirectly_ by the bean class of a _simple_ bean Y, if X declares a _non-static method_ x() annotated with an interceptor binding type Z then Y inherits the binding if and only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y overrides the method x().</text>
</assertion>
- <assertion id="l">
- <text>For class X which is the bean class of a simple or session bean Y declared using XML, if Y is a decorator and X declares a delegate attribute x then Y inherits x, unless Y explicitly declares a delegate attribute using XML.</text>
+ <assertion id="cd">
+ <text>For class X which is extended _indirectly_ by the bean class of a _session_ bean Y, if X declares a _non-static method_ x() annotated with an interceptor binding type Z then Y inherits the binding if and only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y overrides the method x().</text>
</assertion>
+
+ <assertion id="da">
+ <text>For class X which is extended _directly_ by the bean class of a _simple_ bean Y, if X declares a _non-static producer method_ x() then Y does not inherit this method unless Y is explicitly declared to specialize or realize X</text>
+ </assertion>
+
+ <assertion id="db">
+ <text>For class X which is extended _directly_ by the bean class of a _simple_ bean Y, if X declares a _non-static disposal method_ x() then Y does not inherit this method unless Y is explicitly declared to specialize or realize X</text>
+ </assertion>
+
+ <assertion id="dc">
+ <text>For class X which is extended _directly_ by the bean class of a _simple_ bean Y, if X declares a _non-static observer method_ x() then Y does not inherit this method unless Y is explicitly declared to specialize or realize X</text>
+ </assertion>
+
+ <assertion id="dd">
+ <text>For class X which is extended _directly_ by the bean class of a _session_ bean Y, if X declares a _non-static producer method_ x() then Y does not inherit this method unless Y is explicitly declared to specialize or realize X</text>
+ </assertion>
+
+ <assertion id="de">
+ <text>For class X which is extended _directly_ by the bean class of a _session_ bean Y, if X declares a _non-static disposal method_ x() then Y does not inherit this method unless Y is explicitly declared to specialize or realize X</text>
+ </assertion>
+
+ <assertion id="df">
+ <text>For class X which is extended _directly_ by the bean class of a _session_ bean Y, if X declares a _non-static observer method_ x() then Y does not inherit this method unless Y is explicitly declared to specialize or realize X</text>
+ </assertion>
+
+ <assertion id="dg">
+ <text>For class X which is extended _indirectly_ by the bean class of a _simple_ bean Y, if X declares a _non-static producer method_ x() then Y does not inherit this method unless Y is explicitly declared to specialize or realize X</text>
+ </assertion>
+
+ <assertion id="dh">
+ <text>For class X which is extended _indirectly_ by the bean class of a _simple_ bean Y, if X declares a _non-static disposal method_ x() then Y does not inherit this method unless Y is explicitly declared to specialize or realize X</text>
+ </assertion>
+
+ <assertion id="di">
+ <text>For class X which is extended _indirectly_ by the bean class of a _simple_ bean Y, if X declares a _non-static observer method_ x() then Y does not inherit this method unless Y is explicitly declared to specialize or realize X</text>
+ </assertion>
+
+ <assertion id="dj">
+ <text>For class X which is extended _indirectly_ by the bean class of a _session_ bean Y, if X declares a _non-static producer method_ x() then Y does not inherit this method unless Y is explicitly declared to specialize or realize X</text>
+ </assertion>
+
+ <assertion id="dk">
+ <text>For class X which is extended _indirectly_ by the bean class of a _session_ bean Y, if X declares a _non-static disposal method_ x() then Y does not inherit this method unless Y is explicitly declared to specialize or realize X</text>
+ </assertion>
+
+ <assertion id="dl">
+ <text>For class X which is extended _indirectly_ by the bean class of a _session_ bean Y, if X declares a _non-static observer method_ x() then Y does not inherit this method unless Y is explicitly declared to specialize or realize X</text>
+ </assertion>
+
+ <assertion id="ea">
+ <text>For class X which is extended _directly_ by the bean class of a _simple_ bean Y, if X declares a _non-static producer field_ x then Y does not inherit this field unless Y is explicitly declared to specialize or realize X.</text>
+ </assertion>
+
+ <assertion id="eb">
+ <text>For class X which is extended _directly_ by the bean class of a _session_ bean Y, if X declares a _non-static producer field_ x then Y does not inherit this field unless Y is explicitly declared to specialize or realize X.</text>
+ </assertion>
+
+ <assertion id="ec">
+ <text>For class X which is extended _indirectly_ by the bean class of a _simple_ bean Y, if X declares a _non-static producer field_ x then Y does not inherit this field unless Y is explicitly declared to specialize or realize X.</text>
+ </assertion>
+
+ <assertion id="ed">
+ <text>For class X which is extended _indirectly_ by the bean class of a _session_ bean Y, if X declares a _non-static producer field_ x then Y does not inherit this field unless Y is explicitly declared to specialize or realize X.</text>
+ </assertion>
+
+ <assertion id="fa">
+ <text>For class X which is extended _directly_ by the bean class of a _simple_ bean Y, if Y is a decorator and X declares a delegate attribute x then Y inherits x if and only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y defines a delegate attribute</text>
+ </assertion>
+
+ <assertion id="fb">
+ <text>For class X which is extended _directly_ by the bean class of a _session_ bean Y, if Y is a decorator and X declares a delegate attribute x then Y inherits x if and only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y defines a delegate attribute</text>
+ </assertion>
+
+ <assertion id="fc">
+ <text>For class X which is extended _indirectly_ by the bean class of a _simple_ bean Y, if Y is a decorator and X declares a delegate attribute x then Y inherits x if and only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y defines a delegate attribute</text>
+ </assertion>
+
+ <assertion id="fd">
+ <text>For class X which is extended _indirectly_ by the bean class of a _session_ bean Y, if Y is a decorator and X declares a delegate attribute x then Y inherits x if and only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y defines a delegate attribute</text>
+ </assertion>
+
+ <assertion id="ga">
+ <text>For class X which is the bean class of a _simple_ bean Y declared using XML, if X declares an injected field x then Y inherits x, unless Y explicitly declares x using XML.</text>
+ </assertion>
+
+ <assertion id="gb">
+ <text>For class X which is the bean class of a _session_ bean Y declared using XML, if X declares an injected field x then Y inherits x, unless Y explicitly declares x using XML.</text>
+ </assertion>
+
+ <assertion id="ha">
+ <text>For class X which is the bean class of a _simple_ bean Y declared using XML, if X declares an _initializer method_ x() then Y inherits x(), unless Y explicitly declares x() using XML</text>
+ </assertion>
+
+ <assertion id="hb">
+ <text>For class X which is the bean class of a _simple_ bean Y declared using XML, if X declares a _@PostConstruct method_ x() then Y inherits x(), unless Y explicitly declares x() using XML</text>
+ </assertion>
+
+ <assertion id="hc">
+ <text>For class X which is the bean class of a _simple_ bean Y declared using XML, if X declares a _@PreDestroy method_ x() then Y inherits x(), unless Y explicitly declares x() using XML</text>
+ </assertion>
+
+ <assertion id="hd">
+ <text>For class X which is the bean class of a _session_ bean Y declared using XML, if X declares an _initializer method_ x() then Y inherits x(), unless Y explicitly declares x() using XML</text>
+ </assertion>
+
+ <assertion id="he">
+ <text>For class X which is the bean class of a _session_ bean Y declared using XML, if X declares a _@PostConstruct method_ x() then Y inherits x(), unless Y explicitly declares x() using XML</text>
+ </assertion>
+
+ <assertion id="hf">
+ <text>For class X which is the bean class of a _session_ bean Y declared using XML, if X declares a _@PreDestroy method_ x() then Y inherits x(), unless Y explicitly declares x() using XML</text>
+ </assertion>
+
+ <assertion id="ia">
+ <text>For class X which is the bean class of a _simple_ bean Y declared using XML, if X declares a non-static method x() annotated with an interceptor binding type Z then Y inherits the binding, unless Y explicitly declares x() using XML.</text>
+ </assertion>
+
+ <assertion id="ib">
+ <text>For class X which is the bean class of a _session_ bean Y declared using XML, if X declares a non-static method x() annotated with an interceptor binding type Z then Y inherits the binding, unless Y explicitly declares x() using XML.</text>
+ </assertion>
+
+ <assertion id="ja">
+ <text>For class X which is the bean class of a _simple_ bean Y declared using XML, if X declares a non-static _producer method_ x() then Y does not inherit this method, unless Y is explicitly declared to _specialize_ X.</text>
+ </assertion>
+
+ <assertion id="jb">
+ <text>For class X which is the bean class of a _simple_ bean Y declared using XML, if X declares a non-static _producer method_ x() then Y does not inherit this method, unless Y is explicitly declared to _realize_ X.</text>
+ </assertion>
+
+ <assertion id="jc">
+ <text>For class X which is the bean class of a _simple_ bean Y declared using XML, if X declares a non-static _disposal method_ x() then Y does not inherit this method, unless Y is explicitly declared to _specialize_ X.</text>
+ </assertion>
+
+ <assertion id="jd">
+ <text>For class X which is the bean class of a _simple_ bean Y declared using XML, if X declares a non-static _disposal method_ x() then Y does not inherit this method, unless Y is explicitly declared to _realize_ X.</text>
+ </assertion>
+
+ <assertion id="je">
+ <text>For class X which is the bean class of a _simple_ bean Y declared using XML, if X declares a non-static _observer method_ x() then Y does not inherit this method, unless Y is explicitly declared to _specialize_ X.</text>
+ </assertion>
+
+ <assertion id="jf">
+ <text>For class X which is the bean class of a _simple_ bean Y declared using XML, if X declares a non-static _observer method_ x() then Y does not inherit this method, unless Y is explicitly declared to _realize_ X.</text>
+ </assertion>
+
+ <assertion id="jg">
+ <text>For class X which is the bean class of a _session_ bean Y declared using XML, if X declares a non-static _producer method_ x() then Y does not inherit this method, unless Y is explicitly declared to _specialize_ X.</text>
+ </assertion>
+
+ <assertion id="jh">
+ <text>For class X which is the bean class of a _session_ bean Y declared using XML, if X declares a non-static _producer method_ x() then Y does not inherit this method, unless Y is explicitly declared to _realize_ X.</text>
+ </assertion>
+
+ <assertion id="ji">
+ <text>For class X which is the bean class of a _session_ bean Y declared using XML, if X declares a non-static _disposal method_ x() then Y does not inherit this method, unless Y is explicitly declared to _specialize_ X.</text>
+ </assertion>
+
+ <assertion id="jj">
+ <text>For class X which is the bean class of a _session_ bean Y declared using XML, if X declares a non-static _disposal method_ x() then Y does not inherit this method, unless Y is explicitly declared to _realize_ X.</text>
+ </assertion>
+
+ <assertion id="jk">
+ <text>For class X which is the bean class of a _session_ bean Y declared using XML, if X declares a non-static _observer method_ x() then Y does not inherit this method, unless Y is explicitly declared to _specialize_ X.</text>
+ </assertion>
+
+ <assertion id="jl">
+ <text>For class X which is the bean class of a _session_ bean Y declared using XML, if X declares a non-static _observer method_ x() then Y does not inherit this method, unless Y is explicitly declared to _realize_ X.</text>
+ </assertion>
+
+ <assertion id="ka">
+ <text>For class X which is the bean class of a _simple_ bean Y declared using XML, if X declares a non-static producer field x then Y does not inherit this field, unless Y is explicitly declared to _specialize_ X.</text>
+ </assertion>
+
+ <assertion id="kb">
+ <text>For class X which is the bean class of a _simple_ bean Y declared using XML, if X declares a non-static producer field x then Y does not inherit this field, unless Y is explicitly declared to _realize_ X.</text>
+ </assertion>
+
+ <assertion id="kc">
+ <text>For class X which is the bean class of a _session_ bean Y declared using XML, if X declares a non-static producer field x then Y does not inherit this field, unless Y is explicitly declared to _specialize_ X.</text>
+ </assertion>
+
+ <assertion id="kd">
+ <text>For class X which is the bean class of a _session_ bean Y declared using XML, if X declares a non-static producer field x then Y does not inherit this field, unless Y is explicitly declared to _realize_ X.</text>
+ </assertion>
+
+ <assertion id="la">
+ <text>For class X which is the bean class of a _simple_ bean Y declared using XML, if Y is a decorator and X declares a delegate attribute x then Y inherits x, unless Y explicitly declares a delegate attribute using XML.</text>
+ </assertion>
+
+ <assertion id="lb">
+ <text>For class X which is the bean class of a _session_ bean Y declared using XML, if Y is a decorator and X declares a delegate attribute x then Y inherits x, unless Y explicitly declares a delegate attribute using XML.</text>
+ </assertion>
</section>
<section id="4.3" title="Specialization">
@@ -2361,10 +2678,14 @@
<text>A bean declared using XML may declare that it realizes a generic class using the <Realizes> element.</text>
</assertion>
- <assertion id="c">
- <text>If a generic class Y declares a non-static producer method or field with a certain combination of scope, stereotypes, bindings and interceptor bindings, then every bean X that realizes Y also has a producer method or field with the same scope, stereotypes and interceptor bindings. The bindings for this inherited producer method or field consist of all bindings declared by the producer method or field of Y, excluding all bindings of Y, together with the bindings declared explicitly by X. The deployment type of the inherited producer method or field is the deployment type of X</text>
+ <assertion id="ca">
+ <text>If a generic class Y declares a non-static _producer method_ with a certain combination of scope, stereotypes, bindings and interceptor bindings, then every bean X that realizes Y also has a _producer method_ with the same scope, stereotypes and interceptor bindings. The bindings for this inherited _producer method_ consist of all bindings declared by the _producer method_ of Y, excluding all bindings of Y, together with the bindings declared explicitly by X. The deployment type of the inherited _producer method_ is the deployment type of X</text>
</assertion>
+ <assertion id="cb">
+ <text>If a generic class Y declares a non-static _producer field_ with a certain combination of scope, stereotypes, bindings and interceptor bindings, then every bean X that realizes Y also has a _producer field_ with the same scope, stereotypes and interceptor bindings. The bindings for this inherited _producer field_ consist of all bindings declared by the _producer field_ of Y, excluding all bindings of Y, together with the bindings declared explicitly by X. The deployment type of the inherited _producer field_ is the deployment type of X</text>
+ </assertion>
+
<assertion id="d">
<text>If a generic class Y declares a non-static disposal method with a disposed parameter with a certain combination of bindings, then every bean X that realizes Y also has a disposal method. The bindings of the disposed parameter of this
inherited disposal method consist of all bindings declared by the disposed parameter of the disposal method of Y, excluding all bindings of Y, together with the bindings declared explicitly by X.</text>
15 years, 10 months
[webbeans-commits] Webbeans SVN: r1753 - in ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans: mock and 1 other directory.
by webbeans-commits@lists.jboss.org
Author: nickarls
Date: 2009-03-03 15:29:13 -0500 (Tue, 03 Mar 2009)
New Revision: 1753
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/DeferredEventNotification.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/mock/MockTransactionServices.java
Log:
minor. Removed @Override for methods just implementing interface
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/DeferredEventNotification.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/DeferredEventNotification.java 2009-03-03 18:04:55 UTC (rev 1752)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/DeferredEventNotification.java 2009-03-03 20:29:13 UTC (rev 1753)
@@ -44,7 +44,6 @@
this.event = event;
}
- @Override
public void run()
{
observer.notify(event);
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/mock/MockTransactionServices.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/mock/MockTransactionServices.java 2009-03-03 18:04:55 UTC (rev 1752)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/mock/MockTransactionServices.java 2009-03-03 20:29:13 UTC (rev 1753)
@@ -33,7 +33,6 @@
/* (non-Javadoc)
* @see org.jboss.webbeans.transaction.spi.TransactionServices#executeAfterTransactionCompletion(java.lang.Runnable)
*/
- @Override
public void executeAfterTransactionCompletion(Runnable task)
{
}
@@ -41,7 +40,6 @@
/* (non-Javadoc)
* @see org.jboss.webbeans.transaction.spi.TransactionServices#executeAfterTransactionCompletion(java.lang.Runnable, org.jboss.webbeans.transaction.spi.TransactionServices.Status)
*/
- @Override
public void executeAfterTransactionCompletion(Runnable task, Status desiredStatus)
{
}
@@ -49,7 +47,6 @@
/* (non-Javadoc)
* @see org.jboss.webbeans.transaction.spi.TransactionServices#executeBeforeTransactionCompletion(java.lang.Runnable)
*/
- @Override
public void executeBeforeTransactionCompletion(Runnable task)
{
}
@@ -57,7 +54,6 @@
/* (non-Javadoc)
* @see org.jboss.webbeans.transaction.spi.TransactionServices#isTransactionActive()
*/
- @Override
public boolean isTransactionActive()
{
return false;
15 years, 10 months
[webbeans-commits] Webbeans SVN: r1752 - ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap and 8 other directories.
by webbeans-commits@lists.jboss.org
Author: dallen6
Date: 2009-03-03 13:04:55 -0500 (Tue, 03 Mar 2009)
New Revision: 1752
Added:
ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/transaction/
ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/transaction/spi/
ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/transaction/spi/TransactionServices.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/ObserverFactory.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/TransactionalObserverImpl.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/mock/MockTransactionServices.java
Modified:
ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/api/Bootstrap.java
ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/AbstractBootstrap.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployer.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/DeferredEventNotification.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/ObserverImpl.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/mock/MockLifecycle.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/transactionalObservers/Agent.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/transactionalObservers/DogAgent.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/transactionalObservers/EventTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/transactionalObservers/Pomeranian.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/transactionalObservers/PomeranianInterface.java
Log:
Changes to support transactional observers; new RI SPI class added; refactored observer method implicit objects.
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java 2009-03-02 21:47:11 UTC (rev 1751)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java 2009-03-03 18:04:55 UTC (rev 1752)
@@ -73,6 +73,7 @@
import org.jboss.webbeans.metadata.MetaDataCache;
import org.jboss.webbeans.resources.spi.NamingContext;
import org.jboss.webbeans.resources.spi.ResourceLoader;
+import org.jboss.webbeans.transaction.spi.TransactionServices;
import org.jboss.webbeans.util.Beans;
import org.jboss.webbeans.util.Reflections;
@@ -126,6 +127,9 @@
private transient final EjbDescriptorCache ejbDescriptorCache;
private transient final ResourceLoader resourceLoader;
+
+ // The transaction management related services provided by the container
+ private transient final TransactionServices transactionServices;
// The Naming (JNDI) access
private transient final NamingContext namingContext;
@@ -137,11 +141,12 @@
*
* @param ejbResolver the ejbResolver to use
*/
- public ManagerImpl(NamingContext namingContext, EjbResolver ejbResolver, ResourceLoader resourceLoader)
+ public ManagerImpl(NamingContext namingContext, EjbResolver ejbResolver, ResourceLoader resourceLoader, TransactionServices transactionServices)
{
this.ejbResolver = ejbResolver;
this.namingContext = namingContext;
this.resourceLoader = resourceLoader;
+ this.transactionServices = transactionServices;
this.beans = new CopyOnWriteArrayList<Bean<?>>();
this.newEnterpriseBeanMap = new ConcurrentHashMap<Class<?>, EnterpriseBean<?>>();
this.enterpriseBeanMap = new ConcurrentHashMap<Class<?>, EnterpriseBean<?>>();
@@ -884,6 +889,11 @@
return resourceLoader;
}
+ public TransactionServices getTransactionServices()
+ {
+ return transactionServices;
+ }
+
/**
* Accesses the factory used to create each instance of InjectionPoint that
* is injected into web beans.
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployer.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployer.java 2009-03-02 21:47:11 UTC (rev 1751)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployer.java 2009-03-03 18:04:55 UTC (rev 1752)
@@ -26,6 +26,7 @@
import org.jboss.webbeans.bean.RIBean;
import org.jboss.webbeans.bean.SimpleBean;
import org.jboss.webbeans.ejb.EJBApiAbstraction;
+import org.jboss.webbeans.event.ObserverFactory;
import org.jboss.webbeans.event.ObserverImpl;
import org.jboss.webbeans.introspector.AnnotatedClass;
import org.jboss.webbeans.introspector.AnnotatedField;
@@ -190,7 +191,7 @@
private void createObserverMethod(AbstractClassBean<?> declaringBean, AnnotatedMethod<?> method)
{
- ObserverImpl<?> observer = ObserverImpl.of(method, declaringBean, manager);
+ ObserverImpl<?> observer = ObserverFactory.create(method, declaringBean, manager);
manager.addObserver(observer);
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java 2009-03-02 21:47:11 UTC (rev 1751)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java 2009-03-03 18:04:55 UTC (rev 1752)
@@ -81,7 +81,11 @@
{
throw new IllegalStateException("EjbResolver is not set");
}
- this.manager = new ManagerImpl(getNamingContext(), getEjbResolver(), getResourceLoader());
+ if (getTransactionServices() == null)
+ {
+ throw new IllegalStateException("TransactionServices is not set");
+ }
+ this.manager = new ManagerImpl(getNamingContext(), getEjbResolver(), getResourceLoader(), getTransactionServices());
getManager().getNaming().bind(ManagerImpl.JNDI_KEY, getManager());
CurrentManager.setRootManager(manager);
initializeContexts();
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/DeferredEventNotification.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/DeferredEventNotification.java 2009-03-02 21:47:11 UTC (rev 1751)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/DeferredEventNotification.java 2009-03-03 18:04:55 UTC (rev 1752)
@@ -17,26 +17,18 @@
package org.jboss.webbeans.event;
-import static org.jboss.webbeans.event.ObserverImpl.TransactionObservationPhase.AFTER_COMPLETION;
-import static org.jboss.webbeans.event.ObserverImpl.TransactionObservationPhase.AFTER_FAILURE;
-import static org.jboss.webbeans.event.ObserverImpl.TransactionObservationPhase.AFTER_SUCCESS;
-import static org.jboss.webbeans.event.ObserverImpl.TransactionObservationPhase.BEFORE_COMPLETION;
-
import javax.event.Observer;
-import javax.transaction.Status;
-import javax.transaction.Synchronization;
/**
- * A synchronization object which will deliver the event to the observer after
- * the JTA transaction currently in effect is committed.
+ * A task that will notify the observer of a specific event at some
+ * future time.
*
* @author David Allen
- * @see javax.transaction.Synchronization
*/
-public class DeferredEventNotification<T> implements Synchronization
+public class DeferredEventNotification<T> implements Runnable
{
// The observer
- private ObserverImpl<T> observer;
+ private Observer<T> observer;
// The event object
private T event;
@@ -48,53 +40,13 @@
*/
public DeferredEventNotification(T event, Observer<T> observer)
{
- this.observer = (ObserverImpl<T>) observer;
+ this.observer = observer;
this.event = event;
}
- /**
- * Called after completion of a transaction
- *
- * Checks if the observer is interested in this particular transaction phase
- * and if so, notifies the observer.
- *
- * @param status The status of the transaction
- * @see javax.transaction.Status
- */
- public void afterCompletion(int status)
+ @Override
+ public void run()
{
- if (observer.isInterestedInTransactionPhase(AFTER_COMPLETION))
- {
- observer.notify(event);
- }
- switch (status)
- {
- case Status.STATUS_COMMITTED:
- if (observer.isInterestedInTransactionPhase(AFTER_SUCCESS))
- {
- observer.notify();
- }
- break;
- case Status.STATUS_ROLLEDBACK:
- if (observer.isInterestedInTransactionPhase(AFTER_FAILURE))
- {
- observer.notify();
- }
- break;
- }
+ observer.notify(event);
}
-
- /**
- * Called before completion of a transaction
- *
- * Checks if the observer is interested in this particular transaction phase
- * and if so, notifies the observer.
- */
- public void beforeCompletion()
- {
- if (observer.isInterestedInTransactionPhase(BEFORE_COMPLETION))
- {
- observer.notify(event);
- }
- }
}
Added: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/ObserverFactory.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/ObserverFactory.java (rev 0)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/ObserverFactory.java 2009-03-03 18:04:55 UTC (rev 1752)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jboss.webbeans.event;
+
+import org.jboss.webbeans.ManagerImpl;
+import org.jboss.webbeans.bean.AbstractClassBean;
+import org.jboss.webbeans.introspector.AnnotatedMethod;
+
+/**
+ * Basic factory class that produces implicit observers for observer methods.
+ *
+ * @author David Allen
+ *
+ */
+public class ObserverFactory
+{
+ /**
+ * Creates an observer
+ *
+ * @param method The observer method abstraction
+ * @param declaringBean The declaring bean
+ * @param manager The Web Beans manager
+ * @return An observer implementation built from the method abstraction
+ */
+ public static <T> ObserverImpl<T> create(AnnotatedMethod<?> method, AbstractClassBean<?> declaringBean, ManagerImpl manager)
+ {
+ ObserverImpl<T> result = null;
+ if (TransactionalObserverImpl.isObserverMethodTransactional(method))
+ {
+ result = new TransactionalObserverImpl<T>(method, declaringBean, manager);
+ }
+ else
+ {
+ result = new ObserverImpl<T>(method, declaringBean, manager);
+ }
+ return result;
+ }
+}
Property changes on: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/ObserverFactory.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/ObserverImpl.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/ObserverImpl.java 2009-03-02 21:47:11 UTC (rev 1751)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/ObserverImpl.java 2009-03-03 18:04:55 UTC (rev 1752)
@@ -48,6 +48,7 @@
import org.jboss.webbeans.introspector.AnnotatedMethod;
import org.jboss.webbeans.introspector.AnnotatedParameter;
import org.jboss.webbeans.transaction.UserTransaction;
+import org.jboss.webbeans.transaction.spi.TransactionServices;
import org.jboss.webbeans.util.Reflections;
/**
@@ -63,37 +64,14 @@
*/
public class ObserverImpl<T> implements Observer<T>
{
- /**
- * The known transactional phases a transactional event observer can be
- * interested in
- */
- protected enum TransactionObservationPhase
- {
- NONE, BEFORE_COMPLETION, AFTER_COMPLETION, AFTER_FAILURE, AFTER_SUCCESS
- }
-
- private final Bean<?> observerBean;
- private final MethodInjectionPoint<?> observerMethod;
- private TransactionObservationPhase transactionObservationPhase;
+ protected final Bean<?> observerBean;
+ protected final MethodInjectionPoint<?> observerMethod;
private final boolean conditional;
- private ManagerImpl manager;
+ protected ManagerImpl manager;
private final Class<T> eventType;
private final Annotation[] bindings;
/**
- * Creates an observer
- *
- * @param method The observer method abstraction
- * @param declaringBean The declaring bean
- * @param manager The Web Beans manager
- * @return An observer implementation built from the method abstraction
- */
- public static <T> ObserverImpl<T> of(AnnotatedMethod<?> method, AbstractClassBean<?> declaringBean, ManagerImpl manager)
- {
- return new ObserverImpl<T>(method, declaringBean, manager);
- }
-
- /**
* Creates an Observer which describes and encapsulates an observer method
* (8.5).
*
@@ -113,41 +91,17 @@
this.eventType = c;
this.bindings = observerMethod.getAnnotatedParameters(Observes.class).get(0).getBindingsAsArray();
- initTransactionObservationPhase();
this.conditional = !observerMethod.getAnnotatedParameters(IfExists.class).isEmpty();
+ init();
}
- private void initTransactionObservationPhase()
+ /**
+ * Completes initialization of the observer and allows derived types to
+ * override behavior.
+ */
+ protected void init()
{
- List<TransactionObservationPhase> observationPhases = new ArrayList<TransactionObservationPhase>();
- if (!observerMethod.getAnnotatedParameters(BeforeTransactionCompletion.class).isEmpty())
- {
- observationPhases.add(TransactionObservationPhase.BEFORE_COMPLETION);
- }
- if (!observerMethod.getAnnotatedParameters(AfterTransactionCompletion.class).isEmpty())
- {
- observationPhases.add(TransactionObservationPhase.AFTER_COMPLETION);
- }
- if (!observerMethod.getAnnotatedParameters(AfterTransactionFailure.class).isEmpty())
- {
- observationPhases.add(TransactionObservationPhase.AFTER_FAILURE);
- }
- if (!observerMethod.getAnnotatedParameters(AfterTransactionSuccess.class).isEmpty())
- {
- observationPhases.add(TransactionObservationPhase.AFTER_SUCCESS);
- }
- if (observationPhases.size() > 1)
- {
- throw new DefinitionException("Transactional observers can only observe on a single phase");
- }
- else if (observationPhases.size() == 1)
- {
- transactionObservationPhase = observationPhases.iterator().next();
- }
- else
- {
- transactionObservationPhase = TransactionObservationPhase.NONE;
- }
+
}
/**
@@ -192,6 +146,16 @@
public void notify(final T event)
{
+ sendEvent(event);
+ }
+
+ /**
+ * Invokes the observer method immediately passing the event.
+ *
+ * @param event The event to notify observer with
+ */
+ protected void sendEvent(final T event)
+ {
Object instance = null;
DependentStorageRequest dependentStorageRequest = DependentStorageRequest.of(new DependentInstancesStore(), new Object());
try
@@ -206,14 +170,7 @@
{
return;
}
- if (isTransactional() && isTransactionActive())
- {
- deferEvent(event);
- }
- else
- {
- observerMethod.invokeWithSpecialValue(instance, Observes.class, event, manager, null, ObserverException.class);
- }
+ observerMethod.invokeWithSpecialValue(instance, Observes.class, event, manager, null, ObserverException.class);
}
finally
{
@@ -224,57 +181,13 @@
}
}
}
-
+
private <B> B getInstance(Bean<B> observerBean)
{
return manager.getInstance(observerBean, !isConditional());
}
/**
- * Checks if there is currently a transaction active
- *
- * @return True if there is one, false otherwise
- */
- private boolean isTransactionActive()
- {
- UserTransaction userTransaction = manager.getInstanceByType(UserTransaction.class);
- try
- {
- return userTransaction != null && userTransaction.getStatus() == Status.STATUS_ACTIVE;
- }
- catch (SystemException e)
- {
- return false;
- }
- }
-
- /**
- * Defers an event for processing in a later phase of the current
- * transaction.
- *
- * Gets the transaction listener, creates a deferred event representation and
- * registers the deferred event.
- *
- * @param event The event type
- */
- private void deferEvent(T event)
- {
- UserTransaction userTransaction = manager.getInstanceByType(UserTransaction.class);
- DeferredEventNotification<T> deferredEvent = new DeferredEventNotification<T>(event, this);
- userTransaction.registerSynchronization(deferredEvent);
- }
-
- /**
- * Indicates if the observer is transactional
- *
- * @return True if transactional, false otherwise
- */
- public boolean isTransactional()
- {
- return !TransactionObservationPhase.NONE.equals(transactionObservationPhase);
- }
-
- /**
* Indicates if the observer is conditional
*
* @return True if conditional, false otherwise
@@ -284,22 +197,11 @@
return conditional;
}
- /**
- * Checks if the observer is interested in a particular transactional phase
- *
- * @param currentPhase The phase to check
- * @return True if interested, false otherwise
- */
- public boolean isInterestedInTransactionPhase(TransactionObservationPhase currentPhase)
- {
- return transactionObservationPhase.equals(currentPhase);
- }
-
@Override
public String toString()
{
StringBuilder builder = new StringBuilder();
- builder.append("Observer Implentation: \n");
+ builder.append("Observer Implementation: \n");
builder.append(" Observer (Declaring) bean: " + observerBean);
builder.append(" Observer method: " + observerMethod);
return builder.toString();
Added: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/TransactionalObserverImpl.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/TransactionalObserverImpl.java (rev 0)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/TransactionalObserverImpl.java 2009-03-03 18:04:55 UTC (rev 1752)
@@ -0,0 +1,174 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jboss.webbeans.event;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.event.AfterTransactionCompletion;
+import javax.event.AfterTransactionFailure;
+import javax.event.AfterTransactionSuccess;
+import javax.event.BeforeTransactionCompletion;
+import javax.inject.DefinitionException;
+import javax.inject.manager.Bean;
+
+import org.jboss.webbeans.ManagerImpl;
+import org.jboss.webbeans.introspector.AnnotatedMethod;
+import org.jboss.webbeans.transaction.spi.TransactionServices;
+
+/**
+ * @author David Allen
+ *
+ */
+public class TransactionalObserverImpl<T> extends ObserverImpl<T>
+{
+ /**
+ * The known transactional phases a transactional event observer can be
+ * interested in
+ */
+ protected enum TransactionObservationPhase
+ {
+ BEFORE_COMPLETION
+ {
+ void registerTask(TransactionServices transactionServices, Runnable task)
+ {
+ transactionServices.executeBeforeTransactionCompletion(task);
+ }
+ },
+ AFTER_COMPLETION
+ {
+ void registerTask(TransactionServices transactionServices, Runnable task)
+ {
+ transactionServices.executeAfterTransactionCompletion(task);
+ }
+ },
+ AFTER_FAILURE
+ {
+ void registerTask(TransactionServices transactionServices, Runnable task)
+ {
+ transactionServices.executeAfterTransactionCompletion(task, TransactionServices.Status.SUCCESS);
+ }
+ },
+ AFTER_SUCCESS
+ {
+ void registerTask(TransactionServices transactionServices, Runnable task)
+ {
+ transactionServices.executeAfterTransactionCompletion(task, TransactionServices.Status.FAILURE);
+ }
+ };
+
+ abstract void registerTask(TransactionServices transactionServices, Runnable task);
+ }
+
+ private TransactionObservationPhase transactionObservationPhase;
+ private boolean deferred = false;
+
+ /**
+ * Tests an observer method to see if it is transactional.
+ *
+ * @param observer The observer method
+ * @return true if the observer method is annotated as transactional
+ */
+ public static boolean isObserverMethodTransactional(AnnotatedMethod<?> observer)
+ {
+ boolean transactional = false;
+ if ((!observer.getAnnotatedParameters(BeforeTransactionCompletion.class).isEmpty()) || (!observer.getAnnotatedParameters(AfterTransactionCompletion.class).isEmpty()) || (!observer.getAnnotatedParameters(AfterTransactionSuccess.class).isEmpty()) || (!observer.getAnnotatedParameters(AfterTransactionFailure.class).isEmpty()))
+ {
+ transactional = true;
+ }
+ return transactional;
+ }
+
+ /**
+ * Creates a new instance of a transactional observer method implicit object.
+ *
+ * @param observer The observer method
+ * @param observerBean The bean declaring the observer method
+ * @param manager The JCDI manager in use
+ */
+ protected TransactionalObserverImpl(AnnotatedMethod<?> observer, Bean<?> observerBean, ManagerImpl manager)
+ {
+ super(observer, observerBean, manager);
+ }
+
+ @Override
+ protected void init()
+ {
+ initTransactionObservationPhase();
+ }
+
+ @Override
+ public void notify(T event)
+ {
+ if (!deferred && manager.getTransactionServices().isTransactionActive())
+ {
+ deferEvent(event);
+ }
+ else
+ {
+ sendEvent(event);
+ }
+ }
+
+ private void initTransactionObservationPhase()
+ {
+ List<TransactionObservationPhase> observationPhases = new ArrayList<TransactionObservationPhase>();
+ if (!observerMethod.getAnnotatedParameters(BeforeTransactionCompletion.class).isEmpty())
+ {
+ observationPhases.add(TransactionObservationPhase.BEFORE_COMPLETION);
+ }
+ if (!observerMethod.getAnnotatedParameters(AfterTransactionCompletion.class).isEmpty())
+ {
+ observationPhases.add(TransactionObservationPhase.AFTER_COMPLETION);
+ }
+ if (!observerMethod.getAnnotatedParameters(AfterTransactionFailure.class).isEmpty())
+ {
+ observationPhases.add(TransactionObservationPhase.AFTER_FAILURE);
+ }
+ if (!observerMethod.getAnnotatedParameters(AfterTransactionSuccess.class).isEmpty())
+ {
+ observationPhases.add(TransactionObservationPhase.AFTER_SUCCESS);
+ }
+ if (observationPhases.size() > 1)
+ {
+ throw new DefinitionException("Transactional observers can only observe on a single phase: " + observerMethod);
+ }
+ else if (observationPhases.size() == 1)
+ {
+ transactionObservationPhase = observationPhases.iterator().next();
+ }
+ else
+ {
+ throw new IllegalStateException("This observer method is not transactional: " + observerMethod);
+ }
+ }
+
+ /**
+ * Defers an event for processing in a later phase of the current
+ * transaction.
+ *
+ * @param event The event object
+ */
+ private void deferEvent(T event)
+ {
+ DeferredEventNotification<T> deferredEvent = new DeferredEventNotification<T>(event, this);
+ transactionObservationPhase.registerTask(manager.getTransactionServices(), deferredEvent);
+ deferred = true;
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/TransactionalObserverImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/mock/MockLifecycle.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/mock/MockLifecycle.java 2009-03-02 21:47:11 UTC (rev 1751)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/mock/MockLifecycle.java 2009-03-03 18:04:55 UTC (rev 1752)
@@ -24,12 +24,14 @@
import org.jboss.webbeans.ejb.spi.EjbResolver;
import org.jboss.webbeans.resources.spi.ResourceLoader;
import org.jboss.webbeans.servlet.AbstractLifecycle;
+import org.jboss.webbeans.transaction.spi.TransactionServices;
public class MockLifecycle extends AbstractLifecycle
{
private static final EjbResolver MOCK_EJB_RESOLVER = new MockEjBResolver();
private static final ResourceLoader MOCK_RESOURCE_LOADER = new MockResourceLoader();
+ private static final TransactionServices MOCK_TRANSACTION_SERVICES = new MockTransactionServices();
private final WebBeansBootstrap bootstrap;
private final MockWebBeanDiscovery webBeanDiscovery;
@@ -55,6 +57,7 @@
bootstrap.setResourceLoader(MOCK_RESOURCE_LOADER);
bootstrap.setWebBeanDiscovery(webBeanDiscovery);
bootstrap.setApplicationContext(applicationBeanStore);
+ bootstrap.setTransactionServices(MOCK_TRANSACTION_SERVICES);
bootstrap.initialize();
}
Added: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/mock/MockTransactionServices.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/mock/MockTransactionServices.java (rev 0)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/mock/MockTransactionServices.java 2009-03-03 18:04:55 UTC (rev 1752)
@@ -0,0 +1,66 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jboss.webbeans.mock;
+
+import org.jboss.webbeans.transaction.spi.TransactionServices;
+
+/**
+ * A mock version of TransactionServices for RI unit tests. Since
+ * no JTA transaction can be active for these unit tests, all
+ * methods here are empty.
+ *
+ * @author David Allen
+ *
+ */
+public class MockTransactionServices implements TransactionServices
+{
+
+ /* (non-Javadoc)
+ * @see org.jboss.webbeans.transaction.spi.TransactionServices#executeAfterTransactionCompletion(java.lang.Runnable)
+ */
+ @Override
+ public void executeAfterTransactionCompletion(Runnable task)
+ {
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.webbeans.transaction.spi.TransactionServices#executeAfterTransactionCompletion(java.lang.Runnable, org.jboss.webbeans.transaction.spi.TransactionServices.Status)
+ */
+ @Override
+ public void executeAfterTransactionCompletion(Runnable task, Status desiredStatus)
+ {
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.webbeans.transaction.spi.TransactionServices#executeBeforeTransactionCompletion(java.lang.Runnable)
+ */
+ @Override
+ public void executeBeforeTransactionCompletion(Runnable task)
+ {
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.webbeans.transaction.spi.TransactionServices#isTransactionActive()
+ */
+ @Override
+ public boolean isTransactionActive()
+ {
+ return false;
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/mock/MockTransactionServices.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/api/Bootstrap.java
===================================================================
--- ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/api/Bootstrap.java 2009-03-02 21:47:11 UTC (rev 1751)
+++ ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/api/Bootstrap.java 2009-03-03 18:04:55 UTC (rev 1752)
@@ -8,6 +8,7 @@
import org.jboss.webbeans.ejb.spi.EjbResolver;
import org.jboss.webbeans.resources.spi.NamingContext;
import org.jboss.webbeans.resources.spi.ResourceLoader;
+import org.jboss.webbeans.transaction.spi.TransactionServices;
/**
* Bootstrap API for Web Beans.
@@ -60,6 +61,13 @@
public void setApplicationContext(BeanStore beanStore);
/**
+ * Set the transaction services provider to use.
+ *
+ * @param transactionServices An implementation of TransactionService
+ */
+ public void setTransactionServices(TransactionServices transactionServices);
+
+ /**
* Initialize the bootstrap:
* <ul>
* <li>Create the manager and bind it to JNDI</li>
Modified: ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/AbstractBootstrap.java
===================================================================
--- ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/AbstractBootstrap.java 2009-03-02 21:47:11 UTC (rev 1751)
+++ ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/AbstractBootstrap.java 2009-03-03 18:04:55 UTC (rev 1752)
@@ -7,6 +7,7 @@
import org.jboss.webbeans.ejb.spi.EjbResolver;
import org.jboss.webbeans.resources.spi.NamingContext;
import org.jboss.webbeans.resources.spi.ResourceLoader;
+import org.jboss.webbeans.transaction.spi.TransactionServices;
public abstract class AbstractBootstrap implements Bootstrap
{
@@ -17,6 +18,7 @@
private EjbResolver ejbResolver;
private EjbDiscovery ejbDiscovery;
private BeanStore applicationContext;
+ private TransactionServices transactionServices;
public void setEjbDiscovery(EjbDiscovery ejbDiscovery)
{
@@ -42,6 +44,11 @@
{
this.webBeanDiscovery = webBeanDiscovery;
}
+
+ public void setTransactionServices(TransactionServices transactionServices)
+ {
+ this.transactionServices = transactionServices;
+ }
public WebBeanDiscovery getWebBeanDiscovery()
{
@@ -68,6 +75,11 @@
return ejbDiscovery;
}
+ public TransactionServices getTransactionServices()
+ {
+ return transactionServices;
+ }
+
public BeanStore getApplicationContext()
{
return applicationContext;
Added: ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/transaction/spi/TransactionServices.java
===================================================================
--- ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/transaction/spi/TransactionServices.java (rev 0)
+++ ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/transaction/spi/TransactionServices.java 2009-03-03 18:04:55 UTC (rev 1752)
@@ -0,0 +1,62 @@
+package org.jboss.webbeans.transaction.spi;
+
+/**
+ * <p>
+ * The container must implement the services related to transactional behavior
+ * used in JSR-299, if that behavior is going to be used.
+ * </p>
+ *
+ * <p>
+ * The event framework specified by JSR-299 includes the ability to create
+ * observer methods which are activated based on the phase and status of a
+ * currently active transaction. In order to use these abilities, the container
+ * must provide these intermediary services which in turn may interact with an
+ * application server and JTA or any other type of transaction service provider.
+ * </p>
+ *
+ * @author David Allen
+ *
+ */
+public interface TransactionServices
+{
+ /**
+ * Possible status conditions for a transaction.
+ */
+ public static enum Status
+ {
+ ALL, SUCCESS, FAILURE
+ }
+
+ /**
+ * Registers a task to be executed immediately before the current transaction
+ * is committed or rolled back.
+ *
+ * @param task The Runnable that will be executed
+ */
+ public void executeBeforeTransactionCompletion(Runnable task);
+
+ /**
+ * Registers a task to be executed immediately after the current transaction
+ * is committed or rolled back.
+ *
+ * @param task The Runnable that will be executed
+ */
+ public void executeAfterTransactionCompletion(Runnable task);
+
+ /**
+ * Registers a task to be executed immediately after the current transaction
+ * is committed or rolled back, but only one depending on the status
+ * provided.
+ *
+ * @param task The Runnable that will be executed
+ */
+ public void executeAfterTransactionCompletion(Runnable task, Status desiredStatus);
+
+ /**
+ * Queries the status of the current execution to see if a transaction is
+ * currently active.
+ *
+ * @return true if a transaction is active
+ */
+ public boolean isTransactionActive();
+}
Property changes on: ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/transaction/spi/TransactionServices.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/transactionalObservers/Agent.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/transactionalObservers/Agent.java 2009-03-02 21:47:11 UTC (rev 1751)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/transactionalObservers/Agent.java 2009-03-03 18:04:55 UTC (rev 1752)
@@ -1,5 +1,8 @@
package org.jboss.jsr299.tck.tests.event.transactionalObservers;
+import javax.ejb.Local;
+
+@Local
public interface Agent
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/transactionalObservers/DogAgent.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/transactionalObservers/DogAgent.java 2009-03-02 21:47:11 UTC (rev 1751)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/transactionalObservers/DogAgent.java 2009-03-03 18:04:55 UTC (rev 1752)
@@ -14,7 +14,6 @@
import static javax.ejb.TransactionManagementType.BEAN;
@Stateless
-(a)Local(Agent.class)
@TransactionManagement(BEAN)
@RunAs("Bubba")
@Named
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/transactionalObservers/EventTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/transactionalObservers/EventTest.java 2009-03-02 21:47:11 UTC (rev 1751)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/transactionalObservers/EventTest.java 2009-03-03 18:04:55 UTC (rev 1752)
@@ -21,11 +21,8 @@
import java.lang.annotation.Annotation;
import java.math.BigInteger;
-import java.util.Set;
-import javax.event.Observer;
import javax.inject.AnnotationLiteral;
-import javax.inject.manager.Bean;
import org.hibernate.tck.annotations.SpecAssertion;
import org.hibernate.tck.annotations.SpecAssertions;
@@ -89,9 +86,10 @@
dog.setCorrectContext(false);
dog.setCorrectTransactionState(false);
Agent dogAgent = getCurrentManager().getInstanceByType(Agent.class);
+ assert dogAgent != null;
dogAgent.sendOutsideTransaction(BigInteger.TEN);
- assert dog.isCorrectContext();
assert dog.isCorrectTransactionState();
+ assert dog.isCorrectContext();
}
@Test(groups = { "events", "integration", "broken" })
@@ -104,7 +102,6 @@
assert !getCurrentManager().resolveObservers("event").isEmpty();
Agent dogAgent = getCurrentManager().getInstanceByType(Agent.class);
dogAgent.sendInTransaction("event");
- assert dog.isCorrectContext();
assert dog.isCorrectTransactionState();
}
@@ -117,6 +114,7 @@
dog.setCorrectTransactionState(false);
Agent dogAgent = getCurrentManager().getInstanceByType(Agent.class);
dogAgent.sendInTransaction(new Integer(4));
+ assert dog.isCorrectTransactionState();
}
@Test(groups = { "events", "integration", "broken" })
@@ -126,14 +124,21 @@
PomeranianInterface dog = (PomeranianInterface) getCurrentManager().getInstanceByName("Teddy");
dog.setCorrectContext(false);
dog.setCorrectTransactionState(false);
- getCurrentManager().fireEvent(new Float(4.0));
+ Agent dogAgent = getCurrentManager().getInstanceByType(Agent.class);
+ dogAgent.sendInTransaction(new Float(4.0));
+ assert dog.isCorrectTransactionState();
}
- @Test(groups = { "stub", "events", "integration" })
+ @Test(groups = { "stub", "events", "integration", "broken" })
@SpecAssertions( { @SpecAssertion(section = "7.5.6", id = "b"), @SpecAssertion(section = "7.5.6", id = "h") })
public void testBeforeTransactionCompletionObserver()
{
- assert false;
+ PomeranianInterface dog = (PomeranianInterface) getCurrentManager().getInstanceByName("Teddy");
+ dog.setCorrectContext(false);
+ dog.setCorrectTransactionState(false);
+ Agent dogAgent = getCurrentManager().getInstanceByType(Agent.class);
+ dogAgent.sendInTransaction(new Double(4.0));
+ assert dog.isCorrectTransactionState();
}
@Test(groups = { "stub", "events", "integration" })
@@ -170,22 +175,15 @@
}
/**
- *
+ * Otherwise, the observer method is called in the same transaction context,
+ * client security context and lifecycle contexts as the invocation of
+ * Event.fire().
*/
- @Test(groups = { "events", "integration", "broken" })
+ @Test(groups = { "events", "integration", "stub" })
@SpecAssertion(section = "7.5.8", id = "unknown")
public void testEnterpriseBeanObserverMethodCalledWithCallerContext()
{
- Set<Bean<PomeranianInterface>> beans = getCurrentManager().resolveByType(PomeranianInterface.class, TAME_LITERAL);
- assert !beans.isEmpty();
- String event = "A new event";
- Set<Observer<String>> observers = getCurrentManager().resolveObservers(event);
- assert observers.size() == 1;
-
- getCurrentManager().fireEvent(event);
- PomeranianInterface dog = (PomeranianInterface) getCurrentManager().getInstanceByName("Teddy");
- dog.setCorrectContext(false);
- dog.setCorrectTransactionState(false);
+ assert false;
}
@Test(groups = { "stub", "events", "integration" })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/transactionalObservers/Pomeranian.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/transactionalObservers/Pomeranian.java 2009-03-02 21:47:11 UTC (rev 1751)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/transactionalObservers/Pomeranian.java 2009-03-03 18:04:55 UTC (rev 1752)
@@ -2,31 +2,31 @@
import static javax.ejb.TransactionManagementType.BEAN;
import static javax.transaction.Status.STATUS_COMMITTED;
+import static javax.transaction.Status.STATUS_NO_TRANSACTION;
+import static javax.transaction.Status.STATUS_PREPARED;
import static javax.transaction.Status.STATUS_ROLLEDBACK;
-import static javax.transaction.Status.STATUS_NO_TRANSACTION;
import java.math.BigInteger;
import javax.annotation.Named;
import javax.annotation.Resource;
import javax.ejb.EJBException;
-import javax.ejb.Local;
import javax.ejb.SessionContext;
import javax.ejb.Stateful;
import javax.ejb.TransactionManagement;
import javax.event.AfterTransactionCompletion;
import javax.event.AfterTransactionFailure;
import javax.event.AfterTransactionSuccess;
+import javax.event.BeforeTransactionCompletion;
import javax.event.Observes;
import javax.transaction.SystemException;
import javax.transaction.UserTransaction;
@Stateful
-(a)Local(PomeranianInterface.class)
+@TransactionManagement(BEAN)
@Tame
@Named("Teddy")
-@TransactionManagement(BEAN)
public class Pomeranian implements PomeranianInterface
{
@Resource
@@ -53,7 +53,7 @@
}
else
{
- throw new EJBException("Transaction " + transaction + " is not in expected state");
+ throw new EJBException("Incorrect transaction state " + transaction.getStatus());
}
if (context.getCallerPrincipal().getName().equals("Bubba"))
@@ -84,6 +84,10 @@
{
setCorrectTransactionState(true);
}
+ else
+ {
+ throw new EJBException("Incorrect transaction state " + transaction.getStatus());
+ }
}
catch (SystemException e)
{
@@ -104,6 +108,10 @@
{
setCorrectTransactionState(true);
}
+ else
+ {
+ throw new EJBException("Incorrect transaction state " + transaction.getStatus());
+ }
}
catch (SystemException e)
{
@@ -121,13 +129,17 @@
}
else
{
- throw new EJBException("Transaction " + transaction + " is not in expected state");
+ throw new EJBException("Incorrect transaction state " + transaction.getStatus());
}
if (context.getCallerPrincipal().getName().equals("Bubba"))
{
setCorrectContext(true);
}
+ else
+ {
+ throw new EJBException("Wrong principal: " + context.getCallerPrincipal().getName());
+ }
}
catch (SystemException e)
{
@@ -135,6 +147,30 @@
}
}
+ public void observeDoubleEvent(@Observes @BeforeTransactionCompletion Double event)
+ {
+ try
+ {
+ if (transaction.getStatus() == STATUS_NO_TRANSACTION)
+ {
+ setCorrectTransactionState(true);
+ }
+ else
+ {
+ throw new EJBException("Incorrect transaction state " + transaction.getStatus());
+ }
+
+ if (context.getCallerPrincipal().getName().equals("Bubba"))
+ {
+ setCorrectContext(true);
+ }
+ }
+ catch (SystemException e)
+ {
+ throw new EJBException("Failed to detect transaction status", e);
+ }
+ }
+
public boolean isCorrectContext()
{
return correctContext;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/transactionalObservers/PomeranianInterface.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/transactionalObservers/PomeranianInterface.java 2009-03-02 21:47:11 UTC (rev 1751)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/transactionalObservers/PomeranianInterface.java 2009-03-03 18:04:55 UTC (rev 1752)
@@ -2,6 +2,9 @@
import java.math.BigInteger;
+import javax.ejb.Local;
+
+@Local
public interface PomeranianInterface
{
/**
@@ -26,6 +29,8 @@
public void observeFloatEvent(Float event);
public void observeBigIntegerEvent(BigInteger event);
+
+ public void observeDoubleEvent(Double event);
public boolean isCorrectContext();
15 years, 10 months
[webbeans-commits] Webbeans SVN: r1751 - in extensions/trunk/se: src/main/java/org/jboss/webbeans/environment/se and 2 other directories.
by webbeans-commits@lists.jboss.org
Author: peteroyle
Date: 2009-03-02 16:47:11 -0500 (Mon, 02 Mar 2009)
New Revision: 1751
Modified:
extensions/trunk/se/pom.xml
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/StartMain.java
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/AbstractScanner.java
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/DeploymentStrategy.java
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/Scanner.java
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/URLScanner.java
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/discovery/WebBeanDiscoveryImpl.java
Log:
decoupled DeploymentStrategy from URLScanner
Modified: extensions/trunk/se/pom.xml
===================================================================
--- extensions/trunk/se/pom.xml 2009-03-02 14:12:02 UTC (rev 1750)
+++ extensions/trunk/se/pom.xml 2009-03-02 21:47:11 UTC (rev 1751)
@@ -96,7 +96,6 @@
<scope>test</scope>
</dependency>
-
<dependency>
<groupId>org.jboss.webbeans</groupId>
<artifactId>webbeans-ri-spi</artifactId>
Modified: extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/StartMain.java
===================================================================
--- extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/StartMain.java 2009-03-02 14:12:02 UTC (rev 1750)
+++ extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/StartMain.java 2009-03-02 21:47:11 UTC (rev 1751)
@@ -16,7 +16,6 @@
*/
package org.jboss.webbeans.environment.se;
-import org.jboss.webbeans.context.api.helpers.ConcurrentHashMapBeanStore;
import org.jboss.webbeans.environment.se.boot.WebBeansBootstrap;
/**
Modified: extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/AbstractScanner.java
===================================================================
--- extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/AbstractScanner.java 2009-03-02 14:12:02 UTC (rev 1750)
+++ extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/AbstractScanner.java 2009-03-02 21:47:11 UTC (rev 1751)
@@ -146,24 +146,27 @@
}
private static final LogProvider log = Logging.getLogProvider( Scanner.class );
- private DeploymentStrategy deploymentStrategy;
+ private Set<DeploymentHandler> deploymentHandlers;
+ private ClassLoader classLoader;
- public AbstractScanner( DeploymentStrategy deploymentStrategy )
+
+ public AbstractScanner( Set<DeploymentHandler> deploymentHandlers, ClassLoader classLoader )
{
- this.deploymentStrategy = deploymentStrategy;
+ this.deploymentHandlers = deploymentHandlers;
+ this.classLoader = classLoader;
ClassFile.class.getPackage( ); //to force loading of javassist, throwing an exception if it is missing
}
- public DeploymentStrategy getDeploymentStrategy( )
+ protected boolean handle( String name )
{
- return deploymentStrategy;
+ return new Handler( name,
+ deploymentHandlers,
+ classLoader ).handle( );
}
- protected boolean handle( String name )
+ public ClassLoader getClassLoader()
{
- return new Handler( name,
- deploymentStrategy.getDeploymentHandlers( ),
- deploymentStrategy.getClassLoader( ) ).handle( );
+ return classLoader;
}
}
Modified: extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/DeploymentStrategy.java
===================================================================
--- extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/DeploymentStrategy.java 2009-03-02 14:12:02 UTC (rev 1750)
+++ extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/DeploymentStrategy.java 2009-03-02 21:47:11 UTC (rev 1751)
@@ -119,7 +119,7 @@
}
log.debug( "Using default URLScanner" );
- this.scanner = new URLScanner( this );
+ ////this.scanner = new URLScanner( this );
}
private Scanner instantiateScanner( String className )
Modified: extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/Scanner.java
===================================================================
--- extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/Scanner.java 2009-03-02 14:12:02 UTC (rev 1750)
+++ extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/Scanner.java 2009-03-02 21:47:11 UTC (rev 1751)
@@ -42,9 +42,4 @@
*/
public void scanResources( String[] resources );
- /**
- * Get the deployment strategy this scanner is used by
- */
- public DeploymentStrategy getDeploymentStrategy( );
-
}
Modified: extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/URLScanner.java
===================================================================
--- extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/URLScanner.java 2009-03-02 14:12:02 UTC (rev 1750)
+++ extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/URLScanner.java 2009-03-02 21:47:11 UTC (rev 1751)
@@ -45,9 +45,9 @@
{
private static final LogProvider log = Logging.getLogProvider( URLScanner.class );
- public URLScanner( DeploymentStrategy deploymentStrategy )
+ public URLScanner( Set<DeploymentHandler> deploymentHandlers, ClassLoader classLoader )
{
- super( deploymentStrategy );
+ super( deploymentHandlers, classLoader );
}
@Override
@@ -67,7 +67,7 @@
{
try
{
- Enumeration<URL> urlEnum = getDeploymentStrategy( ).getClassLoader( ).getResources( resourceName );
+ Enumeration<URL> urlEnum = getClassLoader( ).getResources( resourceName );
while ( urlEnum.hasMoreElements( ) )
{
Modified: extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/discovery/WebBeanDiscoveryImpl.java
===================================================================
--- extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/discovery/WebBeanDiscoveryImpl.java 2009-03-02 14:12:02 UTC (rev 1750)
+++ extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/discovery/WebBeanDiscoveryImpl.java 2009-03-02 21:47:11 UTC (rev 1751)
@@ -16,17 +16,21 @@
*/
package org.jboss.webbeans.environment.se.discovery;
+import java.io.File;
import org.apache.log4j.Logger;
import org.jboss.webbeans.bootstrap.spi.WebBeanDiscovery;
import org.jboss.webbeans.ejb.spi.EjbDescriptor;
import org.jboss.webbeans.environment.se.deployment.ClassDescriptor;
import org.jboss.webbeans.environment.se.deployment.FileDescriptor;
-import org.jboss.webbeans.environment.se.deployment.StandardDeploymentStrategy;
import java.net.URL;
import java.util.HashSet;
import java.util.Set;
+import org.jboss.webbeans.environment.se.deployment.DeploymentHandler;
+import org.jboss.webbeans.environment.se.deployment.SimpleWebBeansDeploymentHandler;
+import org.jboss.webbeans.environment.se.deployment.URLScanner;
+import org.jboss.webbeans.environment.se.deployment.WebBeansXmlDeploymentHandler;
/**
* The means by which Web Beans are discovered on the classpath. This will only
@@ -39,16 +43,26 @@
{
private Set<Class<?>> wbClasses = new HashSet<Class<?>>( );
private Set<URL> wbUrls = new HashSet<URL>( );
- private StandardDeploymentStrategy deploymentStrategy;
+// private StandardDeploymentStrategy deploymentStrategy;
+ private SimpleWebBeansDeploymentHandler simpleWebBeansDeploymentHandler = new SimpleWebBeansDeploymentHandler();
+ private WebBeansXmlDeploymentHandler webBeansXmlDeploymentHandler = new WebBeansXmlDeploymentHandler();
+ URLScanner urlScanner;
+
// The log provider
private static Logger log = Logger.getLogger( WebBeanDiscoveryImpl.class.getName( ) );
public WebBeanDiscoveryImpl( )
{
- deploymentStrategy = new StandardDeploymentStrategy( Thread.currentThread( ).getContextClassLoader( ) );
- deploymentStrategy.scan( );
+ final ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
+ Set<DeploymentHandler> deploymentHandlers = new HashSet<DeploymentHandler>();
+ deploymentHandlers.add( simpleWebBeansDeploymentHandler );
+ deploymentHandlers.add( webBeansXmlDeploymentHandler );
+ urlScanner = new URLScanner( deploymentHandlers, contextClassLoader );
+ urlScanner.scanResources( new String[] { "beans.xml"} );
+ urlScanner.scanDirectories( new File[]{} );
+
findWebBeansXmlUrls( );
findWebBeansAnnotatedClasses( );
}
@@ -71,7 +85,7 @@
private void findWebBeansAnnotatedClasses( )
throws WebBeanDiscoveryException
{
- for ( ClassDescriptor classDesc : deploymentStrategy.getSimpleWebBeans( ) )
+ for ( ClassDescriptor classDesc : simpleWebBeansDeploymentHandler.getClasses() )
{
final Class<?> clazz = classDesc.getClazz( );
wbClasses.add( clazz );
@@ -80,7 +94,7 @@
private void findWebBeansXmlUrls( )
{
- for ( FileDescriptor fileDesc : deploymentStrategy.getWebBeansXMLs( ) )
+ for ( FileDescriptor fileDesc : webBeansXmlDeploymentHandler.getResources() )
{
wbUrls.add( fileDesc.getUrl( ) );
}
15 years, 10 months
[webbeans-commits] Webbeans SVN: r1750 - tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context and 2 other directories.
by webbeans-commits@lists.jboss.org
Author: dallen6
Date: 2009-03-02 09:12:02 -0500 (Mon, 02 Mar 2009)
New Revision: 1750
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection/Exceptions.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection/MethodInjectionPoint.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/ContextTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/DependentContextTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/HorseStable.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/RecluseSpider.java
Log:
Corrected some observer method/dependent context tests and fixed problem with invoking observer methods on session beans.
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection/Exceptions.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection/Exceptions.java 2009-03-01 22:13:29 UTC (rev 1749)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection/Exceptions.java 2009-03-02 14:12:02 UTC (rev 1750)
@@ -57,42 +57,42 @@
public static void rethrowException(IllegalArgumentException e)
{
- rethrowException(e.getCause());
+ rethrowException(e.getCause() != null ? e.getCause() : e);
}
public static void rethrowException(IllegalArgumentException e, Class<? extends RuntimeException> exceptionToThrow)
{
- rethrowException(e.getCause(), exceptionToThrow);
+ rethrowException(e.getCause() != null ? e.getCause() : e, exceptionToThrow);
}
public static void rethrowException(InstantiationException e, Class<? extends RuntimeException> exceptionToThrow)
{
- rethrowException(e.getCause(), exceptionToThrow);
+ rethrowException(e.getCause() != null ? e.getCause() : e, exceptionToThrow);
}
public static void rethrowException(InstantiationException e)
{
- rethrowException(e.getCause());
+ rethrowException(e.getCause() != null ? e.getCause() : e);
}
public static void rethrowException(IllegalAccessException e)
{
- rethrowException(e.getCause());
+ rethrowException(e.getCause() != null ? e.getCause() : e);
}
public static void rethrowException(IllegalAccessException e, Class<? extends RuntimeException> exceptionToThrow)
{
- rethrowException(e.getCause(), exceptionToThrow);
+ rethrowException(e.getCause() != null ? e.getCause() : e, exceptionToThrow);
}
public static void rethrowException(InvocationTargetException e, Class<? extends RuntimeException> exceptionToThrow)
{
- rethrowException(e.getCause(), exceptionToThrow);
+ rethrowException(e.getCause() != null ? e.getCause() : e, exceptionToThrow);
}
public static void rethrowException(InvocationTargetException e)
{
- rethrowException(e.getCause());
+ rethrowException(e.getCause() != null ? e.getCause() : e);
}
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection/MethodInjectionPoint.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection/MethodInjectionPoint.java 2009-03-01 22:13:29 UTC (rev 1749)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection/MethodInjectionPoint.java 2009-03-02 14:12:02 UTC (rev 1750)
@@ -33,6 +33,7 @@
import org.jboss.webbeans.introspector.AnnotatedMethod;
import org.jboss.webbeans.introspector.AnnotatedParameter;
import org.jboss.webbeans.introspector.ForwardingAnnotatedMethod;
+import org.jboss.webbeans.util.Reflections;
public class MethodInjectionPoint<T> extends ForwardingAnnotatedMethod<T> implements AnnotatedInjectionPoint<T, Method>
{
@@ -116,11 +117,20 @@
return null;
}
+ @SuppressWarnings("unchecked")
public T invokeWithSpecialValue(Object declaringInstance, Class<? extends Annotation> annotatedParameter, Object parameter, ManagerImpl manager, CreationalContext<?> creationalContext, Class<? extends RuntimeException> exceptionTypeToThrow)
{
try
{
- return delegate().invoke(declaringInstance, getParameterValues(getParameters(), annotatedParameter, parameter, manager, creationalContext));
+ if (delegate().getDeclaringClass().getType().equals(declaringInstance.getClass()))
+ {
+ return delegate().invoke(declaringInstance, getParameterValues(getParameters(), annotatedParameter, parameter, manager, creationalContext));
+ }
+ else
+ {
+ Method proxiedMethod = Reflections.lookupMethod(delegate().getAnnotatedMethod(), declaringInstance);
+ return (T) proxiedMethod.invoke(declaringInstance, getParameterValues(getParameters(), annotatedParameter, parameter, manager, creationalContext));
+ }
}
catch (IllegalArgumentException e)
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/ContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/ContextTest.java 2009-03-01 22:13:29 UTC (rev 1749)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/ContextTest.java 2009-03-02 14:12:02 UTC (rev 1750)
@@ -85,10 +85,11 @@
getCurrentManager().getContext(Unregistered.class);
}
- @Test(groups = { "manager" })
+ @Test(groups = { "manager", "broken" })
@SpecAssertion(section = "8.6", id = "b")
public void testGetContextReturnsActiveContext()
{
+ //TODO This is not testing the assertion at all
getCurrentManager().getContext(RequestScoped.class);
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/DependentContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/DependentContextTest.java 2009-03-01 22:13:29 UTC (rev 1749)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/DependentContextTest.java 2009-03-02 14:12:02 UTC (rev 1750)
@@ -216,7 +216,7 @@
@Test(groups = { "contexts", "observerMethod" })
@SpecAssertion(section = "8.3", id = "g")
- public void testContextIsActiveWhenInvokingObserverMethod()
+ public void testContextIsActiveWhenCreatingObserverMethodInstance()
{
getCurrentManager().fireEvent(new HorseInStableEvent());
assert HorseStable.isDependentContextActive();
@@ -241,7 +241,7 @@
@Test(groups = { "contexts", "observerMethod" })
@SpecAssertion(section = "8.3", id = "i")
- public void testContextIsActiveWhenInvokingObserver()
+ public void testContextIsActiveWhenInvokingObserverMethod()
{
getCurrentManager().fireEvent(new HorseInStableEvent());
assert ApplicationHorseStable.isDependentContextActive();
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/HorseStable.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/HorseStable.java 2009-03-01 22:13:29 UTC (rev 1749)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/HorseStable.java 2009-03-02 14:12:02 UTC (rev 1750)
@@ -3,22 +3,26 @@
import javax.context.Dependent;
import javax.event.Observes;
import javax.inject.Current;
+import javax.inject.Initializer;
import javax.inject.manager.Manager;
@Dependent
class HorseStable
{
- @Current
- private Manager manager;
private static boolean dependentContextActive = false;
private static HorseStable instanceThatObservedEvent = null;
-
- public void horseEntered(@Observes HorseInStableEvent horseEvent)
+
+ @Initializer
+ public HorseStable(@Current Manager manager)
{
if (manager.getContext(Dependent.class).isActive())
{
dependentContextActive = true;
}
+ }
+
+ public void horseEntered(@Observes HorseInStableEvent horseEvent)
+ {
instanceThatObservedEvent = this;
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java 2009-03-01 22:13:29 UTC (rev 1749)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java 2009-03-02 14:12:02 UTC (rev 1750)
@@ -333,9 +333,7 @@
assert beans != null;
}
- // TODO This test was working well in January 2009 but no longer creates the
- // observer
- @Test(groups = { "events", "broken" })
+ @Test(groups = { "events" })
@SpecAssertions( { @SpecAssertion(section = "7.5.5", id = "a"), @SpecAssertion(section = "7.5.5", id = "b")} )
public void testConditionalObserver() throws Exception
{
@@ -353,9 +351,11 @@
{
RecluseSpider bean = getCurrentManager().getInstanceByType(RecluseSpider.class);
assert bean != null;
+ // Must invoke a method to really create the instance
+ assert !bean.isNotified();
getCurrentManager().fireEvent(new ConditionalEvent());
- assert RecluseSpider.notified;
+ assert bean.isNotified();
}
}.run();
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/RecluseSpider.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/RecluseSpider.java 2009-03-01 22:13:29 UTC (rev 1749)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/RecluseSpider.java 2009-03-02 14:12:02 UTC (rev 1750)
@@ -1,5 +1,6 @@
package org.jboss.jsr299.tck.tests.event;
+import javax.context.RequestScoped;
import javax.event.IfExists;
import javax.event.Observes;
@@ -7,6 +8,7 @@
* Simple web bean that conditionally listens to events.
*
*/
+@RequestScoped
class RecluseSpider
{
public static boolean notified = false;
@@ -16,4 +18,8 @@
notified = true;
}
+ public boolean isNotified()
+ {
+ return notified;
+ }
}
15 years, 10 months
[webbeans-commits] Webbeans SVN: r1749 - in extensions/trunk/se/src/main/java/org/jboss/webbeans: environment/se/boot and 3 other directories.
by webbeans-commits@lists.jboss.org
Author: peteroyle
Date: 2009-03-01 17:13:29 -0500 (Sun, 01 Mar 2009)
New Revision: 1749
Added:
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/lifecycle/
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/lifecycle/ApplicationLifecycle.java
Removed:
extensions/trunk/se/src/main/java/org/jboss/webbeans/lifecycle/ApplicationLifecycle.java
Modified:
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/boot/WebBeansBootstrap.java
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/AbstractDeploymentHandler.java
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/AbstractScanner.java
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/ClassDeploymentHandler.java
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/ClassDeploymentMetadata.java
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/DeploymentHandler.java
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/DeploymentStrategy.java
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/Scanner.java
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/SimpleWebBeansDeploymentHandler.java
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/StandardDeploymentStrategy.java
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/URLScanner.java
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/WebBeansXmlDeploymentHandler.java
Log:
Moved lifecyle package to environment.se. Removed unnecessary functionality from deplyment (imported from Seam) to simplify.
Modified: extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/boot/WebBeansBootstrap.java
===================================================================
--- extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/boot/WebBeansBootstrap.java 2009-03-01 20:31:32 UTC (rev 1748)
+++ extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/boot/WebBeansBootstrap.java 2009-03-01 22:13:29 UTC (rev 1749)
@@ -33,7 +33,7 @@
import org.jboss.webbeans.environment.se.beans.ParametersFactory;
import org.jboss.webbeans.environment.se.discovery.WebBeanDiscoveryImpl;
import org.jboss.webbeans.environment.se.resources.DefaultResourceLoader;
-import org.jboss.webbeans.lifecycle.ApplicationLifecycle;
+import org.jboss.webbeans.environment.se.lifecycle.ApplicationLifecycle;
import org.jboss.webbeans.literal.DeployedLiteral;
import org.jboss.webbeans.literal.InitializedLiteral;
import org.jboss.webbeans.log.Log;
Modified: extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/AbstractDeploymentHandler.java
===================================================================
--- extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/AbstractDeploymentHandler.java 2009-03-01 20:31:32 UTC (rev 1748)
+++ extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/AbstractDeploymentHandler.java 2009-03-01 22:13:29 UTC (rev 1749)
@@ -35,12 +35,6 @@
resources = new HashSet<FileDescriptor>( );
}
- @Override
- public String toString( )
- {
- return getName( );
- }
-
public void setResources( Set<FileDescriptor> resources )
{
this.resources = resources;
Modified: extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/AbstractScanner.java
===================================================================
--- extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/AbstractScanner.java 2009-03-01 20:31:32 UTC (rev 1748)
+++ extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/AbstractScanner.java 2009-03-01 22:13:29 UTC (rev 1749)
@@ -20,18 +20,12 @@
import org.jboss.webbeans.log.LogProvider;
import org.jboss.webbeans.log.Logging;
-import java.io.DataInputStream;
-import java.io.File;
import java.io.IOException;
-import java.io.InputStream;
-import java.lang.annotation.Annotation;
import java.net.URL;
import java.util.Enumeration;
import java.util.HashSet;
-import java.util.Map.Entry;
import java.util.Set;
-import javassist.bytecode.AnnotationsAttribute;
import javassist.bytecode.ClassFile;
/**
@@ -47,16 +41,13 @@
{
private static class Handler
{
- // Cache descriptors for performance
- private ClassFile classFile;
private ClassDescriptor classDescriptor;
- private FileDescriptor fileDescriptor;
private Set<FileDescriptor> fileDescriptors;
- private Set<Entry<String, DeploymentHandler>> deploymentHandlers;
+ private Set<DeploymentHandler> deploymentHandlers;
private ClassLoader classLoader;
private String name;
- public Handler( String name, Set<Entry<String, DeploymentHandler>> deploymentHandlers, ClassLoader classLoader )
+ public Handler( String name, Set<DeploymentHandler> deploymentHandlers, ClassLoader classLoader )
{
this.deploymentHandlers = deploymentHandlers;
this.name = name;
@@ -76,25 +67,21 @@
{
ClassDeploymentHandler classDeploymentHandler = (ClassDeploymentHandler) deploymentHandler;
- if ( hasAnnotations( getClassFile( ),
- classDeploymentHandler.getMetadata( ).getClassAnnotatedWith( ) ) )
+ if ( getClassDescriptor( ).getClazz( ) != null )
{
- if ( getClassDescriptor( ).getClazz( ) != null )
- {
- log.trace( "adding class to deployable list " + name + " for deployment handler " +
- deploymentHandler.getName( ) );
- classDeploymentHandler.getClasses( ).add( getClassDescriptor( ) );
- handled = true;
- } else
- {
- log.info( "skipping class " + name +
- " because it cannot be loaded (may reference a type which is not available on the classpath)" );
- }
+ log.trace( "adding class to deployable list " + name + " for deployment handler " +
+ deploymentHandler.toString() );
+ classDeploymentHandler.getClasses( ).add( getClassDescriptor( ) );
+ handled = true;
+ } else
+ {
+ log.info( "skipping class " + name +
+ " because it cannot be loaded (may reference a type which is not available on the classpath)" );
}
}
} else
{
- if ( name.endsWith( deploymentHandler.getMetadata( ).getFileNameSuffix( ) ) )
+ if ( name.equals ("beans.xml" ) )
{
deploymentHandler.getResources( ).addAll( getAllFileDescriptors( ) );
handled = true;
@@ -110,9 +97,9 @@
boolean handled = false;
- for ( Entry<String, DeploymentHandler> entry : deploymentHandlers )
+ for ( DeploymentHandler entry : deploymentHandlers )
{
- if ( handle( entry.getValue( ) ) )
+ if ( handle( entry ) )
{
handled = true;
}
@@ -121,22 +108,6 @@
return handled;
}
- private ClassFile getClassFile( )
- {
- if ( classFile == null )
- {
- try
- {
- classFile = loadClassFile( name, classLoader );
- } catch ( IOException e )
- {
- throw new RuntimeException( "Error loading class file " + name, e );
- }
- }
-
- return classFile;
- }
-
private ClassDescriptor getClassDescriptor( )
{
if ( classDescriptor == null )
@@ -147,16 +118,6 @@
return classDescriptor;
}
- private FileDescriptor getFileDescriptor( )
- {
- if ( fileDescriptor == null )
- {
- fileDescriptor = new FileDescriptor( name, classLoader );
- }
-
- return fileDescriptor;
- }
-
private Set<FileDescriptor> getAllFileDescriptors( )
{
if ( fileDescriptors == null )
@@ -193,92 +154,16 @@
ClassFile.class.getPackage( ); //to force loading of javassist, throwing an exception if it is missing
}
- protected AbstractScanner( )
- {
- }
-
- protected static boolean hasAnnotations( ClassFile classFile, Set<Class<?extends Annotation>> annotationTypes )
- {
- if ( annotationTypes.size( ) > 0 )
- {
- AnnotationsAttribute visible =
- (AnnotationsAttribute) classFile.getAttribute( AnnotationsAttribute.visibleTag );
-
- if ( visible != null )
- {
- for ( Class<?extends Annotation> annotationType : annotationTypes )
- {
- if ( visible.getAnnotation( annotationType.getName( ) ) != null )
- {
- return true;
- }
- }
- }
- } else
- {
- // If no annotations were specified, don't filter on annotations
- // (note that this differs to the semantics used in Seam, where nothing would be matched)
- return true;
- }
-
- return false;
- }
-
- /**
- * Get a Javassist {@link ClassFile} for a given class name from the classLoader
- */
- protected static ClassFile loadClassFile( String name, ClassLoader classLoader )
- throws IOException
- {
- if ( name == null )
- {
- throw new NullPointerException( "name cannot be null" );
- }
-
- InputStream stream = classLoader.getResourceAsStream( name );
-
- if ( stream == null )
- {
- throw new IllegalStateException( "Cannot load " + name + " from " + classLoader +
- " (using getResourceAsStream() returned null)" );
- }
-
- DataInputStream dstream = new DataInputStream( stream );
-
- try
- {
- return new ClassFile( dstream );
- } finally
- {
- dstream.close( );
- stream.close( );
- }
- }
-
public DeploymentStrategy getDeploymentStrategy( )
{
return deploymentStrategy;
}
- public long getTimestamp( )
- {
- return Long.MAX_VALUE;
- }
-
- protected void handleItem( String name )
- {
- handle( name );
- }
-
protected boolean handle( String name )
{
return new Handler( name,
- deploymentStrategy.getDeploymentHandlers( ).entrySet( ),
+ deploymentStrategy.getDeploymentHandlers( ),
deploymentStrategy.getClassLoader( ) ).handle( );
}
- public void scanDirectories( File[] directories, File[] excludedDirectories )
- {
- scanDirectories( directories );
- }
}
Modified: extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/ClassDeploymentHandler.java
===================================================================
--- extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/ClassDeploymentHandler.java 2009-03-01 20:31:32 UTC (rev 1748)
+++ extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/ClassDeploymentHandler.java 2009-03-01 22:13:29 UTC (rev 1749)
@@ -21,8 +21,6 @@
public interface ClassDeploymentHandler
extends DeploymentHandler
{
- public ClassDeploymentMetadata getMetadata( );
-
public Set<ClassDescriptor> getClasses( );
public void setClasses( Set<ClassDescriptor> classes );
Modified: extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/ClassDeploymentMetadata.java
===================================================================
--- extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/ClassDeploymentMetadata.java 2009-03-01 20:31:32 UTC (rev 1748)
+++ extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/ClassDeploymentMetadata.java 2009-03-01 22:13:29 UTC (rev 1749)
@@ -22,14 +22,5 @@
public interface ClassDeploymentMetadata
extends DeploymentMetadata
{
- /**
- * An array of class annotations this deployment handler is interested in
- *
- * All classes with any of these annotations should be considered part of the
- * match
- *
- * If this set is empty then all classes will be matched, whether they
- * have annotations or not.
- */
- public Set<Class<?extends Annotation>> getClassAnnotatedWith( );
+
}
Modified: extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/DeploymentHandler.java
===================================================================
--- extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/DeploymentHandler.java 2009-03-01 20:31:32 UTC (rev 1748)
+++ extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/DeploymentHandler.java 2009-03-01 22:13:29 UTC (rev 1749)
@@ -29,20 +29,7 @@
*/
public interface DeploymentHandler
{
- /**
- * A key used to identify the deployment handler
- */
- public String getName( );
- /**
- * Get DeploymentHandlerMetadata for resources this deployment handler is
- * interested in processing.
- *
- * If a deployment handler is interested in a number of files it should
- * define multiple pieces of metadata
- */
- public DeploymentMetadata getMetadata( );
-
public Set<FileDescriptor> getResources( );
public void setResources( Set<FileDescriptor> resources );
Modified: extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/DeploymentStrategy.java
===================================================================
--- extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/DeploymentStrategy.java 2009-03-01 20:31:32 UTC (rev 1748)
+++ extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/DeploymentStrategy.java 2009-03-01 22:13:29 UTC (rev 1749)
@@ -23,10 +23,9 @@
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
-import java.util.HashMap;
+import java.util.HashSet;
import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
+import java.util.Set;
/**
* A {@link DeploymentStrategy} coordinates the deployment of resources for a
@@ -40,7 +39,7 @@
private static final LogProvider log = Logging.getLogProvider( DeploymentStrategy.class );
private Scanner scanner;
private List<File> files = new ArrayList<File>( );
- private Map<String, DeploymentHandler> deploymentHandlers;
+ private Set<DeploymentHandler> deploymentHandlers;
/**
* The key under which to list possible scanners. System properties take
@@ -85,7 +84,7 @@
* Implementations of {@link DeploymentStrategy} may add default
* {@link DeploymentHandler}s
*/
- public Map<String, DeploymentHandler> getDeploymentHandlers( )
+ public Set<DeploymentHandler> getDeploymentHandlers( )
{
if ( deploymentHandlers == null )
{
@@ -97,15 +96,10 @@
private void initDeploymentHandlers( )
{
- this.deploymentHandlers = new HashMap<String, DeploymentHandler>( );
+ this.deploymentHandlers = new HashSet<DeploymentHandler>( );
- List<String> deploymentHandlersClassNames =
- new WebBeansDeploymentProperties( getClassLoader( ) ).getPropertyValues( getDeploymentHandlersKey( ) );
- addHandlers( deploymentHandlersClassNames );
}
- protected abstract String getDeploymentHandlersKey( );
-
protected void initScanner( )
{
List<String> scanners =
@@ -173,50 +167,6 @@
return null;
}
- private void addHandlers( List<String> handlers )
- {
- for ( String handler : handlers )
- {
- addHandler( handler );
- }
- }
-
- private void addHandler( String className )
- {
- DeploymentHandler deploymentHandler = instantiateDeploymentHandler( className );
-
- if ( deploymentHandler != null )
- {
- log.debug( "Adding " + deploymentHandler + " as a deployment handler" );
- deploymentHandlers.put( deploymentHandler.getName( ),
- deploymentHandler );
- }
- }
-
- private DeploymentHandler instantiateDeploymentHandler( String className )
- {
- try
- {
- Class<DeploymentHandler> clazz = (Class<DeploymentHandler>) getClassLoader( ).loadClass( className );
-
- return clazz.newInstance( );
- } catch ( ClassNotFoundException e )
- {
- log.trace( "Unable to use " + className + " as a deployment handler (class not found)", e );
- } catch ( NoClassDefFoundError e )
- {
- log.trace( "Unable to use " + className + " as a deployment handler (dependency not found)", e );
- } catch ( InstantiationException e )
- {
- log.trace( "Unable to instantiate deployment handler " + className, e );
- } catch ( IllegalAccessException e )
- {
- log.trace( "Unable to instantiate deployment handler " + className, e );
- }
-
- return null;
- }
-
public List<File> getFiles( )
{
return files;
@@ -227,9 +177,4 @@
this.files = files;
}
- public long getTimestamp( )
- {
- return getScanner( ).getTimestamp( );
- }
-
}
Modified: extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/Scanner.java
===================================================================
--- extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/Scanner.java 2009-03-01 20:31:32 UTC (rev 1748)
+++ extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/Scanner.java 2009-03-01 22:13:29 UTC (rev 1749)
@@ -29,21 +29,13 @@
public interface Scanner
{
/**
- * Recursively scan directories, skipping directories in the exclusion list.
+ * Recursively scan directories.
*
* @param directories An array of the roots of the directory trees to scan
*/
public void scanDirectories( File[] directories );
/**
- * Recursively scan directories, skipping directories in the exclusion list.
- *
- * @param directories An array of the roots of the directory trees to scan
- * @param excludedDirectories Directories to skip over during the recursive scan
- */
- public void scanDirectories( File[] directories, File[] excludedDirectories );
-
- /**
* Scan for structures which contain any of the given resources in their root
*
* @param resources The resources to scan for
@@ -55,5 +47,4 @@
*/
public DeploymentStrategy getDeploymentStrategy( );
- public long getTimestamp( );
}
Modified: extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/SimpleWebBeansDeploymentHandler.java
===================================================================
--- extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/SimpleWebBeansDeploymentHandler.java 2009-03-01 20:31:32 UTC (rev 1748)
+++ extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/SimpleWebBeansDeploymentHandler.java 2009-03-01 22:13:29 UTC (rev 1749)
@@ -16,10 +16,6 @@
*/
package org.jboss.webbeans.environment.se.deployment;
-import java.lang.annotation.Annotation;
-import java.util.Collections;
-import java.util.Set;
-
/**
* The {@link SimpleWebBeansDeploymentHandler} processes all classes found in a
* Web Beans archive/folder.
@@ -31,32 +27,4 @@
public class SimpleWebBeansDeploymentHandler
extends AbstractClassDeploymentHandler
{
- public static ClassDeploymentMetadata NAME_ANNOTATED_CLASS_METADATA =
- new ClassDeploymentMetadata( )
- {
- public Set<Class<?extends Annotation>> getClassAnnotatedWith( )
- {
- return Collections.EMPTY_SET;
- }
-
- public String getFileNameSuffix( )
- {
- return null;
- }
- };
-
- /**
- * Name under which this {@link DeploymentHandler} is registered
- */
- public static final String NAME = "org.jboss.webbeans.environment.se.deployment.SimpleWebBeansDeploymentHandler";
-
- public String getName( )
- {
- return NAME;
- }
-
- public ClassDeploymentMetadata getMetadata( )
- {
- return NAME_ANNOTATED_CLASS_METADATA;
- }
}
Modified: extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/StandardDeploymentStrategy.java
===================================================================
--- extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/StandardDeploymentStrategy.java 2009-03-01 20:31:32 UTC (rev 1748)
+++ extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/StandardDeploymentStrategy.java 2009-03-01 22:13:29 UTC (rev 1749)
@@ -38,19 +38,6 @@
*/
public static final String[] RESOURCE_NAMES = { "beans.xml" };
- /**
- * The contextual variable name this deployment strategy is made available at
- * during Seam startup.
- */
- public static final String NAME = "deploymentStrategy";
-
- /**
- * The key under which to list extra deployment handlers.
- *
- * This can be specified as a System property or in
- * /META-INF/seam-deployment.properties
- */
- public static final String HANDLERS_KEY = "org.jboss.webbeans.environment.se.deployment.deploymentHandlers";
private SimpleWebBeansDeploymentHandler simpleWebBeansDeploymentHandler;
private WebBeansXmlDeploymentHandler webBeansXmlDeploymentHandler;
@@ -61,9 +48,9 @@
{
this.classLoader = Thread.currentThread( ).getContextClassLoader( );
simpleWebBeansDeploymentHandler = new SimpleWebBeansDeploymentHandler( );
- getDeploymentHandlers( ).put( SimpleWebBeansDeploymentHandler.NAME, simpleWebBeansDeploymentHandler );
+ getDeploymentHandlers( ).add( simpleWebBeansDeploymentHandler );
webBeansXmlDeploymentHandler = new WebBeansXmlDeploymentHandler( );
- getDeploymentHandlers( ).put( WebBeansXmlDeploymentHandler.NAME, webBeansXmlDeploymentHandler );
+ getDeploymentHandlers( ).add( webBeansXmlDeploymentHandler );
}
@Override
@@ -72,12 +59,6 @@
return classLoader;
}
- @Override
- protected String getDeploymentHandlersKey( )
- {
- return HANDLERS_KEY;
- }
-
/**
* Get all annotated components known to this strategy
*/
@@ -104,13 +85,4 @@
getScanner( ).scanDirectories( getFiles( ).toArray( new File[0] ) );
}
- // TODO (PR): what's the equivalent for Web Beans?
-// public static StandardDeploymentStrategy instance()
-// {
-// if (Contexts.getEventContext().isSet(NAME))
-// {
-// return (StandardDeploymentStrategy) Contexts.getEventContext().get(NAME);
-// }
-// return null;
-// }
}
Modified: extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/URLScanner.java
===================================================================
--- extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/URLScanner.java 2009-03-01 20:31:32 UTC (rev 1748)
+++ extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/URLScanner.java 2009-03-01 22:13:29 UTC (rev 1749)
@@ -44,25 +44,18 @@
extends AbstractScanner
{
private static final LogProvider log = Logging.getLogProvider( URLScanner.class );
- private long timestamp;
public URLScanner( DeploymentStrategy deploymentStrategy )
{
super( deploymentStrategy );
}
+ @Override
public void scanDirectories( File[] directories )
{
- scanDirectories( directories,
- new File[0] );
- }
-
- @Override
- public void scanDirectories( File[] directories, File[] excludedDirectories )
- {
for ( File directory : directories )
{
- handleDirectory( directory, null, excludedDirectories );
+ handleDirectory( directory, null );
}
}
@@ -145,7 +138,6 @@
try
{
log.trace( "archive: " + file );
- touchTimestamp( file );
ZipFile zip = new ZipFile( file );
Enumeration<?extends ZipEntry> entries = zip.entries( );
@@ -192,26 +184,10 @@
handleDirectory( child, newPath, excludedDirectories );
} else
{
- if ( handle( newPath ) )
- {
- // only try to update the timestamp on this scanner if the file was actually handled
- touchTimestamp( child );
- }
+ handle( newPath );
}
}
}
- private void touchTimestamp( File file )
- {
- if ( file.lastModified( ) > timestamp )
- {
- timestamp = file.lastModified( );
- }
- }
- @Override
- public long getTimestamp( )
- {
- return timestamp;
- }
}
Modified: extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/WebBeansXmlDeploymentHandler.java
===================================================================
--- extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/WebBeansXmlDeploymentHandler.java 2009-03-01 20:31:32 UTC (rev 1748)
+++ extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/WebBeansXmlDeploymentHandler.java 2009-03-01 22:13:29 UTC (rev 1749)
@@ -26,27 +26,5 @@
public class WebBeansXmlDeploymentHandler
extends AbstractDeploymentHandler
{
- private static DeploymentMetadata WEBBEANSXML_SUFFIX_FILE_METADATA =
- new DeploymentMetadata( )
- {
- public String getFileNameSuffix( )
- {
- return "beans.xml";
- }
- };
- /**
- * Name under which this {@link DeploymentHandler} is registered
- */
- public static final String NAME = "org.jboss.webbeans.environment.se.deployment.WebBeansXmlDeploymentHandler";
-
- public String getName( )
- {
- return NAME;
- }
-
- public DeploymentMetadata getMetadata( )
- {
- return WEBBEANSXML_SUFFIX_FILE_METADATA;
- }
}
Copied: extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/lifecycle/ApplicationLifecycle.java (from rev 1747, extensions/trunk/se/src/main/java/org/jboss/webbeans/lifecycle/ApplicationLifecycle.java)
===================================================================
--- extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/lifecycle/ApplicationLifecycle.java (rev 0)
+++ extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/lifecycle/ApplicationLifecycle.java 2009-03-01 22:13:29 UTC (rev 1749)
@@ -0,0 +1,86 @@
+/**
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.environment.se.lifecycle;
+
+import org.jboss.webbeans.CurrentManager;
+import org.jboss.webbeans.ManagerImpl;
+import org.jboss.webbeans.context.ApplicationContext;
+import org.jboss.webbeans.context.DependentContext;
+import org.jboss.webbeans.context.api.BeanStore;
+import org.jboss.webbeans.environment.se.events.Shutdown;
+import org.jboss.webbeans.log.Log;
+import org.jboss.webbeans.log.Logging;
+
+/**
+ * Implements the lifecycle methods for a WebBeans SE application.
+ * @author Peter Royle
+ */
+public class ApplicationLifecycle
+{
+
+ private static ApplicationLifecycle instance;
+ Log log = Logging.getLog( ApplicationLifecycle.class );
+
+
+ static
+ {
+ instance = new ApplicationLifecycle();
+ }
+
+ public static ApplicationLifecycle instance()
+ {
+ return instance;
+ }
+
+ public void initialize()
+ {
+ ManagerImpl manager = CurrentManager.rootManager();
+ if (manager == null)
+ {
+ throw new IllegalStateException( "Manager has not been initialized, " +
+ "check that Bootstrap.initialize() has run" );
+ }
+ manager.addContext( DependentContext.create() );
+ manager.addContext( ApplicationContext.create() );
+ }
+
+ public void beginApplication( String id, BeanStore applicationBeanStore )
+ {
+ log.trace( "Starting application " + id );
+ ApplicationContext.INSTANCE.setBeanStore( applicationBeanStore );
+ ApplicationContext.INSTANCE.setActive( true );
+ // TODO (PR): I have no idea if this is OK??? The WB spec says that the
+ // dependant scoe is only active when the manager is doing its work.
+ // This leaves it open for the whole duration. I guess that's about
+ // right since the main bean is in the dependant scope?
+ DependentContext.INSTANCE.setActive( true );
+ }
+
+ public void endApplication( String id, BeanStore applicationBeanStore )
+ {
+ log.trace( "Ending application " + id );
+
+ // Give apps and modules a chance to shutdown cleanly
+ CurrentManager.rootManager().fireEvent( new Shutdown() );
+
+ ApplicationContext.INSTANCE.destroy();
+ ApplicationContext.INSTANCE.setActive( false );
+ ApplicationContext.INSTANCE.setBeanStore( null );
+
+ }
+
+}
Property changes on: extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/lifecycle/ApplicationLifecycle.java
___________________________________________________________________
Name: svn:mergeinfo
+
Deleted: extensions/trunk/se/src/main/java/org/jboss/webbeans/lifecycle/ApplicationLifecycle.java
===================================================================
--- extensions/trunk/se/src/main/java/org/jboss/webbeans/lifecycle/ApplicationLifecycle.java 2009-03-01 20:31:32 UTC (rev 1748)
+++ extensions/trunk/se/src/main/java/org/jboss/webbeans/lifecycle/ApplicationLifecycle.java 2009-03-01 22:13:29 UTC (rev 1749)
@@ -1,86 +0,0 @@
-/**
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.lifecycle;
-
-import org.jboss.webbeans.CurrentManager;
-import org.jboss.webbeans.ManagerImpl;
-import org.jboss.webbeans.context.ApplicationContext;
-import org.jboss.webbeans.context.DependentContext;
-import org.jboss.webbeans.context.api.BeanStore;
-import org.jboss.webbeans.environment.se.events.Shutdown;
-import org.jboss.webbeans.log.Log;
-import org.jboss.webbeans.log.Logging;
-
-/**
- * Implements the lifecycle methods for a WebBeans SE application.
- * @author Peter Royle
- */
-public class ApplicationLifecycle
-{
-
- private static ApplicationLifecycle instance;
- Log log = Logging.getLog( ApplicationLifecycle.class );
-
-
- static
- {
- instance = new ApplicationLifecycle();
- }
-
- public static ApplicationLifecycle instance()
- {
- return instance;
- }
-
- public void initialize()
- {
- ManagerImpl manager = CurrentManager.rootManager();
- if (manager == null)
- {
- throw new IllegalStateException( "Manager has not been initialized, " +
- "check that Bootstrap.initialize() has run" );
- }
- manager.addContext( DependentContext.create() );
- manager.addContext( ApplicationContext.create() );
- }
-
- public void beginApplication( String id, BeanStore applicationBeanStore )
- {
- log.trace( "Starting application " + id );
- ApplicationContext.INSTANCE.setBeanStore( applicationBeanStore );
- ApplicationContext.INSTANCE.setActive( true );
- // TODO (PR): I have no idea if this is OK??? The WB spec says that the
- // dependant scoe is only active when the manager is doing its work.
- // This leaves it open for the whole duration. I guess that's about
- // right since the main bean is in the dependant scope?
- DependentContext.INSTANCE.setActive( true );
- }
-
- public void endApplication( String id, BeanStore applicationBeanStore )
- {
- log.trace( "Ending application " + id );
-
- // Give apps and modules a chance to shutdown cleanly
- CurrentManager.rootManager().fireEvent( new Shutdown() );
-
- ApplicationContext.INSTANCE.destroy();
- ApplicationContext.INSTANCE.setActive( false );
- ApplicationContext.INSTANCE.setBeanStore( null );
-
- }
-
-}
15 years, 10 months
[webbeans-commits] Webbeans SVN: r1748 - examples/trunk/se/hello-world.
by webbeans-commits@lists.jboss.org
Author: peteroyle
Date: 2009-03-01 15:31:32 -0500 (Sun, 01 Mar 2009)
New Revision: 1748
Modified:
examples/trunk/se/hello-world/pom.xml
Log:
Changed version of se-module from 1.0-SNAPSHOT to 1.0.0-SNAPSHOT.
Modified: examples/trunk/se/hello-world/pom.xml
===================================================================
--- examples/trunk/se/hello-world/pom.xml 2009-03-01 20:30:48 UTC (rev 1747)
+++ examples/trunk/se/hello-world/pom.xml 2009-03-01 20:31:32 UTC (rev 1748)
@@ -8,6 +8,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.webbeans</groupId>
<artifactId>hello-world-se</artifactId>
+ <packaging>jar</packaging>
<name>Hello World SE</name>
<url>http://maven.apache.org</url>
@@ -99,7 +100,7 @@
<dependency>
<groupId>org.jboss.webbeans</groupId>
<artifactId>se-module</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
15 years, 10 months
[webbeans-commits] Webbeans SVN: r1747 - in extensions/trunk/se: src/main/java/org/jboss/webbeans/environment/se and 8 other directories.
by webbeans-commits@lists.jboss.org
Author: peteroyle
Date: 2009-03-01 15:30:48 -0500 (Sun, 01 Mar 2009)
New Revision: 1747
Added:
extensions/trunk/se/src/test/java/org/
extensions/trunk/se/src/test/java/org/jboss/
extensions/trunk/se/src/test/java/org/jboss/webbeans/
extensions/trunk/se/src/test/java/org/jboss/webbeans/environment/
extensions/trunk/se/src/test/java/org/jboss/webbeans/environment/se/
Modified:
extensions/trunk/se/pom.xml
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/StartMain.java
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/boot/WebBeansBootstrap.java
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/AbstractDeploymentHandler.java
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/DeploymentHandler.java
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/DeploymentStrategy.java
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/StandardDeploymentStrategy.java
extensions/trunk/se/src/main/java/org/jboss/webbeans/lifecycle/ApplicationLifecycle.java
Log:
Added shutdown lifecycle event and moved lifecycle into WebBeansBootstrap. Removed postProcess method which is unused from DeploymentHandler.
Modified: extensions/trunk/se/pom.xml
===================================================================
--- extensions/trunk/se/pom.xml 2009-03-01 20:30:41 UTC (rev 1746)
+++ extensions/trunk/se/pom.xml 2009-03-01 20:30:48 UTC (rev 1747)
@@ -8,6 +8,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.webbeans</groupId>
<artifactId>se-module</artifactId>
+ <packaging>jar</packaging>
<name>Web Beans SE Module</name>
<url>http://maven.apache.org</url>
<build>
@@ -99,14 +100,12 @@
<dependency>
<groupId>org.jboss.webbeans</groupId>
<artifactId>webbeans-ri-spi</artifactId>
- <version>1.0.0-SNAPSHOT</version>
</dependency>
<!-- TODO (PR): remove this dependency -->
<dependency>
<groupId>org.jboss.webbeans</groupId>
<artifactId>webbeans-ri</artifactId>
- <version>1.0.0-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>javax.el</groupId>
@@ -125,7 +124,6 @@
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
- <version>1.0.1B</version>
</dependency>
</dependencies>
Modified: extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/StartMain.java
===================================================================
--- extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/StartMain.java 2009-03-01 20:30:41 UTC (rev 1746)
+++ extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/StartMain.java 2009-03-01 20:30:48 UTC (rev 1747)
@@ -16,9 +16,8 @@
*/
package org.jboss.webbeans.environment.se;
-import org.jboss.webbeans.context.beanstore.SimpleBeanStore;
+import org.jboss.webbeans.context.api.helpers.ConcurrentHashMapBeanStore;
import org.jboss.webbeans.environment.se.boot.WebBeansBootstrap;
-import org.jboss.webbeans.lifecycle.ApplicationLifecycle;
/**
* This is the main class that should always be called from the command
@@ -44,14 +43,9 @@
webBeansBootstrap.initialize();
- ApplicationLifecycle lifecycle = ApplicationLifecycle.instance();
- lifecycle.initialize();
- final SimpleBeanStore appBeanStore = new SimpleBeanStore();
- lifecycle.beginApplication( "TODO: application id?", appBeanStore );
-
webBeansBootstrap.boot();
- lifecycle.endApplication( "TODO: application id?", appBeanStore );
+ webBeansBootstrap.shutdown();
}
Modified: extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/boot/WebBeansBootstrap.java
===================================================================
--- extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/boot/WebBeansBootstrap.java 2009-03-01 20:30:41 UTC (rev 1746)
+++ extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/boot/WebBeansBootstrap.java 2009-03-01 20:30:48 UTC (rev 1747)
@@ -28,9 +28,12 @@
import org.jboss.webbeans.bootstrap.BeanDeployer;
import org.jboss.webbeans.bootstrap.BeansXmlParser;
import org.jboss.webbeans.bootstrap.api.helpers.AbstractBootstrap;
+import org.jboss.webbeans.context.api.helpers.ConcurrentHashMapBeanStore;
+import org.jboss.webbeans.context.api.BeanStore;
import org.jboss.webbeans.environment.se.beans.ParametersFactory;
import org.jboss.webbeans.environment.se.discovery.WebBeanDiscoveryImpl;
import org.jboss.webbeans.environment.se.resources.DefaultResourceLoader;
+import org.jboss.webbeans.lifecycle.ApplicationLifecycle;
import org.jboss.webbeans.literal.DeployedLiteral;
import org.jboss.webbeans.literal.InitializedLiteral;
import org.jboss.webbeans.log.Log;
@@ -47,6 +50,8 @@
Log log = Logging.getLog( WebBeansBootstrap.class );
String[] commandLineArgs;
private ManagerImpl manager;
+ ApplicationLifecycle lifecycle = ApplicationLifecycle.instance();
+ final BeanStore appBeanStore = new ConcurrentHashMapBeanStore();
public WebBeansBootstrap( String[] commandLineArgs )
{
@@ -77,6 +82,7 @@
}
this.manager = new ManagerImpl( getNamingContext(), getEjbResolver(), getResourceLoader() );
CurrentManager.setRootManager( manager );
+ lifecycle.initialize();
}
@@ -108,6 +114,9 @@
{
throw new IllegalStateException( "ResourceLoader not set" );
}
+
+ lifecycle.beginApplication( "TODO: application id?", appBeanStore );
+
BeansXmlParser parser = new BeansXmlParser( getResourceLoader(), getWebBeanDiscovery().discoverWebBeansXml() );
parser.parse();
List<Class<? extends Annotation>> enabledDeploymentTypes = parser.getEnabledDeploymentTypes();
@@ -145,4 +154,10 @@
beanDeployer.addClass( Transaction.class );
beanDeployer.deploy();
}
+
+ public void shutdown()
+ {
+ lifecycle.endApplication( "TODO: application id?", appBeanStore );
+ }
+
}
Modified: extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/AbstractDeploymentHandler.java
===================================================================
--- extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/AbstractDeploymentHandler.java 2009-03-01 20:30:41 UTC (rev 1746)
+++ extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/AbstractDeploymentHandler.java 2009-03-01 20:30:48 UTC (rev 1747)
@@ -51,7 +51,4 @@
return resources;
}
- public void postProcess( ClassLoader classLoader )
- {
- }
}
Modified: extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/DeploymentHandler.java
===================================================================
--- extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/DeploymentHandler.java 2009-03-01 20:30:41 UTC (rev 1746)
+++ extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/DeploymentHandler.java 2009-03-01 20:30:48 UTC (rev 1747)
@@ -43,8 +43,6 @@
*/
public DeploymentMetadata getMetadata( );
- public void postProcess( ClassLoader classLoader );
-
public Set<FileDescriptor> getResources( );
public void setResources( Set<FileDescriptor> resources );
Modified: extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/DeploymentStrategy.java
===================================================================
--- extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/DeploymentStrategy.java 2009-03-01 20:30:41 UTC (rev 1746)
+++ extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/DeploymentStrategy.java 2009-03-01 20:30:48 UTC (rev 1747)
@@ -232,11 +232,4 @@
return getScanner( ).getTimestamp( );
}
- protected void postScan( )
- {
- for ( Entry<String, DeploymentHandler> entry : getDeploymentHandlers( ).entrySet( ) )
- {
- entry.getValue( ).postProcess( getClassLoader( ) );
- }
- }
}
Modified: extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/StandardDeploymentStrategy.java
===================================================================
--- extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/StandardDeploymentStrategy.java 2009-03-01 20:30:41 UTC (rev 1746)
+++ extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/deployment/StandardDeploymentStrategy.java 2009-03-01 20:30:48 UTC (rev 1747)
@@ -102,7 +102,6 @@
{
getScanner( ).scanResources( RESOURCE_NAMES );
getScanner( ).scanDirectories( getFiles( ).toArray( new File[0] ) );
- postScan( );
}
// TODO (PR): what's the equivalent for Web Beans?
Modified: extensions/trunk/se/src/main/java/org/jboss/webbeans/lifecycle/ApplicationLifecycle.java
===================================================================
--- extensions/trunk/se/src/main/java/org/jboss/webbeans/lifecycle/ApplicationLifecycle.java 2009-03-01 20:30:41 UTC (rev 1746)
+++ extensions/trunk/se/src/main/java/org/jboss/webbeans/lifecycle/ApplicationLifecycle.java 2009-03-01 20:30:48 UTC (rev 1747)
@@ -82,4 +82,5 @@
ApplicationContext.INSTANCE.setBeanStore( null );
}
+
}
15 years, 10 months
[webbeans-commits] Webbeans SVN: r1746 - extensions/trunk/se/src/test/java.
by webbeans-commits@lists.jboss.org
Author: peteroyle
Date: 2009-03-01 15:30:41 -0500 (Sun, 01 Mar 2009)
New Revision: 1746
Removed:
extensions/trunk/se/src/test/java/com/
Log:
Added shutdown lifecycle event and moved lifecycle into WebBeansBootstrap. Removed postProcess method which is unused from DeploymentHandler.
15 years, 10 months
[webbeans-commits] Webbeans SVN: r1745 - doc/trunk/reference/pt-BR.
by webbeans-commits@lists.jboss.org
Author: jpviragine
Date: 2009-02-28 19:42:05 -0500 (Sat, 28 Feb 2009)
New Revision: 1745
Modified:
doc/trunk/reference/pt-BR/Author_Group.po
doc/trunk/reference/pt-BR/Book_Info.po
doc/trunk/reference/pt-BR/decorators.po
doc/trunk/reference/pt-BR/ee.po
doc/trunk/reference/pt-BR/events.po
doc/trunk/reference/pt-BR/example.po
doc/trunk/reference/pt-BR/extend.po
doc/trunk/reference/pt-BR/injection.po
doc/trunk/reference/pt-BR/interceptors.po
doc/trunk/reference/pt-BR/intro.po
doc/trunk/reference/pt-BR/master.po
doc/trunk/reference/pt-BR/next.po
doc/trunk/reference/pt-BR/part1.po
doc/trunk/reference/pt-BR/part2.po
doc/trunk/reference/pt-BR/part3.po
doc/trunk/reference/pt-BR/part4.po
doc/trunk/reference/pt-BR/producermethods.po
doc/trunk/reference/pt-BR/ri-spi.po
doc/trunk/reference/pt-BR/ri.po
doc/trunk/reference/pt-BR/scopescontexts.po
doc/trunk/reference/pt-BR/specialization.po
doc/trunk/reference/pt-BR/stereotypes.po
doc/trunk/reference/pt-BR/xml.po
Log:
Initial translation of properties files for Brazilian Portuguese
Modified: doc/trunk/reference/pt-BR/Author_Group.po
===================================================================
--- doc/trunk/reference/pt-BR/Author_Group.po 2009-02-28 14:04:13 UTC (rev 1744)
+++ doc/trunk/reference/pt-BR/Author_Group.po 2009-03-01 00:42:05 UTC (rev 1745)
@@ -6,8 +6,8 @@
"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-02-01 21:16+0000\n"
-"PO-Revision-Date: 2009-01-06 11:30+0000\n"
-"Last-Translator: Automatically generated\n"
+"PO-Revision-Date: 2009-02-28 15:09-0300\n"
+"Last-Translator: João Paulo Viragine <joao.viragine(a)redhat.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -17,86 +17,86 @@
#: Author_Group.xml:4
#, no-c-format
msgid "<firstname>Gavin</firstname> <surname>King</surname>"
-msgstr ""
+msgstr "<firstname>Gavin</firstname> <surname>King</surname>"
#. Tag: affiliation
#: Author_Group.xml:7
#, no-c-format
-msgid ""
-"<jobtitle>JSR-299 specification lead</jobtitle> <orgname>Red Hat Middleware "
-"LLC</orgname>"
-msgstr ""
+msgid "<jobtitle>JSR-299 specification lead</jobtitle> <orgname>Red Hat Middleware LLC</orgname>"
+msgstr "<jobtitle>JSR-299 specification lead</jobtitle> <orgname>Red Hat Middleware LLC</orgname>"
#. Tag: author
#: Author_Group.xml:12
#, no-c-format
msgid "<firstname>Pete</firstname> <surname>Muir</surname>"
-msgstr ""
+msgstr "<firstname>Pete</firstname> <surname>Muir</surname>"
#. Tag: affiliation
#: Author_Group.xml:15
#, no-c-format
-msgid ""
-"<jobtitle>Web Beans (JSR-299 Reference Implementation) lead </jobtitle> "
-"<orgname>Red Hat Middleware LLC</orgname>"
-msgstr ""
+msgid "<jobtitle>Web Beans (JSR-299 Reference Implementation) lead </jobtitle> <orgname>Red Hat Middleware LLC</orgname>"
+msgstr "<jobtitle>Web Beans (JSR-299 Reference Implementation) lead </jobtitle> <orgname>Red Hat Middleware LLC</orgname>"
#. Tag: othercredit
#: Author_Group.xml:21
#, no-c-format
msgid "<firstname>Nicola</firstname> <surname>Benaglia</surname>"
-msgstr ""
+msgstr "<firstname>Nicola</firstname> <surname>Benaglia</surname>"
#. Tag: contrib
-#: Author_Group.xml:24 Author_Group.xml:53
+#: Author_Group.xml:24
+#: Author_Group.xml:53
#, no-c-format
msgid "Italian Translation"
-msgstr ""
+msgstr "Italian Translation"
#. Tag: othercredit
#: Author_Group.xml:26
#, no-c-format
msgid "<firstname>Gladys</firstname> <surname>Guerrero</surname>"
-msgstr ""
+msgstr "<firstname>Gladys</firstname> <surname>Guerrero</surname>"
#. Tag: contrib
#: Author_Group.xml:29
#, no-c-format
msgid "Spanish Translation"
-msgstr ""
+msgstr "Spanish Translation"
#. Tag: orgname
-#: Author_Group.xml:31 Author_Group.xml:39 Author_Group.xml:47
+#: Author_Group.xml:31
+#: Author_Group.xml:39
+#: Author_Group.xml:47
#, no-c-format
msgid "Red Hat Middleware LLC"
-msgstr ""
+msgstr "Red Hat Middleware LLC"
#. Tag: othercredit
#: Author_Group.xml:34
#, no-c-format
msgid "<firstname>Eun-Ju</firstname> <surname>Ki,</surname>"
-msgstr ""
+msgstr "<firstname>Eun-Ju</firstname> <surname>Ki,</surname>"
#. Tag: contrib
#: Author_Group.xml:37
#, no-c-format
msgid "Korean Translation"
-msgstr ""
+msgstr "Korean Translation"
#. Tag: othercredit
#: Author_Group.xml:42
#, no-c-format
msgid "<firstname>Terry</firstname> <surname>Chuang</surname>"
-msgstr ""
+msgstr "<firstname>Terry</firstname> <surname>Chuang</surname>"
#. Tag: contrib
#: Author_Group.xml:45
#, no-c-format
msgid "Traditional Chinese Translation"
-msgstr ""
+msgstr "Traditional Chinese Translation"
#. Tag: othercredit
#: Author_Group.xml:50
#, no-c-format
msgid "<firstname>Francesco</firstname> <surname>Milesi</surname>"
-msgstr ""
+msgstr "<firstname>Francesco</firstname> <surname>Milesi</surname>"
+
Modified: doc/trunk/reference/pt-BR/Book_Info.po
===================================================================
--- doc/trunk/reference/pt-BR/Book_Info.po 2009-02-28 14:04:13 UTC (rev 1744)
+++ doc/trunk/reference/pt-BR/Book_Info.po 2009-03-01 00:42:05 UTC (rev 1745)
@@ -6,8 +6,8 @@
"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-02-01 21:16+0000\n"
-"PO-Revision-Date: 2009-01-06 11:30+0000\n"
-"Last-Translator: Automatically generated\n"
+"PO-Revision-Date: 2009-02-28 15:08-0300\n"
+"Last-Translator: João Paulo Viragine <joao.viragine(a)redhat.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -17,11 +17,11 @@
#: Book_Info.xml:4
#, no-c-format
msgid "Web Beans: Java Contexts and Dependency Injection"
-msgstr ""
+msgstr "Web Beans: Contextos Java e Injeção de Dependências"
#. Tag: subtitle
#: Book_Info.xml:5
#, no-c-format
-msgid ""
-"The new standard for dependency injection and contextual state management"
-msgstr ""
+msgid "The new standard for dependency injection and contextual state management"
+msgstr "O novo padrão para injeção de dependências e gerenciamento de estado contextual"
+
Modified: doc/trunk/reference/pt-BR/decorators.po
===================================================================
--- doc/trunk/reference/pt-BR/decorators.po 2009-02-28 14:04:13 UTC (rev 1744)
+++ doc/trunk/reference/pt-BR/decorators.po 2009-03-01 00:42:05 UTC (rev 1745)
@@ -6,8 +6,8 @@
"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-06 11:30+0000\n"
-"PO-Revision-Date: 2009-01-06 11:30+0000\n"
-"Last-Translator: Automatically generated\n"
+"PO-Revision-Date: 2009-02-28 15:07-0300\n"
+"Last-Translator: João Paulo Viragine <joao.viragine(a)redhat.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -17,38 +17,25 @@
#: decorators.xml:4
#, no-c-format
msgid "Decorators"
-msgstr ""
+msgstr "Decoradores"
#. Tag: para
#: decorators.xml:6
#, no-c-format
-msgid ""
-"Interceptors are a powerful way to capture and separate concerns which are "
-"<emphasis>orthogonal</emphasis> to the type system. Any interceptor is able "
-"to intercept invocations of any Java type. This makes them perfect for "
-"solving technical concerns such as transaction management and security. "
-"However, by nature, interceptors are unaware of the actual semantics of the "
-"events they intercept. Thus, interceptors aren't an appropriate tool for "
-"separating business-related concerns."
-msgstr ""
+msgid "Interceptors are a powerful way to capture and separate concerns which are <emphasis>orthogonal</emphasis> to the type system. Any interceptor is able to intercept invocations of any Java type. This makes them perfect for solving technical concerns such as transaction management and security. However, by nature, interceptors are unaware of the actual semantics of the events they intercept. Thus, interceptors aren't an appropriate tool for separating business-related concerns."
+msgstr "Interceptadores são uma maneira poderosa de capturar e separar"
#. Tag: para
#: decorators.xml:14
#, no-c-format
-msgid ""
-"The reverse is true of <emphasis>decorators</emphasis>. A decorator "
-"intercepts invocations only for a certain Java interface, and is therefore "
-"aware of all the semantics attached to that interface. This makes decorators "
-"a perfect tool for modeling some kinds of business concerns. It also means "
-"that a decorator doesn't have the generality of an interceptor. Decorators "
-"aren't able to solve technical concerns that cut across many disparate types."
-msgstr ""
+msgid "The reverse is true of <emphasis>decorators</emphasis>. A decorator intercepts invocations only for a certain Java interface, and is therefore aware of all the semantics attached to that interface. This makes decorators a perfect tool for modeling some kinds of business concerns. It also means that a decorator doesn't have the generality of an interceptor. Decorators aren't able to solve technical concerns that cut across many disparate types."
+msgstr "O contrário é verdadeiro <emphasis>decoradores (decorators)</emphasis>. O decorator (decorator) intercepta invocações apenas para uma determinada interface Java e, portanto, é cinete de toda a semântica que acompanham a interface . Isto torna os oradores (decorators) uma ferramenta perfeita para modelar alguns tipos de questões de negócios (business concerns). Significa também que um decorador (decorator) não tem a generalidade de um interceptador (interceptor). Decoradores (Decorators) não são capazes de resolver questões técnicas que atravessam muitos tipos díspares."
#. Tag: para
#: decorators.xml:22
#, no-c-format
msgid "Suppose we have an interface that represents accounts:"
-msgstr ""
+msgstr "Suponha que temos uma interface que representa contas (accounts):"
#. Tag: programlisting
#: decorators.xml:24
@@ -61,24 +48,24 @@
" public void deposit(BigDecimal amount);\n"
"}]]>"
msgstr ""
+"<![CDATA[public interface Account {\n"
+" public BigDecimal getBalance();\n"
+" public User getOwner();\n"
+" public void withdraw(BigDecimal amount);\n"
+" public void deposit(BigDecimal amount);\n"
+"}]]>"
#. Tag: para
#: decorators.xml:26
#, no-c-format
-msgid ""
-"Several different Web Beans in our system implement the <literal>Account</"
-"literal> interface. However, we have a common legal requirement that, for "
-"any kind of account, large transactions must be recorded by the system in a "
-"special log. This is a perfect job for a decorator."
-msgstr ""
+msgid "Several different Web Beans in our system implement the <literal>Account</literal> interface. However, we have a common legal requirement that, for any kind of account, large transactions must be recorded by the system in a special log. This is a perfect job for a decorator."
+msgstr "Vários Web Beans em nosso sistema implementam a interface <literal>Account</literal>. No entanto, temos uma obrigação legal que, para qualquer tipo de conta, as grandes transações devem ser registadas pelo sistema, em um registro especial (log). Este é um trabalho perfeito para um decorador (decorator). "
#. Tag: para
#: decorators.xml:32
#, no-c-format
-msgid ""
-"A decorator is a simple Web Bean that implements the type it decorates and "
-"is annotated <literal>@Decorator</literal>."
-msgstr ""
+msgid "A decorator is a simple Web Bean that implements the type it decorates and is annotated <literal>@Decorator</literal>."
+msgstr "Um decorador (decorator) é um simples Web Bean que implementa o tipo que decora e é anotado com <literal>@Decorator</literal>."
#. Tag: programlisting
#: decorators.xml:35
@@ -108,100 +95,107 @@
" \n"
"}]]>"
msgstr ""
+"<![CDATA[@Decorator\n"
+"public abstract class LargeTransactionDecorator \n"
+" implements Account {\n"
+" \n"
+" @Decorates Account account;\n"
+" \n"
+" @PersistenceContext EntityManager em;\n"
+" \n"
+" public void withdraw(BigDecimal amount) {\n"
+" account.withdraw(amount);\n"
+" if ( amount.compareTo(LARGE_AMOUNT)>0 ) {\n"
+" em.persist( new LoggedWithdrawl(amount) );\n"
+" }\n"
+" }\n"
+" \n"
+" public void deposit(BigDecimal amount);\n"
+" account.deposit(amount);\n"
+" if ( amount.compareTo(LARGE_AMOUNT)>0 ) {\n"
+" em.persist( new LoggedDeposit(amount) );\n"
+" }\n"
+" }\n"
+" \n"
+"}]]>"
#. Tag: para
#: decorators.xml:37
#, no-c-format
-msgid ""
-"Unlike other simple Web Beans, a decorator may be an abstract class. If "
-"there's nothing special the decorator needs to do for a particular method of "
-"the decorated interface, you don't need to implement that method."
-msgstr ""
+msgid "Unlike other simple Web Beans, a decorator may be an abstract class. If there's nothing special the decorator needs to do for a particular method of the decorated interface, you don't need to implement that method."
+msgstr "Ao contrário de outros Web Beans simples, um decorador (decorator) pode ser uma classe abstrata. Se não há nada de especial que o decorador (decorator) precisa de fazer para um determinado método da interface decaorada, você não precisa implementar esse método."
#. Tag: title
#: decorators.xml:43
#, no-c-format
msgid "Delegate attributes"
-msgstr ""
+msgstr "Atributos delegados (Delegate attributes)"
#. Tag: para
#: decorators.xml:45
#, no-c-format
-msgid ""
-"All decorators have a <emphasis>delegate attribute</emphasis>. The type and "
-"binding types of the delegate attribute determine which Web Beans the "
-"decorator is bound to. The delegate attribute type must implement or extend "
-"all interfaces implemented by the decorator."
-msgstr ""
+msgid "All decorators have a <emphasis>delegate attribute</emphasis>. The type and binding types of the delegate attribute determine which Web Beans the decorator is bound to. The delegate attribute type must implement or extend all interfaces implemented by the decorator."
+msgstr "Todos os decoradores (decorators) têm um <emphasis>atributo delegado (delegate attribute)</emphasis>. O tipo e os tipos de vínculos (binding types) do atributo delegado (delegate) determinam qual o decorador (decorator) que o Web Beans está vinculado. O tipo do atributo delegado (delegate) deve implementar ou estender todas as interfaces implementadas pelo decorador (decorator)."
#. Tag: para
#: decorators.xml:50
#, no-c-format
-msgid ""
-"This delegate attribute specifies that the decorator is bound to all Web "
-"Beans that implement <literal>Account</literal>:"
-msgstr ""
+msgid "This delegate attribute specifies that the decorator is bound to all Web Beans that implement <literal>Account</literal>:"
+msgstr "Este atributo delegado (delegate) especifica que o decorador (decorator) está vinculado a todos os Web Beans que implementam <literal>Account</literal>:"
#. Tag: programlisting
#: decorators.xml:53
#, no-c-format
msgid "<![CDATA[@Decorates Account account;]]>"
-msgstr ""
+msgstr "<![CDATA[@Decorates Account account;]]>"
#. Tag: para
#: decorators.xml:55
#, no-c-format
-msgid ""
-"A delegate attribute may specify a binding annotation. Then the decorator "
-"will only be bound to Web Beans with the same binding."
-msgstr ""
+msgid "A delegate attribute may specify a binding annotation. Then the decorator will only be bound to Web Beans with the same binding."
+msgstr "Um delegate pode especificar uma anotação de binding. Depois, o decorador (decorador) só será vinculado (bound) ao Web Beans com vínculo (binding)."
#. Tag: programlisting
#: decorators.xml:58
#, no-c-format
msgid "<![CDATA[@Decorates @Foreign Account account;]]>"
-msgstr ""
+msgstr "<![CDATA[@Decorates @Foreign Account account;]]>"
#. Tag: para
#: decorators.xml:60
#, no-c-format
msgid "A decorator is bound to any Web Bean which:"
-msgstr ""
+msgstr "Um decorador é ligado a qualquer Web Bean que:"
#. Tag: para
#: decorators.xml:64
#, no-c-format
msgid "has the type of the delegate attribute as an API type, and"
-msgstr ""
+msgstr "tem o tipo do atributo delegado como um tipo da API, e"
#. Tag: para
#: decorators.xml:67
#, no-c-format
msgid "has all binding types that are declared by the delegate attribute."
-msgstr ""
+msgstr "tem todos os binding types que são declarados pelo atributo delegado."
#. Tag: para
#: decorators.xml:71
#, no-c-format
-msgid ""
-"The decorator may invoke the delegate attribute, which has much the same "
-"effect as calling <literal>InvocationContext.proceed()</literal> from an "
-"interceptor."
-msgstr ""
+msgid "The decorator may invoke the delegate attribute, which has much the same effect as calling <literal>InvocationContext.proceed()</literal> from an interceptor."
+msgstr "O decorador (decorator) pode invocar o atributo delegado, que tem praticamente o mesmo efeito que chamar <literal>InvocationContext.proceed()</literal> a partir de um interceptador (interceptor)."
#. Tag: title
#: decorators.xml:78
#, no-c-format
msgid "Enabling decorators"
-msgstr ""
+msgstr "Habilitando decoradores"
#. Tag: para
#: decorators.xml:80
#, no-c-format
-msgid ""
-"We need to <emphasis>enable</emphasis> our decorator in <literal>web-beans."
-"xml</literal>."
-msgstr ""
+msgid "We need to <emphasis>enable</emphasis> our decorator in <literal>web-beans.xml</literal>."
+msgstr "Nós precisamos <emphasis>habilitar</emphasis> nosso decorador (decorator) no <literal>web-beans.xml</literal>."
#. Tag: programlisting
#: decorators.xml:83
@@ -211,33 +205,31 @@
" <myapp:LargeTransactionDecorator/>\n"
"</Decorators>]]>"
msgstr ""
+"<![CDATA[<Decorators>\n"
+" <myapp:LargeTransactionDecorator/>\n"
+"</Decorators>]]>"
#. Tag: para
#: decorators.xml:85
#, no-c-format
-msgid ""
-"This declaration serves the same purpose for decorators that the "
-"<literal><Interceptors></literal> declaration serves for interceptors:"
-msgstr ""
+msgid "This declaration serves the same purpose for decorators that the <literal><Interceptors></literal> declaration serves for interceptors:"
+msgstr "Essa declaração tem o mesmo propósito para decoradores (decorators) que a <literal><Interceptors></literal> tem para os interceptadores (interceptors):"
#. Tag: para
#: decorators.xml:90
#, no-c-format
-msgid ""
-"it enables us to specify a total ordering for all decorators in our system, "
-"ensuring deterministic behavior, and"
-msgstr ""
+msgid "it enables us to specify a total ordering for all decorators in our system, ensuring deterministic behavior, and"
+msgstr "isso possibilita-nos determinar a total ordem para todos os decoradores (decorators) em nosso sistema, assegurando um comportamento determinístico"
#. Tag: para
#: decorators.xml:94
#, no-c-format
msgid "it lets us enable or disable decorator classes at deployment time."
-msgstr ""
+msgstr "isso permite habilitarmos ou desabilitarmos as classes decoradas (decorator classes) em tempo de publicação (deployment time.)"
#. Tag: para
#: decorators.xml:98
#, no-c-format
-msgid ""
-"Interceptors for a method are called before decorators that apply to that "
-"method."
-msgstr ""
+msgid "Interceptors for a method are called before decorators that apply to that method."
+msgstr "Interceptadores (Interceptors) para o método são chamados antes os decoradores (decorators) que se aplicam a esse método."
+
Modified: doc/trunk/reference/pt-BR/ee.po
===================================================================
--- doc/trunk/reference/pt-BR/ee.po 2009-02-28 14:04:13 UTC (rev 1744)
+++ doc/trunk/reference/pt-BR/ee.po 2009-03-01 00:42:05 UTC (rev 1745)
@@ -6,8 +6,8 @@
"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-06 11:30+0000\n"
-"PO-Revision-Date: 2009-01-06 11:30+0000\n"
-"Last-Translator: Automatically generated\n"
+"PO-Revision-Date: 2009-02-28 15:05-0300\n"
+"Last-Translator: João Paulo Viragine <joao.viragine(a)redhat.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -17,34 +17,25 @@
#: ee.xml:4
#, no-c-format
msgid "Java EE integration"
-msgstr ""
+msgstr "Integração com o Java EE"
#. Tag: para
#: ee.xml:6
#, no-c-format
-msgid ""
-"Web Beans is fully integrated into the Java EE environment. Web Beans have "
-"access to Java EE resources and JPA persistence contexts. They may be used "
-"in Unified EL expressions in JSF and JSP pages. They may even be injected "
-"into some objects, such as Servlets and Message-Driven Beans, which are not "
-"Web Beans."
-msgstr ""
+msgid "Web Beans is fully integrated into the Java EE environment. Web Beans have access to Java EE resources and JPA persistence contexts. They may be used in Unified EL expressions in JSF and JSP pages. They may even be injected into some objects, such as Servlets and Message-Driven Beans, which are not Web Beans."
+msgstr "Web Beans está plenamente integrado no ambiente Java EE. Web Beans tem acesso aos recursos Java EE e contextos de persistência JPA. Eles podem se utilizados em expressões EL Unificadas (Unified EL) e em páginas JSF e JSP. Podem até ser injetado em alguns objetos, tais como Servlets e Message-Driven Beans, que não são Web Beans."
#. Tag: title
#: ee.xml:12
#, no-c-format
msgid "Injecting Java EE resources into a Web Bean"
-msgstr ""
+msgstr "Injetando recursos Java EE em um Web Bean"
#. Tag: para
#: ee.xml:14
#, no-c-format
-msgid ""
-"All simple and enterprise Web Beans may take advantage of Java EE dependency "
-"injection using <literal>@Resource</literal>, <literal>@EJB</literal> and "
-"<literal>@PersistenceContext</literal>. We've already seen a couple of "
-"examples of this, though we didn't pay much attention at the time:"
-msgstr ""
+msgid "All simple and enterprise Web Beans may take advantage of Java EE dependency injection using <literal>@Resource</literal>, <literal>@EJB</literal> and <literal>@PersistenceContext</literal>. We've already seen a couple of examples of this, though we didn't pay much attention at the time:"
+msgstr "Todos Web Beans simples e corporativos (enterprise Web Beans) podem usufruir da injeção de dependências do Java EE utilizando <literal>@Resource</literal>, <literal>@EJB</literal> e <literal>@PersistenceContext</literal>. Nós já vimos vários exemplos disso, embora ainda não demos muita ênfase até o momento:"
#. Tag: programlisting
#: ee.xml:19
@@ -55,11 +46,18 @@
"\n"
" @Resource Transaction transaction;\n"
"\n"
-" @AroundInvoke public Object manageTransaction(InvocationContext ctx) "
-"{ ... }\n"
+" @AroundInvoke public Object manageTransaction(InvocationContext ctx) { ... }\n"
" \n"
"}]]>"
msgstr ""
+"<![CDATA[@Transactional @Interceptor\n"
+"public class TransactionInterceptor {\n"
+"\n"
+" @Resource Transaction transaction;\n"
+"\n"
+" @AroundInvoke public Object manageTransaction(InvocationContext ctx) { ... }\n"
+" \n"
+"}]]>"
#. Tag: programlisting
#: ee.xml:21
@@ -75,38 +73,39 @@
"\n"
"}]]>"
msgstr ""
+"<![CDATA[@SessionScoped\n"
+"public class Login {\n"
+"\n"
+" @Current Credentials credentials;\n"
+" @PersistenceContext EntityManager userDatabase;\n"
+" \n"
+" ...\n"
+"\n"
+"}]]>"
#. Tag: para
#: ee.xml:23
#, no-c-format
-msgid ""
-"The Java EE <literal>@PostConstruct</literal> and <literal>@PreDestroy</"
-"literal> callbacks are also supported for all simple and enterprise Web "
-"Beans. The <literal>@PostConstruct</literal> method is called after "
-"<emphasis>all</emphasis> injection has been performed."
-msgstr ""
+msgid "The Java EE <literal>@PostConstruct</literal> and <literal>@PreDestroy</literal> callbacks are also supported for all simple and enterprise Web Beans. The <literal>@PostConstruct</literal> method is called after <emphasis>all</emphasis> injection has been performed."
+msgstr "A Java EE <literal>@PostConstruct</literal> e <literal>@PreDestroy</literal> callbacks também são suportadas para todos os Web Beans simples e corporativos (enterprise) . O método anotado com <literal>@PostConstruct</literal> é invocado após <emphasis>todas</emphasis> injeções serem realizadas."
#. Tag: para
#: ee.xml:28
#, no-c-format
-msgid ""
-"There is one restriction to be aware of here: <literal>@PersistenceContext"
-"(type=EXTENDED)</literal> is not supported for simple Web Beans."
-msgstr ""
+msgid "There is one restriction to be aware of here: <literal>@PersistenceContext(type=EXTENDED)</literal> is not supported for simple Web Beans."
+msgstr "Existe uma restrição que devemos estar conscientes: <literal>@PersistenceContext(type=EXTENDED)</literal> não é suportada por Web Beans simples."
#. Tag: title
#: ee.xml:35
#, no-c-format
msgid "Calling a Web Bean from a Servlet"
-msgstr ""
+msgstr "Invocando um Web Bean a partir de um Servlet"
#. Tag: para
#: ee.xml:37
#, no-c-format
-msgid ""
-"It's easy to use a Web Bean from a Servlet in Java EE 6. Simply inject the "
-"Web Bean using Web Beans field or initializer method injection."
-msgstr ""
+msgid "It's easy to use a Web Bean from a Servlet in Java EE 6. Simply inject the Web Bean using Web Beans field or initializer method injection."
+msgstr "É fácil de utlizar um Web Bean a partir de um Servlet em Java EE 6. Basta injetar o Web Bean usando a injeção de atributos ou de initializer método de Web Beans."
#. Tag: programlisting
#: ee.xml:40
@@ -118,8 +117,7 @@
" @Current Login login;\n"
"\n"
" @Override\n"
-" public void service(HttpServletRequest request, HttpServletResponse "
-"response)\n"
+" public void service(HttpServletRequest request, HttpServletResponse response)\n"
" throws ServletException, IOException {\n"
" credentials.setUsername( request.getAttribute(\"username\") ):\n"
" credentials.setPassword( request.getAttribute(\"password\") ):\n"
@@ -134,39 +132,50 @@
" \n"
"}"
msgstr ""
+"public class Login extends HttpServlet {\n"
+"\n"
+" @Current Credentials credentials;\n"
+" @Current Login login;\n"
+"\n"
+" @Override\n"
+" public void service(HttpServletRequest request, HttpServletResponse response)\n"
+" throws ServletException, IOException {\n"
+" credentials.setUsername( request.getAttribute(\"username\") ):\n"
+" credentials.setPassword( request.getAttribute(\"password\") ):\n"
+" login.login();\n"
+" if ( login.isLoggedIn() ) {\n"
+" response.sendRedirect(\"/home.jsp\");\n"
+" }\n"
+" else {\n"
+" response.sendRedirect(\"/loginError.jsp\");\n"
+" }\n"
+" }\n"
+" \n"
+"}"
#. Tag: para
#: ee.xml:42
#, no-c-format
-msgid ""
-"The Web Beans client proxy takes care of routing method invocations from the "
-"Servlet to the correct instances of <literal>Credentials</literal> and "
-"<literal>Login</literal> for the current request and HTTP session."
-msgstr ""
+msgid "The Web Beans client proxy takes care of routing method invocations from the Servlet to the correct instances of <literal>Credentials</literal> and <literal>Login</literal> for the current request and HTTP session."
+msgstr "O proxy cliente do Web Bean (Web Beans client proxy) cuida do encaminhamento das invocações dos métodos do Servlet para as instâncias corretas de <literal>Credentials</literal> e <literal>Login</literal> para a requisição e sessão HTTP (HTTP session) correntes."
#. Tag: title
#: ee.xml:49
#, no-c-format
msgid "Calling a Web Bean from a Message-Driven Bean"
-msgstr ""
+msgstr "Invocando um Web Bean de um Message-Driven Bean"
#. Tag: para
#: ee.xml:51
#, no-c-format
-msgid ""
-"Web Beans injection applies to all EJBs, even when they aren't under the "
-"control of the Web Bean manager (if they were obtained by direct JNDI "
-"lookup, or injection using <literal>@EJB</literal>, for example. In "
-"particular, you can use Web Beans injection in Message-Driven Beans, which "
-"are not considered Web Beans because you can't inject them."
-msgstr ""
+msgid "Web Beans injection applies to all EJBs, even when they aren't under the control of the Web Bean manager (if they were obtained by direct JNDI lookup, or injection using <literal>@EJB</literal>, for example. In particular, you can use Web Beans injection in Message-Driven Beans, which are not considered Web Beans because you can't inject them."
+msgstr "Injeção de Web Beans aplica-se a todos EJBs, mesmo quando esses não estão sobre controle do gerenciador de Web Bean (Web Bean manager) (se tiverem sido obtidos por busca direta no JNDI, ou por injeção utilizando<literal>@EJB</literal>, por exemplo). Em particular, você pode usar a injeção de Web Beans em Message-Driven Beans, que não são considerados Web Beans porque você não pode injectar-los."
#. Tag: para
#: ee.xml:57
#, no-c-format
-msgid ""
-"You can even use Web Beans interceptor bindings for Message-Driven Beans."
-msgstr ""
+msgid "You can even use Web Beans interceptor bindings for Message-Driven Beans."
+msgstr "Você ainda pode usar Web Beans interceptador bindings para Message-Driven Beans."
#. Tag: programlisting
#: ee.xml:59
@@ -184,52 +193,47 @@
" \n"
"}"
msgstr ""
+"@Transactional @MessageDriven\n"
+"public class ProcessOrder implements MessageListener {\n"
+"\n"
+" @Current Inventory inventory;\n"
+" @PersistenceContext EntityManager em;\n"
+"\n"
+" public void onMessage(Message message) {\n"
+" ...\n"
+" }\n"
+" \n"
+"}"
#. Tag: para
#: ee.xml:61
#, no-c-format
-msgid ""
-"Thus, receiving messages is super-easy in a Web Beans environment. But "
-"beware that there is no session or conversation context available when a "
-"message is delivered to a Message-Driven Bean. Only <literal>@RequestScoped</"
-"literal> and <literal>@ApplicationScoped</literal> Web Beans are available."
-msgstr ""
+msgid "Thus, receiving messages is super-easy in a Web Beans environment. But beware that there is no session or conversation context available when a message is delivered to a Message-Driven Bean. Only <literal>@RequestScoped</literal> and <literal>@ApplicationScoped</literal> Web Beans are available."
+msgstr "Assim, receber mensagens é super fácil no ambiente de Web Beans. Mas cuidado que não existe um contexto de sessão (session) ou conversação (conversation) disponível quando uma mensagem é entregue a um Message-Driven Bean. Apenas <literal>@RequestScoped</literal> e <literal>@ApplicationScoped</literal> Web Beans estão disponíveis."
#. Tag: para
#: ee.xml:66
#, no-c-format
msgid "It's also easy to send messages using Web Beans."
-msgstr ""
+msgstr "Também é fácil de enviar mensagens usando Web Beans."
#. Tag: title
#: ee.xml:71
#, no-c-format
msgid "JMS endpoints"
-msgstr ""
+msgstr "Endpoints JMS"
#. Tag: para
#: ee.xml:73
#, no-c-format
-msgid ""
-"Sending messages using JMS can be quite complex, because of the number of "
-"different objects you need to deal with. For queues we have <literal>Queue</"
-"literal>, <literal>QueueConnectionFactory</literal>, "
-"<literal>QueueConnection</literal>, <literal>QueueSession</literal> and "
-"<literal>QueueSender</literal>. For topics we have <literal>Topic</literal>, "
-"<literal>TopicConnectionFactory</literal>, <literal>TopicConnection</"
-"literal>, <literal>TopicSession</literal> and <literal>TopicPublisher</"
-"literal>. Each of these objects has its own lifecycle and threading model "
-"that we need to worry about."
-msgstr ""
+msgid "Sending messages using JMS can be quite complex, because of the number of different objects you need to deal with. For queues we have <literal>Queue</literal>, <literal>QueueConnectionFactory</literal>, <literal>QueueConnection</literal>, <literal>QueueSession</literal> and <literal>QueueSender</literal>. For topics we have <literal>Topic</literal>, <literal>TopicConnectionFactory</literal>, <literal>TopicConnection</literal>, <literal>TopicSession</literal> and <literal>TopicPublisher</literal>. Each of these objects has its own lifecycle and threading model that we need to worry about."
+msgstr "O envio de mensagens usando JMS pode ser bastante complexo, devido a quantidade de objetos diferentes que precisamos utilizar. Para filas (queues) temos <literal>Queue</literal>, <literal>QueueConnectionFactory</literal>, <literal>QueueConnection</literal>, <literal>QueueSession</literal> e <literal>QueueSender</literal>. Para os tópicos (topics) temos <literal>Topic</literal>, <literal>TopicConnectionFactory</literal>, <literal>TopicConnection</literal>, <literal>TopicSession</literal> e <literal>TopicPublisher</literal>. Cada um desses objetos tem seus próprios ciclo de vida e modelo de threads que temos que nos preocupar."
#. Tag: para
#: ee.xml:82
#, no-c-format
-msgid ""
-"Web Beans takes care of all this for us. All we need to do is declare the "
-"queue or topic in <literal>web-beans.xml</literal>, specifying an associated "
-"binding type and connection factory."
-msgstr ""
+msgid "Web Beans takes care of all this for us. All we need to do is declare the queue or topic in <literal>web-beans.xml</literal>, specifying an associated binding type and connection factory."
+msgstr "Web Beans cuida de tudo isso para nós. Tudo que precisamos fazer é declarar a fila (queue) ou o tópico (topic) no <literal>web-beans.xml</literal>, especificando e associando o tipo de ligação (binding type) e a fábrica de conexão (connection factory)."
#. Tag: programlisting
#: ee.xml:86
@@ -237,11 +241,15 @@
msgid ""
"<![CDATA[<Queue>\n"
" <destination>java:comp/env/jms/OrderQueue</destination>\n"
-" <connectionFactory>java:comp/env/jms/QueueConnectionFactory</"
-"connectionFactory>\n"
+" <connectionFactory>java:comp/env/jms/QueueConnectionFactory</connectionFactory>\n"
" <myapp:OrderProcessor/> \n"
"</Queue>]]>"
msgstr ""
+"<![CDATA[<Queue>\n"
+" <destination>java:comp/env/jms/OrderQueue</destination>\n"
+" <connectionFactory>java:comp/env/jms/QueueConnectionFactory</connectionFactory>\n"
+" <myapp:OrderProcessor/> \n"
+"</Queue>]]>"
#. Tag: programlisting
#: ee.xml:88
@@ -249,22 +257,21 @@
msgid ""
"<![CDATA[<Topic>\n"
" <destination>java:comp/env/jms/StockPrices</destination>\n"
-" <connectionFactory>java:comp/env/jms/TopicConnectionFactory</"
-"connectionFactory>\n"
+" <connectionFactory>java:comp/env/jms/TopicConnectionFactory</connectionFactory>\n"
" <myapp:StockPrices/> \n"
"</Topic>]]>"
msgstr ""
+"<![CDATA[<Topic>\n"
+" <destination>java:comp/env/jms/StockPrices</destination>\n"
+" <connectionFactory>java:comp/env/jms/TopicConnectionFactory</connectionFactory>\n"
+" <myapp:StockPrices/> \n"
+"</Topic>]]>"
#. Tag: para
#: ee.xml:90
#, no-c-format
-msgid ""
-"Now we can just inject the <literal>Queue</literal>, "
-"<literal>QueueConnection</literal>, <literal>QueueSession</literal> or "
-"<literal>QueueSender</literal> for a queue, or the <literal>Topic</literal>, "
-"<literal>TopicConnection</literal>, <literal>TopicSession</literal> or "
-"<literal>TopicPublisher</literal> for a topic."
-msgstr ""
+msgid "Now we can just inject the <literal>Queue</literal>, <literal>QueueConnection</literal>, <literal>QueueSession</literal> or <literal>QueueSender</literal> for a queue, or the <literal>Topic</literal>, <literal>TopicConnection</literal>, <literal>TopicSession</literal> or <literal>TopicPublisher</literal> for a topic."
+msgstr "Agora podemos injetar a <literal>Queue</literal>, <literal>QueueConnection</literal>, <literal>QueueSession</literal> ou <literal>QueueSender</literal> para uma fila, ou <literal>Topic</literal>, <literal>TopicConnection</literal>, <literal>TopicSession</literal> ou <literal>TopicPublisher</literal> para um tópico."
#. Tag: programlisting
#: ee.xml:96
@@ -279,6 +286,14 @@
" orderSender.send(msg);\n"
"}"
msgstr ""
+"@OrderProcessor QueueSender orderSender;\n"
+"@OrderProcessor QueueSession orderSession;\n"
+"\n"
+"public void sendMessage() {\n"
+" MapMessage msg = orderSession.createMapMessage();\n"
+" ...\n"
+" orderSender.send(msg);\n"
+"}"
#. Tag: programlisting
#: ee.xml:98
@@ -291,39 +306,34 @@
" pricePublisher.send( priceSession.createTextMessage(price) );\n"
"}"
msgstr ""
+"@StockPrices TopicPublisher pricePublisher;\n"
+"@StockPrices TopicSession priceSession;\n"
+"\n"
+"public void sendMessage(String price) {\n"
+" pricePublisher.send( priceSession.createTextMessage(price) );\n"
+"}"
#. Tag: para
#: ee.xml:100
#, no-c-format
-msgid ""
-"The lifecycle of the injected JMS objects is completely controlled by the "
-"Web Bean manager."
-msgstr ""
+msgid "The lifecycle of the injected JMS objects is completely controlled by the Web Bean manager."
+msgstr "O ciclo de vida do objeto JMS injetado é completamente controlado pelo gerenciador do Web Bean (Web Bean manager)."
#. Tag: title
#: ee.xml:106
#, no-c-format
msgid "Packaging and deployment"
-msgstr ""
+msgstr "Empacotamento e publicação"
#. Tag: para
#: ee.xml:108
#, no-c-format
-msgid ""
-"Web Beans doesn't define any special deployment archive. You can package Web "
-"Beans in JARs, EJB-JARs or WARs — any deployment location in the "
-"application classpath. However, each archive that contains Web Beans must "
-"include a file named <literal>web-beans.xml</literal> in the <literal>META-"
-"INF</literal> or <literal>WEB-INF</literal> directory. The file may be "
-"empty. Web Beans deployed in archives that do not have a <literal>web-beans."
-"xml</literal> file will not be available for use in the application."
-msgstr ""
+msgid "Web Beans doesn't define any special deployment archive. You can package Web Beans in JARs, EJB-JARs or WARs — any deployment location in the application classpath. However, each archive that contains Web Beans must include a file named <literal>web-beans.xml</literal> in the <literal>META-INF</literal> or <literal>WEB-INF</literal> directory. The file may be empty. Web Beans deployed in archives that do not have a <literal>web-beans.xml</literal> file will not be available for use in the application."
+msgstr "A Web Beans não define nenhum tipo especial de pacote de publicação (deployment archive). Você pode embacotar Web Beans em JARs, EJB-JARs ou WARs — qualquer localização de deployment do classpath da aplicação. Entretanto, cada archive que contêm Web Beans deve incluir um arquivo chamado <literal>web-beans.xml</literal> no diretório <literal>META-INF</literal> ou no diretório <literal>WEB-INF</literal> . O arquivo pode ser vazio. Os Web Beans publicados (deployed) em pacotes que não possuem o arquivo <literal>web-beans.xml</literal> não estarão disponíveis para uso na aplicação."
#. Tag: para
#: ee.xml:116
#, no-c-format
-msgid ""
-"For Java SE execution, Web Beans may be deployed in any location in which "
-"EJBs may be deployed for execution by the embeddable EJB Lite container. "
-"Again, each location must contain a <literal>web-beans.xml</literal> file."
-msgstr ""
+msgid "For Java SE execution, Web Beans may be deployed in any location in which EJBs may be deployed for execution by the embeddable EJB Lite container. Again, each location must contain a <literal>web-beans.xml</literal> file."
+msgstr "Para execução em ambiente Java SE, Web Beans podem ser publicados (deployed) em qualquer localização em que EJBs possam ser publicados (deployed) para execução pelo container EJB leve embutido (embeddable EJB Lite container). Novamente, cada localização deve conter o arquivo <literal>web-beans.xml</literal>."
+
Modified: doc/trunk/reference/pt-BR/events.po
===================================================================
--- doc/trunk/reference/pt-BR/events.po 2009-02-28 14:04:13 UTC (rev 1744)
+++ doc/trunk/reference/pt-BR/events.po 2009-03-01 00:42:05 UTC (rev 1745)
@@ -6,8 +6,8 @@
"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-06 11:30+0000\n"
-"PO-Revision-Date: 2009-01-06 11:30+0000\n"
-"Last-Translator: Automatically generated\n"
+"PO-Revision-Date: 2009-02-28 15:08-0300\n"
+"Last-Translator: João Paulo Viragine <joao.viragine(a)redhat.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -17,74 +17,54 @@
#: events.xml:4
#, no-c-format
msgid "Events"
-msgstr ""
+msgstr "Eventos"
#. Tag: para
#: events.xml:6
#, no-c-format
-msgid ""
-"The Web Beans event notification facility allows Web Beans to interact in a "
-"totally decoupled manner. Event <emphasis>producers</emphasis> raise events "
-"that are then delivered to event <emphasis>observers</emphasis> by the Web "
-"Bean manager. This basic schema might sound like the familiar observer/"
-"observable pattern, but there are a couple of twists:"
+msgid "The Web Beans event notification facility allows Web Beans to interact in a totally decoupled manner. Event <emphasis>producers</emphasis> raise events that are then delivered to event <emphasis>observers</emphasis> by the Web Bean manager. This basic schema might sound like the familiar observer/observable pattern, but there are a couple of twists:"
msgstr ""
#. Tag: para
#: events.xml:14
#, no-c-format
-msgid ""
-"not only are event producers decoupled from observers; observers are "
-"completely decoupled from producers,"
+msgid "not only are event producers decoupled from observers; observers are completely decoupled from producers,"
msgstr ""
#. Tag: para
#: events.xml:18
#, no-c-format
-msgid ""
-"observers can specify a combination of \"selectors\" to narrow the set of "
-"event notifications they will receive, and"
+msgid "observers can specify a combination of \"selectors\" to narrow the set of event notifications they will receive, and"
msgstr ""
#. Tag: para
#: events.xml:22
#, no-c-format
-msgid ""
-"observers can be notified immediately, or can specify that delivery of the "
-"event should be delayed until the end of the current transaction"
-msgstr ""
+msgid "observers can be notified immediately, or can specify that delivery of the event should be delayed until the end of the current transaction"
+msgstr "observadores podem ser notificados imediatamente ou podem especificar que a notificação do evento deveria esperar até o têrmino da transação corrente"
#. Tag: title
#: events.xml:28
#, no-c-format
msgid "Event observers"
-msgstr ""
+msgstr "Observadores de eventos"
#. Tag: para
#: events.xml:30
#, no-c-format
-msgid ""
-"An <emphasis>observer method</emphasis> is a method of a Web Bean with a "
-"parameter annotated <literal>@Observes</literal>."
+msgid "An <emphasis>observer method</emphasis> is a method of a Web Bean with a parameter annotated <literal>@Observes</literal>."
msgstr ""
#. Tag: programlisting
#: events.xml:33
#, no-c-format
-msgid ""
-"<![CDATA[public void onAnyDocumentEvent(@Observes Document document) "
-"{ ... }]]>"
-msgstr ""
+msgid "<![CDATA[public void onAnyDocumentEvent(@Observes Document document) { ... }]]>"
+msgstr "<![CDATA[public void onAnyDocumentEvent(@Observes Document document) { ... }]]>"
#. Tag: para
#: events.xml:35
#, no-c-format
-msgid ""
-"The annotated parameter is called the <emphasis>event parameter</emphasis>. "
-"The type of the event parameter is the observed <emphasis>event type</"
-"emphasis>. Observer methods may also specify \"selectors\", which are just "
-"instances of Web Beans binding types. When a binding type is used as an "
-"event selector, it is called an <emphasis>event binding type</emphasis>."
+msgid "The annotated parameter is called the <emphasis>event parameter</emphasis>. The type of the event parameter is the observed <emphasis>event type</emphasis>. Observer methods may also specify \"selectors\", which are just instances of Web Beans binding types. When a binding type is used as an event selector, it is called an <emphasis>event binding type</emphasis>."
msgstr ""
#. Tag: programlisting
@@ -96,105 +76,88 @@
"@Retention(RUNTIME)\n"
"public @interface Updated { ... }]]>"
msgstr ""
+"<![CDATA[@BindingType\n"
+"@Target({PARAMETER, FIELD})\n"
+"@Retention(RUNTIME)\n"
+"public @interface Updated { ... }]]>"
#. Tag: para
#: events.xml:43
#, no-c-format
-msgid ""
-"We specify the event bindings of the observer method by annotating the event "
-"parameter:"
+msgid "We specify the event bindings of the observer method by annotating the event parameter:"
msgstr ""
#. Tag: programlisting
-#: events.xml:46 events.xml:190
+#: events.xml:46
+#: events.xml:190
#, no-c-format
-msgid ""
-"<![CDATA[public void afterDocumentUpdate(@Observes @Updated Document "
-"document) { ... }]]>"
-msgstr ""
+msgid "<![CDATA[public void afterDocumentUpdate(@Observes @Updated Document document) { ... }]]>"
+msgstr "<![CDATA[public void afterDocumentUpdate(@Observes @Updated Document document) { ... }]]>"
#. Tag: para
#: events.xml:48
#, no-c-format
-msgid ""
-"An observer method need not specify any event bindings — in this case it "
-"is interested in <emphasis>all</emphasis> events of a particular type. If it "
-"does specify event bindings, it is only interested in events which also have "
-"those event bindings."
+msgid "An observer method need not specify any event bindings — in this case it is interested in <emphasis>all</emphasis> events of a particular type. If it does specify event bindings, it is only interested in events which also have those event bindings."
msgstr ""
#. Tag: para
#: events.xml:53
#, no-c-format
-msgid ""
-"The observer method may have additional parameters, which are injected "
-"according to the usual Web Beans method parameter injection semantics:"
-msgstr ""
+msgid "The observer method may have additional parameters, which are injected according to the usual Web Beans method parameter injection semantics:"
+msgstr "O método observador pode ter parâmetros adicionais que são injetados de acordo com a semântica usual de injeção de parâmetros em métodos de Web Beans"
#. Tag: programlisting
#: events.xml:56
#, no-c-format
-msgid ""
-"<![CDATA[public void afterDocumentUpdate(@Observes @Updated Document "
-"document, User user) { ... }]]>"
-msgstr ""
+msgid "<![CDATA[public void afterDocumentUpdate(@Observes @Updated Document document, User user) { ... }]]>"
+msgstr "<![CDATA[public void afterDocumentUpdate(@Observes @Updated Document document, User user) { ... }]]>"
#. Tag: title
#: events.xml:61
#, no-c-format
msgid "Event producers"
-msgstr ""
+msgstr "Produtores de Eventos"
#. Tag: para
#: events.xml:63
#, no-c-format
-msgid ""
-"The event producer may obtain an <emphasis>event notifier</emphasis> object "
-"by injection:"
+msgid "The event producer may obtain an <emphasis>event notifier</emphasis> object by injection:"
msgstr ""
#. Tag: programlisting
#: events.xml:66
#, no-c-format
msgid "<![CDATA[@Observable Event<Document> documentEvent]]>"
-msgstr ""
+msgstr "<![CDATA[@Observable Event<Document> documentEvent]]>"
#. Tag: para
#: events.xml:68
#, no-c-format
-msgid ""
-"The <literal>@Observable</literal> annotation implicitly defines a Web Bean "
-"with scope <literal>@Dependent</literal> and deployment type "
-"<literal>@Standard</literal>, with an implementation provided by the Web "
-"Bean manager."
+msgid "The <literal>@Observable</literal> annotation implicitly defines a Web Bean with scope <literal>@Dependent</literal> and deployment type <literal>@Standard</literal>, with an implementation provided by the Web Bean manager."
msgstr ""
#. Tag: para
#: events.xml:72
#, no-c-format
-msgid ""
-"A producer raises events by calling the <literal>fire()</literal> method of "
-"the <literal>Event</literal> interface, passing an <emphasis>event object</"
-"emphasis>:"
+msgid "A producer raises events by calling the <literal>fire()</literal> method of the <literal>Event</literal> interface, passing an <emphasis>event object</emphasis>:"
msgstr ""
#. Tag: programlisting
#: events.xml:75
#, no-c-format
msgid "<![CDATA[documentEvent.fire(document);]]>"
-msgstr ""
+msgstr "<![CDATA[documentEvent.fire(document);]]>"
#. Tag: para
#: events.xml:77
#, no-c-format
-msgid ""
-"An event object may be an instance of any Java class that has no type "
-"variables or wildcard type parameters. The event will be delivered to every "
-"observer method that:"
+msgid "An event object may be an instance of any Java class that has no type variables or wildcard type parameters. The event will be delivered to every observer method that:"
msgstr ""
#. Tag: para
-#: events.xml:83 events.xml:107 events.xml:126
+#: events.xml:83
+#: events.xml:107
+#: events.xml:126
#, no-c-format
msgid "has an event parameter to which the event object is assignable, and"
msgstr ""
@@ -208,126 +171,96 @@
#. Tag: para
#: events.xml:90
#, no-c-format
-msgid ""
-"The Web Bean manager simply calls all the observer methods, passing the "
-"event object as the value of the event parameter. If any observer method "
-"throws an exception, the Web Bean manager stops calling observer methods, "
-"and the exception is rethrown by the <literal>fire()</literal> method."
+msgid "The Web Bean manager simply calls all the observer methods, passing the event object as the value of the event parameter. If any observer method throws an exception, the Web Bean manager stops calling observer methods, and the exception is rethrown by the <literal>fire()</literal> method."
msgstr ""
#. Tag: para
#: events.xml:95
#, no-c-format
-msgid ""
-"To specify a \"selector\", the event producer may pass an instance of the "
-"event binding type to the <literal>fire()</literal> method:"
+msgid "To specify a \"selector\", the event producer may pass an instance of the event binding type to the <literal>fire()</literal> method:"
msgstr ""
#. Tag: programlisting
#: events.xml:98
#, no-c-format
-msgid ""
-"<![CDATA[documentEvent.fire( document, new AnnotationLiteral<Updated>()"
-"{} );]]>"
-msgstr ""
+msgid "<![CDATA[documentEvent.fire( document, new AnnotationLiteral<Updated>(){} );]]>"
+msgstr "<![CDATA[documentEvent.fire( document, new AnnotationLiteral<Updated>(){} );]]>"
#. Tag: para
#: events.xml:100
#, no-c-format
-msgid ""
-"The helper class <literal>AnnotationLiteral</literal> makes it possible to "
-"instantiate binding types inline, since this is otherwise difficult to do in "
-"Java."
+msgid "The helper class <literal>AnnotationLiteral</literal> makes it possible to instantiate binding types inline, since this is otherwise difficult to do in Java."
msgstr ""
#. Tag: para
#: events.xml:103
#, no-c-format
msgid "The event will be delivered to every observer method that:"
-msgstr ""
+msgstr "O evento será entregue a todo método observador (observer method) que:"
#. Tag: para
#: events.xml:110
#, no-c-format
-msgid ""
-"does not specify any event binding <emphasis>except</emphasis> for the event "
-"bindings passed to <literal>fire()</literal>."
+msgid "does not specify any event binding <emphasis>except</emphasis> for the event bindings passed to <literal>fire()</literal>."
msgstr ""
#. Tag: para
#: events.xml:115
#, no-c-format
-msgid ""
-"Alternatively, event bindings may be specified by annotating the event "
-"notifier injection point:"
+msgid "Alternatively, event bindings may be specified by annotating the event notifier injection point:"
msgstr ""
#. Tag: programlisting
#: events.xml:118
#, no-c-format
msgid "<![CDATA[@Observable @Updated Event<Document> documentUpdatedEvent]]>"
-msgstr ""
+msgstr "<![CDATA[@Observable @Updated Event<Document> documentUpdatedEvent]]>"
#. Tag: para
#: events.xml:120
#, no-c-format
-msgid ""
-"Then every event fired via this instance of <literal>Event</literal> has the "
-"annotated event binding. The event will be delivered to every observer "
-"method that:"
+msgid "Then every event fired via this instance of <literal>Event</literal> has the annotated event binding. The event will be delivered to every observer method that:"
msgstr ""
#. Tag: para
#: events.xml:129
#, no-c-format
-msgid ""
-"does not specify any event binding <emphasis>except</emphasis> for the event "
-"bindings passed to <literal>fire()</literal> or the annotated event bindings "
-"of the event notifier injection point."
+msgid "does not specify any event binding <emphasis>except</emphasis> for the event bindings passed to <literal>fire()</literal> or the annotated event bindings of the event notifier injection point."
msgstr ""
#. Tag: title
#: events.xml:138
#, no-c-format
msgid "Registering observers dynamically"
-msgstr ""
+msgstr "Resgistrando observadores (observers) dinamicamente"
#. Tag: para
#: events.xml:140
#, no-c-format
-msgid ""
-"It's often useful to register an event observer dynamically. The application "
-"may implement the <literal>Observer</literal> interface and register an "
-"instance with an event notifier by calling the <literal>observe()</literal> "
-"method."
+msgid "It's often useful to register an event observer dynamically. The application may implement the <literal>Observer</literal> interface and register an instance with an event notifier by calling the <literal>observe()</literal> method."
msgstr ""
#. Tag: programlisting
#: events.xml:144
#, no-c-format
-msgid ""
-"<![CDATA[documentEvent.observe( new Observer<Document>() { public void notify"
-"(Document doc) { ... } } );]]>"
-msgstr ""
+msgid "<![CDATA[documentEvent.observe( new Observer<Document>() { public void notify(Document doc) { ... } } );]]>"
+msgstr "<![CDATA[documentEvent.observe( new Observer<Document>() { public void notify(Document doc) { ... } } );]]>"
#. Tag: para
#: events.xml:146
#, no-c-format
-msgid ""
-"Event binding types may be specified by the event notifier injection point "
-"or by passing event binding type instances to the <literal>observe()</"
-"literal> method:"
+msgid "Event binding types may be specified by the event notifier injection point or by passing event binding type instances to the <literal>observe()</literal> method:"
msgstr ""
#. Tag: programlisting
#: events.xml:149
#, no-c-format
msgid ""
-"<![CDATA[documentEvent.observe( new Observer<Document>() { public void notify"
-"(Document doc) { ... } }, \n"
-" new "
-"AnnotationLiteral<Updated>(){} );]]>"
+"<![CDATA[documentEvent.observe( new Observer<Document>() { public void notify(Document doc) { ... } }, \n"
+" new AnnotationLiteral<Updated>(){} );]]>"
msgstr ""
+"<![CDATA[documentEvent.observe( new Observer<Document>() { public void notify(Document doc) { ... } }, \n"
+" new AnnotationLiteral<Updated>(){} );]]>"
#. Tag: title
#: events.xml:154
@@ -352,43 +285,41 @@
" RoleType value();\n"
"}]]>"
msgstr ""
+"<![CDATA[@BindingType\n"
+"@Target({PARAMETER, FIELD})\n"
+"@Retention(RUNTIME)\n"
+"public @interface Role {\n"
+" RoleType value();\n"
+"}]]>"
#. Tag: para
#: events.xml:160
#, no-c-format
-msgid ""
-"The member value is used to narrow the messages delivered to the observer:"
+msgid "The member value is used to narrow the messages delivered to the observer:"
msgstr ""
#. Tag: programlisting
#: events.xml:162
#, no-c-format
-msgid ""
-"<![CDATA[public void adminLoggedIn(@Observes @Role(ADMIN) LoggedIn event) "
-"{ ... }]]>"
-msgstr ""
+msgid "<![CDATA[public void adminLoggedIn(@Observes @Role(ADMIN) LoggedIn event) { ... }]]>"
+msgstr "<![CDATA[public void adminLoggedIn(@Observes @Role(ADMIN) LoggedIn event) { ... }]]>"
#. Tag: para
#: events.xml:164
#, no-c-format
-msgid ""
-"Event binding type members may be specified statically by the event "
-"producer, via annotations at the event notifier injection point:"
+msgid "Event binding type members may be specified statically by the event producer, via annotations at the event notifier injection point:"
msgstr ""
#. Tag: programlisting
#: events.xml:167
#, no-c-format
msgid "<![CDATA[@Observable @Role(ADMIN) Event<LoggedIn> LoggedInEvent;}}]]>"
-msgstr ""
+msgstr "<![CDATA[@Observable @Role(ADMIN) Event<LoggedIn> LoggedInEvent;}}]]>"
#. Tag: para
#: events.xml:169
#, no-c-format
-msgid ""
-"Alternatively, the value of the event binding type member may be determined "
-"dynamically by the event producer. We start by writing an abstract subclass "
-"of <literal>AnnotationLiteral</literal>:"
+msgid "Alternatively, the value of the event binding type member may be determined dynamically by the event producer. We start by writing an abstract subclass of <literal>AnnotationLiteral</literal>:"
msgstr ""
#. Tag: programlisting
@@ -399,22 +330,21 @@
" extends AnnotationLiteral<Role> \n"
" implements Role {}]]>"
msgstr ""
+"<![CDATA[abstract class RoleBinding \n"
+" extends AnnotationLiteral<Role> \n"
+" implements Role {}]]>"
#. Tag: para
#: events.xml:174
#, no-c-format
-msgid ""
-"The event producer passes an instance of this class to <literal>fire()</"
-"literal>:"
-msgstr ""
+msgid "The event producer passes an instance of this class to <literal>fire()</literal>:"
+msgstr "O produtor do evento (event producer) passa uma instância dessa classe para <literal>fire()</literal>:"
#. Tag: programlisting
#: events.xml:176
#, no-c-format
-msgid ""
-"<![CDATA[documentEvent.fire( document, new RoleBinding() { public void value"
-"() { return user.getRole(); } } );]]>"
-msgstr ""
+msgid "<![CDATA[documentEvent.fire( document, new RoleBinding() { public void value() { return user.getRole(); } } );]]>"
+msgstr "<![CDATA[documentEvent.fire( document, new RoleBinding() { public void value() { return user.getRole(); } } );]]>"
#. Tag: title
#: events.xml:181
@@ -434,122 +364,95 @@
msgid ""
"<![CDATA[@Observable @Blog Event<Document> blogEvent;\n"
"...\n"
-"if (document.isBlog()) blogEvent.fire(document, new "
-"AnnotationLiteral<Updated>(){});]]>"
+"if (document.isBlog()) blogEvent.fire(document, new AnnotationLiteral<Updated>(){});]]>"
msgstr ""
+"<![CDATA[@Observable @Blog Event<Document> blogEvent;\n"
+"...\n"
+"if (document.isBlog()) blogEvent.fire(document, new AnnotationLiteral<Updated>(){});]]>"
#. Tag: para
#: events.xml:187
#, no-c-format
-msgid ""
-"When this event occurs, all of the following observer methods will be "
-"notified:"
-msgstr ""
+msgid "When this event occurs, all of the following observer methods will be notified:"
+msgstr "Quando esse evento ocorre, todos os métodos observadores que seguem esse evento serão notificados:"
#. Tag: programlisting
#: events.xml:189
#, no-c-format
-msgid ""
-"<![CDATA[public void afterBlogUpdate(@Observes @Updated @Blog Document "
-"document) { ... }]]>"
-msgstr ""
+msgid "<![CDATA[public void afterBlogUpdate(@Observes @Updated @Blog Document document) { ... }]]>"
+msgstr "<![CDATA[public void afterBlogUpdate(@Observes @Updated @Blog Document document) { ... }]]>"
#. Tag: programlisting
#: events.xml:191
#, no-c-format
-msgid ""
-"<![CDATA[public void onAnyBlogEvent(@Observes @Blog Document document) "
-"{ ... }]]>"
-msgstr ""
+msgid "<![CDATA[public void onAnyBlogEvent(@Observes @Blog Document document) { ... }]]>"
+msgstr "<![CDATA[public void onAnyBlogEvent(@Observes @Blog Document document) { ... }]]>"
#. Tag: programlisting
#: events.xml:192
#, no-c-format
-msgid ""
-"<![CDATA[public void onAnyDocumentEvent(@Observes Document document) "
-"{ ... }}}]]>"
-msgstr ""
+msgid "<![CDATA[public void onAnyDocumentEvent(@Observes Document document) { ... }}}]]>"
+msgstr "<![CDATA[public void onAnyDocumentEvent(@Observes Document document) { ... }}}]]>"
#. Tag: title
#: events.xml:197
#, no-c-format
msgid "Transactional observers"
-msgstr ""
+msgstr "Observadores transacionais"
#. Tag: para
#: events.xml:199
#, no-c-format
-msgid ""
-"Transactional observers receive their event notifications during the before "
-"or after completion phase of the transaction in which the event was raised. "
-"For example, the following observer method needs to refresh a query result "
-"set that is cached in the application context, but only when transactions "
-"that update the <literal>Category</literal> tree succeed:"
+msgid "Transactional observers receive their event notifications during the before or after completion phase of the transaction in which the event was raised. For example, the following observer method needs to refresh a query result set that is cached in the application context, but only when transactions that update the <literal>Category</literal> tree succeed:"
msgstr ""
#. Tag: programlisting
#: events.xml:205
#, no-c-format
-msgid ""
-"<![CDATA[public void refreshCategoryTree(@AfterTransactionSuccess @Observes "
-"CategoryUpdateEvent event) { ... }]]>"
-msgstr ""
+msgid "<![CDATA[public void refreshCategoryTree(@AfterTransactionSuccess @Observes CategoryUpdateEvent event) { ... }]]>"
+msgstr "<![CDATA[public void refreshCategoryTree(@AfterTransactionSuccess @Observes CategoryUpdateEvent event) { ... }]]>"
#. Tag: para
#: events.xml:207
#, no-c-format
msgid "There are three kinds of transactional observers:"
-msgstr ""
+msgstr "Existem três tipos de observadores transacionais:"
#. Tag: para
#: events.xml:211
#, no-c-format
-msgid ""
-"<literal>@AfterTransactionSuccess</literal> observers are called during the "
-"after completion phase of the transaction, but only if the transaction "
-"completes successfully"
+msgid "<literal>@AfterTransactionSuccess</literal> observers are called during the after completion phase of the transaction, but only if the transaction completes successfully"
msgstr ""
#. Tag: para
#: events.xml:216
#, no-c-format
-msgid ""
-"<literal>@AfterTransactionFailure</literal> observers are called during the "
-"after completion phase of the transaction, but only if the transaction fails "
-"to complete successfully"
+msgid "<literal>@AfterTransactionFailure</literal> observers are called during the after completion phase of the transaction, but only if the transaction fails to complete successfully"
msgstr ""
#. Tag: para
#: events.xml:221
#, no-c-format
-msgid ""
-"<literal>@AfterTransactionCompletion</literal> observers are called during "
-"the after completion phase of the transaction"
+msgid "<literal>@AfterTransactionCompletion</literal> observers are called during the after completion phase of the transaction"
msgstr ""
#. Tag: para
#: events.xml:225
#, no-c-format
-msgid ""
-"<literal>@BeforeTransactionCompletion</literal> observers are called during "
-"the before completion phase of the transaction"
+msgid "<literal>@BeforeTransactionCompletion</literal> observers are called during the before completion phase of the transaction"
msgstr ""
#. Tag: para
#: events.xml:230
#, no-c-format
-msgid ""
-"Transactional observers are very important in a stateful object model like "
-"Web Beans, because state is often held for longer than a single atomic "
-"transaction."
+msgid "Transactional observers are very important in a stateful object model like Web Beans, because state is often held for longer than a single atomic transaction."
msgstr ""
#. Tag: para
#: events.xml:233
#, no-c-format
-msgid ""
-"Imagine that we have cached a JPA query result set in the application scope:"
-msgstr ""
+msgid "Imagine that we have cached a JPA query result set in the application scope:"
+msgstr "Imagine que fizemos cache do conjunto de resultados da consulta JPA no escopo de aplicação (application scope):"
#. Tag: programlisting
#: events.xml:235
@@ -565,8 +468,7 @@
" @Produces @Catalog \n"
" List<Product> getCatalog() {\n"
" if (products==null) {\n"
-" products = em.createQuery(\"select p from Product p where p."
-"deleted = false\")\n"
+" products = em.createQuery(\"select p from Product p where p.deleted = false\")\n"
" .getResultList();\n"
" }\n"
" return products;\n"
@@ -574,24 +476,35 @@
" \n"
"}]]>"
msgstr ""
+"<![CDATA[@ApplicationScoped @Singleton\n"
+"public class Catalog {\n"
+"\n"
+" @PersistenceContext EntityManager em;\n"
+" \n"
+" List<Product> products;\n"
+"\n"
+" @Produces @Catalog \n"
+" List<Product> getCatalog() {\n"
+" if (products==null) {\n"
+" products = em.createQuery(\"select p from Product p where p.deleted = false\")\n"
+" .getResultList();\n"
+" }\n"
+" return products;\n"
+" }\n"
+" \n"
+"}]]>"
#. Tag: para
#: events.xml:237
#, no-c-format
-msgid ""
-"From time to time, a <literal>Product</literal> is created or deleted. When "
-"this occurs, we need to refresh the <literal>Product</literal> catalog. But "
-"we should wait until <emphasis>after</emphasis> the transaction completes "
-"successfully before performing this refresh!"
+msgid "From time to time, a <literal>Product</literal> is created or deleted. When this occurs, we need to refresh the <literal>Product</literal> catalog. But we should wait until <emphasis>after</emphasis> the transaction completes successfully before performing this refresh!"
msgstr ""
#. Tag: para
#: events.xml:242
#, no-c-format
-msgid ""
-"The Web Bean that creates and deletes <literal>Product</literal>s could "
-"raise events, for example:"
-msgstr ""
+msgid "The Web Bean that creates and deletes <literal>Product</literal>s could raise events, for example:"
+msgstr "O Web Bean que cria e remove <literal>Products</literal> pode lançar eventos, por exemplo:"
#. Tag: programlisting
#: events.xml:245
@@ -617,14 +530,31 @@
" \n"
"}]]>"
msgstr ""
+"<![CDATA[@Stateless\n"
+"public class ProductManager {\n"
+"\n"
+" @PersistenceContext EntityManager em;\n"
+" @Observable Event<Product> productEvent;\n"
+"\n"
+" public void delete(Product product) {\n"
+" em.delete(product);\n"
+" productEvent.fire(product, new AnnotationLiteral<Deleted>(){});\n"
+" }\n"
+" \n"
+" public void persist(Product product) {\n"
+" em.persist(product);\n"
+" productEvent.fire(product, new AnnotationLiteral<Created>(){});\n"
+" }\n"
+" \n"
+" ...\n"
+" \n"
+"}]]>"
#. Tag: para
#: events.xml:247
#, no-c-format
-msgid ""
-"And now <literal>Catalog</literal> can observe the events after successful "
-"completion of the transaction:"
-msgstr ""
+msgid "And now <literal>Catalog</literal> can observe the events after successful completion of the transaction:"
+msgstr "E agora <literal>Catalog</literal> pode observar os eventos após o término da transação com sucesso:"
#. Tag: programlisting
#: events.xml:250
@@ -635,15 +565,28 @@
"\n"
" ...\n"
" \n"
-" void addProduct(@AfterTransactionSuccess @Observes @Created Product "
-"product) {\n"
+" void addProduct(@AfterTransactionSuccess @Observes @Created Product product) {\n"
" products.add(product);\n"
" }\n"
" \n"
-" void addProduct(@AfterTransactionSuccess @Observes @Deleted Product "
-"product) {\n"
+" void addProduct(@AfterTransactionSuccess @Observes @Deleted Product product) {\n"
" products.remove(product);\n"
" }\n"
" \n"
"}]]>"
msgstr ""
+"<![CDATA[@ApplicationScoped @Singleton\n"
+"public class Catalog {\n"
+"\n"
+" ...\n"
+" \n"
+" void addProduct(@AfterTransactionSuccess @Observes @Created Product product) {\n"
+" products.add(product);\n"
+" }\n"
+" \n"
+" void addProduct(@AfterTransactionSuccess @Observes @Deleted Product product) {\n"
+" products.remove(product);\n"
+" }\n"
+" \n"
+"}]]>"
+
Modified: doc/trunk/reference/pt-BR/example.po
===================================================================
--- doc/trunk/reference/pt-BR/example.po 2009-02-28 14:04:13 UTC (rev 1744)
+++ doc/trunk/reference/pt-BR/example.po 2009-03-01 00:42:05 UTC (rev 1745)
@@ -5,9 +5,9 @@
msgstr ""
"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
-"POT-Creation-Date: 2009-01-06 11:30+0000\n"
-"PO-Revision-Date: 2009-01-06 11:30+0000\n"
-"Last-Translator: Automatically generated\n"
+"POT-Creation-Date: 2009-02-07 18:51+0000\n"
+"PO-Revision-Date: 2009-02-28 15:05-0300\n"
+"Last-Translator: João Paulo Viragine <joao.viragine(a)redhat.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -17,16 +17,13 @@
#: example.xml:4
#, no-c-format
msgid "JSF web application example"
-msgstr ""
+msgstr "Aplicação web JSF de exemplo"
#. Tag: para
#: example.xml:6
#, no-c-format
-msgid ""
-"Let's illustrate these ideas with a full example. We're going to implement "
-"user login/logout for an application that uses JSF. First, we'll define a "
-"Web Bean to hold the username and password entered during login:"
-msgstr ""
+msgid "Let's illustrate these ideas with a full example. We're going to implement user login/logout for an application that uses JSF. First, we'll define a Web Bean to hold the username and password entered during login:"
+msgstr "Vamos ilustrar estas idéias com um exemplo completo. Nós iremos implementar um login/logout de usuário de uma aplicação que utiliza JSF. Primeiro, vamos definir um Web Bean que irá armazenar o nome de usuário (username) e a senha (password) fornecidos durante o login:"
#. Tag: programlisting
#: example.xml:11
@@ -46,12 +43,25 @@
" \n"
"}]]>"
msgstr ""
+"<![CDATA[@Named @RequestScoped\n"
+"public class Credentials {\n"
+" \n"
+" private String username;\n"
+" private String password;\n"
+" \n"
+" public String getUsername() { return username; }\n"
+" public void setUsername(String username) { this.username = username; }\n"
+" \n"
+" public String getPassword() { return password; }\n"
+" public void setPassword(String password) { this.password = password; }\n"
+" \n"
+"}]]>"
#. Tag: para
#: example.xml:13
#, no-c-format
msgid "This Web Bean is bound to the login prompt in the following JSF form:"
-msgstr ""
+msgstr "Este Web Bean é vinculado ao prompt de login no seguinte formulário JSF:"
#. Tag: programlisting
#: example.xml:15
@@ -64,21 +74,26 @@
" <h:outputLabel for=\"password\">Password:</h:outputLabel>\n"
" <h:inputText id=\"password\" value=\"#{credentials.password}\"/>\n"
" </h:panelGrid>\n"
-" <h:commandButton value=\"Login\" action=\"#{login.login}\" rendered=\"#{!"
-"login.loggedIn}\"/>\n"
-" <h:commandButton value=\"Logout\" acion=\"#{login.logout}\" rendered=\"#"
-"{login.loggedIn}\"/>\n"
+" <h:commandButton value=\"Login\" action=\"#{login.login}\" rendered=\"#{!login.loggedIn}\"/>\n"
+" <h:commandButton value=\"Logout\" acion=\"#{login.logout}\" rendered=\"#{login.loggedIn}\"/>\n"
"</h:form>]]>"
msgstr ""
+"<![CDATA[<h:form>\n"
+" <h:panelGrid columns=\"2\" rendered=\"#{!login.loggedIn}\">\n"
+" <h:outputLabel for=\"username\">Username:</h:outputLabel>\n"
+" <h:inputText id=\"username\" value=\"#{credentials.username}\"/>\n"
+" <h:outputLabel for=\"password\">Password:</h:outputLabel>\n"
+" <h:inputText id=\"password\" value=\"#{credentials.password}\"/>\n"
+" </h:panelGrid>\n"
+" <h:commandButton value=\"Login\" action=\"#{login.login}\" rendered=\"#{!login.loggedIn}\"/>\n"
+" <h:commandButton value=\"Logout\" acion=\"#{login.logout}\" rendered=\"#{login.loggedIn}\"/>\n"
+"</h:form>]]>"
#. Tag: para
#: example.xml:17
#, no-c-format
-msgid ""
-"The actual work is done by a session scoped Web Bean that maintains "
-"information about the currently logged-in user and exposes the "
-"<literal>User</literal> entity to other Web Beans:"
-msgstr ""
+msgid "The actual work is done by a session scoped Web Bean that maintains information about the currently logged-in user and exposes the <literal>User</literal> entity to other Web Beans:"
+msgstr "O efetivo trabalho é feito por um Web Bean em escopo de sessão que mantém informações sobre o atual usuário conectado e expõe a entidade <literal>User</literal> para outros Web Beans:"
#. Tag: programlisting
#: example.xml:21
@@ -95,8 +110,7 @@
" public void login() {\n"
" \n"
" List<User> results = userDatabase.createQuery(\n"
-" \"select u from User u where u.username=:username and u.password=:"
-"password\")\n"
+" \"select u from User u where u.username=:username and u.password=:password\")\n"
" .setParameter(\"username\", credentials.getUsername())\n"
" .setParameter(\"password\", credentials.getPassword())\n"
" .getResultList();\n"
@@ -121,12 +135,47 @@
"\n"
"}]]>"
msgstr ""
+"<![CDATA[@SessionScoped @Named\n"
+"public class Login {\n"
+"\n"
+" @Current Credentials credentials;\n"
+" @PersistenceContext EntityManager userDatabase;\n"
+"\n"
+" private User user;\n"
+" \n"
+" public void login() {\n"
+" \n"
+" List<User> results = userDatabase.createQuery(\n"
+" \"select u from User u where u.username=:username and u.password=:password\")\n"
+" .setParameter(\"username\", credentials.getUsername())\n"
+" .setParameter(\"password\", credentials.getPassword())\n"
+" .getResultList();\n"
+" \n"
+" if ( !results.isEmpty() ) {\n"
+" user = results.get(0);\n"
+" }\n"
+" \n"
+" }\n"
+" \n"
+" public void logout() {\n"
+" user = null;\n"
+" }\n"
+" \n"
+" public boolean isLoggedIn() {\n"
+" return user!=null;\n"
+" }\n"
+" \n"
+" @Produces @LoggedIn User getCurrentUser() {\n"
+" return user;\n"
+" }\n"
+"\n"
+"}]]>"
#. Tag: para
#: example.xml:23
#, no-c-format
msgid "Of course, <literal>@LoggedIn</literal> is a binding annotation:"
-msgstr ""
+msgstr "Certamente, <literal>@LoggedIn</literal> é uma anotação de ligação (binding annotation):"
#. Tag: programlisting
#: example.xml:25
@@ -137,12 +186,16 @@
"@BindingType\n"
"public @interface LoggedIn {}]]>"
msgstr ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"@Target({TYPE, METHOD, FIELD})\n"
+"@BindingType\n"
+"public @interface LoggedIn {}]]>"
#. Tag: para
#: example.xml:27
#, no-c-format
msgid "Now, any other Web Bean can easily inject the current user:"
-msgstr ""
+msgstr "Agora, qualquer outro Web Bean pode facilmente injetar o usuário atual:"
#. Tag: programlisting
#: example.xml:29
@@ -161,12 +214,22 @@
" \n"
"}]]>"
msgstr ""
+"<![CDATA[public class DocumentEditor {\n"
+"\n"
+" @Current Document document;\n"
+" @LoggedIn User currentUser;\n"
+" @PersistenceContext EntityManager docDatabase;\n"
+" \n"
+" public void save() {\n"
+" document.setCreatedBy(currentUser);\n"
+" docDatabase.persist(document);\n"
+" }\n"
+" \n"
+"}]]>"
#. Tag: para
#: example.xml:31
#, no-c-format
-msgid ""
-"Hopefully, this example gives a flavor of the Web Bean programming model. In "
-"the next chapter, we'll explore Web Beans dependency injection in greater "
-"depth."
-msgstr ""
+msgid "Hopefully, this example gives a flavor of the Web Bean programming model. In the next chapter, we'll explore Web Beans dependency injection in greater depth."
+msgstr "Esperamos que este exemplo pôde dar um gostinho do modelo de programação com Web Bean. No capítulo seguinte, iremos explorar a injeção de dependências da Web Beans em profundidade."
+
Modified: doc/trunk/reference/pt-BR/extend.po
===================================================================
--- doc/trunk/reference/pt-BR/extend.po 2009-02-28 14:04:13 UTC (rev 1744)
+++ doc/trunk/reference/pt-BR/extend.po 2009-03-01 00:42:05 UTC (rev 1745)
@@ -6,8 +6,8 @@
"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-06 11:30+0000\n"
-"PO-Revision-Date: 2009-01-06 11:30+0000\n"
-"Last-Translator: Automatically generated\n"
+"PO-Revision-Date: 2009-02-28 15:05-0300\n"
+"Last-Translator: João Paulo Viragine <joao.viragine(a)redhat.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -17,60 +17,49 @@
#: extend.xml:4
#, no-c-format
msgid "Extending Web Beans"
-msgstr ""
+msgstr "Extendendo o Web Beans"
#. Tag: para
#: extend.xml:6
#, no-c-format
-msgid ""
-"Web Beans is intended to be a platform for frameworks, extensions and "
-"integration with other technologies. Therefore, Web Beans exposes a set of "
-"SPIs for the use of developers of portable extensions to Web Beans. For "
-"example, the following kinds of extensions were envisaged by the designers "
-"of Web Beans:"
-msgstr ""
+msgid "Web Beans is intended to be a platform for frameworks, extensions and integration with other technologies. Therefore, Web Beans exposes a set of SPIs for the use of developers of portable extensions to Web Beans. For example, the following kinds of extensions were envisaged by the designers of Web Beans:"
+msgstr "Web Beans pretende ser uma plataforma para frameworks, extensões e integração com outras tecnologias. Portanto, Web Beans expõe um conjunto de SPIs para a utilização pelos desenvolvedores de extensões portáveis para Web Beans. Por exemplo, os seguintes tipos de extensões estavam previstas pelos designers da Web Beans:"
#. Tag: para
#: extend.xml:14
#, no-c-format
msgid "integration with Business Process Management engines,"
-msgstr ""
+msgstr "Integração com motores de gerenciamento de processos de negócios (Business Process Management )"
#. Tag: para
#: extend.xml:17
#, no-c-format
-msgid ""
-"integration with third-party frameworks such as Spring, Seam, GWT or Wicket, "
-"and"
-msgstr ""
+msgid "integration with third-party frameworks such as Spring, Seam, GWT or Wicket, and"
+msgstr "integração com frameworks de terceiros, tais como Spring, Seam, gwt ou Wicket, e"
#. Tag: para
#: extend.xml:21
#, no-c-format
msgid "new technology based upon the Web Beans programming model."
-msgstr ""
+msgstr "nova tecnologia baseada no modelo de programação.de Web Beans."
#. Tag: para
#: extend.xml:25
#, no-c-format
-msgid ""
-"The nerve center for extending Web Beans is the <literal>Manager</literal> "
-"object."
-msgstr ""
+msgid "The nerve center for extending Web Beans is the <literal>Manager</literal> object."
+msgstr "O nervo central para extender o Web Beans é o objeto <literal>Manager</literal>."
#. Tag: title
#: extend.xml:29
#, no-c-format
msgid "The <literal>Manager</literal> object"
-msgstr ""
+msgstr "O objeto <literal>Manager</literal>"
#. Tag: para
#: extend.xml:31
#, no-c-format
-msgid ""
-"The <literal>Manager</literal> interface lets us register and obtain Web "
-"Beans, interceptors, decorators, observers and contexts programatically."
-msgstr ""
+msgid "The <literal>Manager</literal> interface lets us register and obtain Web Beans, interceptors, decorators, observers and contexts programatically."
+msgstr "A interface <literal>Manager</literal> permite registrar e obter Web Beans, interceptadores (interceptors), decoradores (decorators), observadores (observers) e contextos (contexts) programaticamente."
#. Tag: programlisting
#: extend.xml:34
@@ -79,8 +68,7 @@
"<![CDATA[public interface Manager\n"
"{\n"
"\n"
-" public <T> Set<Bean<T>> resolveByType(Class<T> type, Annotation... "
-"bindings);\n"
+" public <T> Set<Bean<T>> resolveByType(Class<T> type, Annotation... bindings);\n"
"\n"
" public <T> Set<Bean<T>> resolveByType(TypeLiteral<T> apiType,\n"
" Annotation... bindings);\n"
@@ -111,19 +99,16 @@
" public <T> Manager addObserver(Observer<T> observer, Class<T> eventType,\n"
" Annotation... bindings);\n"
"\n"
-" public <T> Manager addObserver(Observer<T> observer, TypeLiteral<T> "
-"eventType,\n"
+" public <T> Manager addObserver(Observer<T> observer, TypeLiteral<T> eventType,\n"
" Annotation... bindings);\n"
"\n"
-" public <T> Manager removeObserver(Observer<T> observer, Class<T> "
-"eventType,\n"
+" public <T> Manager removeObserver(Observer<T> observer, Class<T> eventType,\n"
" Annotation... bindings);\n"
"\n"
" public <T> Manager removeObserver(Observer<T> observer,\n"
" TypeLiteral<T> eventType, Annotation... bindings);\n"
"\n"
-" public <T> Set<Observer<T>> resolveObservers(T event, Annotation... "
-"bindings);\n"
+" public <T> Set<Observer<T>> resolveObservers(T event, Annotation... bindings);\n"
"\n"
" public List<Interceptor> resolveInterceptors(InterceptionType type,\n"
" Annotation... interceptorBindings);\n"
@@ -133,33 +118,82 @@
"\n"
"}]]>"
msgstr ""
+"<![CDATA[public interface Manager\n"
+"{\n"
+"\n"
+" public <T> Set<Bean<T>> resolveByType(Class<T> type, Annotation... bindings);\n"
+"\n"
+" public <T> Set<Bean<T>> resolveByType(TypeLiteral<T> apiType,\n"
+" Annotation... bindings);\n"
+"\n"
+" public <T> T getInstanceByType(Class<T> type, Annotation... bindings);\n"
+"\n"
+" public <T> T getInstanceByType(TypeLiteral<T> type,\n"
+" Annotation... bindings);\n"
+"\n"
+" public Set<Bean<?>> resolveByName(String name);\n"
+"\n"
+" public Object getInstanceByName(String name);\n"
+"\n"
+" public <T> T getInstance(Bean<T> bean);\n"
+"\n"
+" public void fireEvent(Object event, Annotation... bindings);\n"
+"\n"
+" public Context getContext(Class<? extends Annotation> scopeType);\n"
+"\n"
+" public Manager addContext(Context context);\n"
+"\n"
+" public Manager addBean(Bean<?> bean);\n"
+"\n"
+" public Manager addInterceptor(Interceptor interceptor);\n"
+"\n"
+" public Manager addDecorator(Decorator decorator);\n"
+"\n"
+" public <T> Manager addObserver(Observer<T> observer, Class<T> eventType,\n"
+" Annotation... bindings);\n"
+"\n"
+" public <T> Manager addObserver(Observer<T> observer, TypeLiteral<T> eventType,\n"
+" Annotation... bindings);\n"
+"\n"
+" public <T> Manager removeObserver(Observer<T> observer, Class<T> eventType,\n"
+" Annotation... bindings);\n"
+"\n"
+" public <T> Manager removeObserver(Observer<T> observer,\n"
+" TypeLiteral<T> eventType, Annotation... bindings);\n"
+"\n"
+" public <T> Set<Observer<T>> resolveObservers(T event, Annotation... bindings);\n"
+"\n"
+" public List<Interceptor> resolveInterceptors(InterceptionType type,\n"
+" Annotation... interceptorBindings);\n"
+"\n"
+" public List<Decorator> resolveDecorators(Set<Class<?>> types,\n"
+" Annotation... bindings);\n"
+"\n"
+"}]]>"
#. Tag: para
#: extend.xml:36
#, no-c-format
msgid "We can obtain an instance of <literal>Manager</literal> via injection:"
-msgstr ""
+msgstr "Nós podemos obter uma instância do <literal>Manager</literal> via injeção:"
#. Tag: programlisting
#: extend.xml:38
#, no-c-format
msgid "@Current Manager manager"
-msgstr ""
+msgstr "@Current Manager manager"
#. Tag: title
#: extend.xml:43
#, no-c-format
msgid "The <literal>Bean</literal> class"
-msgstr ""
+msgstr "A classe <literal>Bean</literal> "
#. Tag: para
#: extend.xml:45
#, no-c-format
-msgid ""
-"Instances of the abstract class <literal>Bean</literal> represent Web Beans. "
-"There is an instance of <literal>Bean</literal> registered with the "
-"<literal>Manager</literal> object for every Web Bean in the application."
-msgstr ""
+msgid "Instances of the abstract class <literal>Bean</literal> represent Web Beans. There is an instance of <literal>Bean</literal> registered with the <literal>Manager</literal> object for every Web Bean in the application."
+msgstr "Instâncias da classe abstrata <literal>Bean</literal> representam Web Beans. Existe uma instância do <literal>Bean</literal> registrado com o objeto <literal>Manager</literal> para todos os Web Bean na aplicação."
#. Tag: programlisting
#: extend.xml:50
@@ -191,41 +225,55 @@
" \n"
"}"
msgstr ""
+"public abstract class Bean<T> {\n"
+" \n"
+" private final Manager manager;\n"
+" \n"
+" protected Bean(Manager manager) {\n"
+" this.manager=manager;\n"
+" }\n"
+" \n"
+" protected Manager getManager() {\n"
+" return manager;\n"
+" }\n"
+" \n"
+" public abstract Set<Class> getTypes();\n"
+" public abstract Set<Annotation> getBindingTypes();\n"
+" public abstract Class<? extends Annotation> getScopeType();\n"
+" public abstract Class<? extends Annotation> getDeploymentType(); \n"
+" public abstract String getName();\n"
+" \n"
+" public abstract boolean isSerializable();\n"
+" public abstract boolean isNullable();\n"
+"\n"
+" public abstract T create();\n"
+" public abstract void destroy(T instance);\n"
+" \n"
+"}"
#. Tag: para
#: extend.xml:52
#, no-c-format
-msgid ""
-"It's possible to extend the <literal>Bean</literal> class and register "
-"instances by calling <literal>Manager.addBean()</literal> to provide support "
-"for new kinds of Web Beans, beyond those defined by the Web Beans "
-"specification (simple and enterprise Web Beans, producer methods and JMS "
-"endpoints). For example, we could use the <literal>Bean</literal> class to "
-"allow objects managed by another framework to be injected into Web Beans."
-msgstr ""
+msgid "It's possible to extend the <literal>Bean</literal> class and register instances by calling <literal>Manager.addBean()</literal> to provide support for new kinds of Web Beans, beyond those defined by the Web Beans specification (simple and enterprise Web Beans, producer methods and JMS endpoints). For example, we could use the <literal>Bean</literal> class to allow objects managed by another framework to be injected into Web Beans."
+msgstr "É possível estender a classe <literal>Bean</literal> e registrar instâncias através da chamada <literal>Manager.addBean()</literal> para fornecer suporte para novos tipos de Web Beans, além das definidas pela especificação Web Beans (simples e coporativos (enterprise) Web Beans, métodos produtores (producer methods) e endpoints JMS). Por exemplo, poderíamos usar a classe <literal>Bean</literal> para permitir que os objetos gerenciados por um outro framework possam ser injetados nos Web Beans."
#. Tag: para
#: extend.xml:60
#, no-c-format
-msgid ""
-"There are two subclasses of <literal>Bean</literal> defined by the Web Beans "
-"specification: <literal>Interceptor</literal> and <literal>Decorator</"
-"literal>."
-msgstr ""
+msgid "There are two subclasses of <literal>Bean</literal> defined by the Web Beans specification: <literal>Interceptor</literal> and <literal>Decorator</literal>."
+msgstr "Existem duas subclasses de <literal>Bean</literal> definidas pela especificação de Web Beans: <literal>Interceptor</literal> e <literal>Decorator</literal>."
#. Tag: title
#: extend.xml:67
#, no-c-format
msgid "The <literal>Context</literal> interface"
-msgstr ""
+msgstr "A interface <literal>Context</literal>"
#. Tag: para
#: extend.xml:69
#, no-c-format
-msgid ""
-"The <literal>Context</literal> interface supports addition of new scopes to "
-"Web Beans, or extension of the built-in scopes to new environments."
-msgstr ""
+msgid "The <literal>Context</literal> interface supports addition of new scopes to Web Beans, or extension of the built-in scopes to new environments."
+msgstr "A interface <literal>Context</literal> suporta a adição de novos escopos ao Web Beans, ou extensões dos escopos existentes (built-in scopes) para novos ambientes."
#. Tag: programlisting
#: extend.xml:72
@@ -241,12 +289,19 @@
" \n"
"}"
msgstr ""
+"public interface Context {\n"
+" \n"
+" public Class<? extends Annotation> getScopeType();\n"
+" \n"
+" public <T> T get(Bean<T> bean, boolean create);\n"
+" \n"
+" boolean isActive();\n"
+" \n"
+"}"
#. Tag: para
#: extend.xml:74
#, no-c-format
-msgid ""
-"For example, we might implement <literal>Context</literal> to add a business "
-"process scope to Web Beans, or to add support for the conversation scope to "
-"an application that uses Wicket."
-msgstr ""
+msgid "For example, we might implement <literal>Context</literal> to add a business process scope to Web Beans, or to add support for the conversation scope to an application that uses Wicket."
+msgstr "Por exemplo, nós poderíamos implementar <literal>Context</literal> para adicionar um escopo de processo de negócios (business process scope) para Web Beans, ou para adicionar suporte para o escopo de conversação (conversation scope) para uma aplicação que utiliza o Wicket."
+
Modified: doc/trunk/reference/pt-BR/injection.po
===================================================================
--- doc/trunk/reference/pt-BR/injection.po 2009-02-28 14:04:13 UTC (rev 1744)
+++ doc/trunk/reference/pt-BR/injection.po 2009-03-01 00:42:05 UTC (rev 1745)
@@ -6,8 +6,8 @@
"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-06 11:30+0000\n"
-"PO-Revision-Date: 2009-01-06 11:30+0000\n"
-"Last-Translator: Automatically generated\n"
+"PO-Revision-Date: 2009-02-28 15:06-0300\n"
+"Last-Translator: João Paulo Viragine <joao.viragine(a)redhat.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -17,7 +17,7 @@
#: injection.xml:4
#, no-c-format
msgid "Dependency injection"
-msgstr ""
+msgstr "Injeção de Dependências"
#. Tag: para
#: injection.xml:6
@@ -46,6 +46,16 @@
"\n"
"}]]>"
msgstr ""
+"<![CDATA[public class Checkout {\n"
+" \n"
+" private final ShoppingCart cart;\n"
+" \n"
+" @Initializer\n"
+" public Checkout(ShoppingCart cart) {\n"
+" this.cart = cart;\n"
+" }\n"
+"\n"
+"}]]>"
#. Tag: para
#: injection.xml:12
@@ -68,6 +78,16 @@
" \n"
"}]]>"
msgstr ""
+"<![CDATA[public class Checkout {\n"
+" \n"
+" private ShoppingCart cart;\n"
+"\n"
+" @Initializer \n"
+" void setShoppingCart(ShoppingCart cart) {\n"
+" this.cart = cart;\n"
+" }\n"
+" \n"
+"}]]>"
#. Tag: para
#: injection.xml:16
@@ -85,29 +105,28 @@
" \n"
"}]]>"
msgstr ""
+"<![CDATA[public class Checkout {\n"
+"\n"
+" private @Current ShoppingCart cart;\n"
+" \n"
+"}]]>"
#. Tag: para
#: injection.xml:20
#, no-c-format
-msgid ""
-"Dependency injection always occurs when the Web Bean instance is first "
-"instantiated."
+msgid "Dependency injection always occurs when the Web Bean instance is first instantiated."
msgstr ""
#. Tag: para
#: injection.xml:25
#, no-c-format
-msgid ""
-"First, the Web Bean manager calls the Web Bean constructor, to obtain an "
-"instance of the Web Bean."
+msgid "First, the Web Bean manager calls the Web Bean constructor, to obtain an instance of the Web Bean."
msgstr ""
#. Tag: para
#: injection.xml:29
#, no-c-format
-msgid ""
-"Next, the Web Bean manager initializes the values of all injected fields of "
-"the Web Bean."
+msgid "Next, the Web Bean manager initializes the values of all injected fields of the Web Bean."
msgstr ""
#. Tag: para
@@ -119,28 +138,19 @@
#. Tag: para
#: injection.xml:37
#, no-c-format
-msgid ""
-"Finally, the <literal>@PostConstruct</literal> method of the Web Bean, if "
-"any, is called."
+msgid "Finally, the <literal>@PostConstruct</literal> method of the Web Bean, if any, is called."
msgstr ""
#. Tag: para
#: injection.xml:42
#, no-c-format
-msgid ""
-"Constructor parameter injection is not supported for EJB beans, since the "
-"EJB is instantiated by the EJB container, not the Web Bean manager."
-msgstr ""
+msgid "Constructor parameter injection is not supported for EJB beans, since the EJB is instantiated by the EJB container, not the Web Bean manager."
+msgstr "Injeção de parâmetros no construtor não é suportado em EJB beans, uma vez que o EJB é instanciado pelo container EJB e não pelo gerenciador do Web Bean."
#. Tag: para
#: injection.xml:45
#, no-c-format
-msgid ""
-"Parameters of constructors and initializer methods need not be explicitly "
-"annotated when the default binding type <literal>@Current</literal> applies. "
-"Injected fields, however, <emphasis>must</emphasis> specify a binding type, "
-"even when the default binding type applies. If the field does not specify a "
-"binding type, it will not be injected."
+msgid "Parameters of constructors and initializer methods need not be explicitly annotated when the default binding type <literal>@Current</literal> applies. Injected fields, however, <emphasis>must</emphasis> specify a binding type, even when the default binding type applies. If the field does not specify a binding type, it will not be injected."
msgstr ""
#. Tag: para
@@ -157,70 +167,51 @@
" return new Checkout(cart);\n"
"}]]>"
msgstr ""
+"<![CDATA[@Produces Checkout createCheckout(ShoppingCart cart) {\n"
+" return new Checkout(cart);\n"
+"}]]>"
#. Tag: para
#: injection.xml:55
#, no-c-format
-msgid ""
-"Finally, observer methods (which we'll meet in <xref linkend=\"events\"/>), "
-"disposal methods and destructor methods all support parameter injection."
+msgid "Finally, observer methods (which we'll meet in <xref linkend=\"events\"/>), disposal methods and destructor methods all support parameter injection."
msgstr ""
#. Tag: para
#: injection.xml:58
#, no-c-format
-msgid ""
-"The Web Beans specification defines a procedure, called the "
-"<emphasis>typesafe resolution algorithm</emphasis>, that the Web Bean "
-"manager follows when identifying the Web Bean to inject to an injection "
-"point. This algorithm looks complex at first, but once you understand it, "
-"it's really quite intuitive. Typesafe resolution is performed at system "
-"initialization time, which means that the manager will inform the user "
-"immediately if a Web Bean's dependencies cannot be satisfied, by throwing a "
-"<literal>UnsatisfiedDependencyException</literal> or "
-"<literal>AmbiguousDependencyException</literal>."
+msgid "The Web Beans specification defines a procedure, called the <emphasis>typesafe resolution algorithm</emphasis>, that the Web Bean manager follows when identifying the Web Bean to inject to an injection point. This algorithm looks complex at first, but once you understand it, it's really quite intuitive. Typesafe resolution is performed at system initialization time, which means that the manager will inform the user immediately if a Web Bean's dependencies cannot be satisfied, by throwing a <literal>UnsatisfiedDependencyException</literal> or <literal>AmbiguousDependencyException</literal>."
msgstr ""
#. Tag: para
#: injection.xml:67
#, no-c-format
-msgid ""
-"The purpose of this algorithm is to allow multiple Web Beans to implement "
-"the same API type and either:"
+msgid "The purpose of this algorithm is to allow multiple Web Beans to implement the same API type and either:"
msgstr ""
#. Tag: para
#: injection.xml:72
#, no-c-format
-msgid ""
-"allow the client to select which implementation it requires using "
-"<emphasis>binding annotations</emphasis>,"
+msgid "allow the client to select which implementation it requires using <emphasis>binding annotations</emphasis>,"
msgstr ""
#. Tag: para
#: injection.xml:77
#, no-c-format
-msgid ""
-"allow the application deployer to select which implementation is appropriate "
-"for a particular deployment, without changes to the client, by enabling or "
-"disabling <emphasis>deployment types</emphasis>, or"
+msgid "allow the application deployer to select which implementation is appropriate for a particular deployment, without changes to the client, by enabling or disabling <emphasis>deployment types</emphasis>, or"
msgstr ""
#. Tag: para
#: injection.xml:82
#, no-c-format
-msgid ""
-"allow one implementation of an API to override another implementation of the "
-"same API at deployment time, without changes to the client, using "
-"<emphasis>deployment type precedence</emphasis>."
+msgid "allow one implementation of an API to override another implementation of the same API at deployment time, without changes to the client, using <emphasis>deployment type precedence</emphasis>."
msgstr ""
#. Tag: para
#: injection.xml:88
#, no-c-format
-msgid ""
-"Let's explore how the Web Beans manager determines a Web Bean to be injected."
-msgstr ""
+msgid "Let's explore how the Web Beans manager determines a Web Bean to be injected."
+msgstr "Vamos explorer como o gerenciador do Web Beans determina qual o Web Bean deve ser injetado."
#. Tag: title
#: injection.xml:91
@@ -231,11 +222,7 @@
#. Tag: para
#: injection.xml:93
#, no-c-format
-msgid ""
-"If we have more than one Web Bean that implements a particular API type, the "
-"injection point can specify exactly which Web Bean should be injected using "
-"a binding annotation. For example, there might be two implementations of "
-"<literal>PaymentProcessor</literal>:"
+msgid "If we have more than one Web Bean that implements a particular API type, the injection point can specify exactly which Web Bean should be injected using a binding annotation. For example, there might be two implementations of <literal>PaymentProcessor</literal>:"
msgstr ""
#. Tag: programlisting
@@ -247,6 +234,10 @@
" public void process(Payment payment) { ... }\n"
"}]]>"
msgstr ""
+"<![CDATA[@PayByCheque\n"
+"public class ChequePaymentProcessor implements PaymentProcessor {\n"
+" public void process(Payment payment) { ... }\n"
+"}]]>"
#. Tag: programlisting
#: injection.xml:100
@@ -257,13 +248,15 @@
" public void process(Payment payment) { ... }\n"
"}]]>"
msgstr ""
+"<![CDATA[@PayByCreditCard\n"
+"public class CreditCardPaymentProcessor implements PaymentProcessor {\n"
+" public void process(Payment payment) { ... }\n"
+"}]]>"
#. Tag: para
#: injection.xml:102
#, no-c-format
-msgid ""
-"Where <literal>@PayByCheque</literal> and <literal>@PayByCreditCard</"
-"literal> are binding annotations:"
+msgid "Where <literal>@PayByCheque</literal> and <literal>@PayByCreditCard</literal> are binding annotations:"
msgstr ""
#. Tag: programlisting
@@ -275,6 +268,10 @@
"@BindingType\n"
"public @interface PayByCheque {}]]>"
msgstr ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"@Target({TYPE, METHOD, FIELD, PARAMETER})\n"
+"@BindingType\n"
+"public @interface PayByCheque {}]]>"
#. Tag: programlisting
#: injection.xml:107
@@ -285,20 +282,22 @@
"@BindingType\n"
"public @interface PayByCreditCard {}]]>"
msgstr ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"@Target({TYPE, METHOD, FIELD, PARAMETER})\n"
+"@BindingType\n"
+"public @interface PayByCreditCard {}]]>"
#. Tag: para
#: injection.xml:109
#, no-c-format
-msgid ""
-"A client Web Bean developer uses the binding annotation to specify exactly "
-"which Web Bean should be injected."
+msgid "A client Web Bean developer uses the binding annotation to specify exactly which Web Bean should be injected."
msgstr ""
#. Tag: para
#: injection.xml:112
#, no-c-format
msgid "Using field injection:"
-msgstr ""
+msgstr "Utilizando injeção por campos (field injection):"
#. Tag: programlisting
#: injection.xml:114
@@ -307,6 +306,8 @@
"<![CDATA[@PayByCheque PaymentProcessor chequePaymentProcessor;\n"
"@PayByCreditCard PaymentProcessor creditCardPaymentProcessor;]]>"
msgstr ""
+"<![CDATA[@PayByCheque PaymentProcessor chequePaymentProcessor;\n"
+"@PayByCreditCard PaymentProcessor creditCardPaymentProcessor;]]>"
#. Tag: para
#: injection.xml:116
@@ -319,14 +320,18 @@
#, no-c-format
msgid ""
"<![CDATA[@Initializer\n"
-"public void setPaymentProcessors(@PayByCheque PaymentProcessor "
-"chequePaymentProcessor, \n"
-" @PayByCreditCard PaymentProcessor "
-"creditCardPaymentProcessor) {\n"
+"public void setPaymentProcessors(@PayByCheque PaymentProcessor chequePaymentProcessor, \n"
+" @PayByCreditCard PaymentProcessor creditCardPaymentProcessor) {\n"
" this.chequePaymentProcessor = chequePaymentProcessor;\n"
" this.creditCardPaymentProcessor = creditCardPaymentProcessor;\n"
"}]]>"
msgstr ""
+"<![CDATA[@Initializer\n"
+"public void setPaymentProcessors(@PayByCheque PaymentProcessor chequePaymentProcessor, \n"
+" @PayByCreditCard PaymentProcessor creditCardPaymentProcessor) {\n"
+" this.chequePaymentProcessor = chequePaymentProcessor;\n"
+" this.creditCardPaymentProcessor = creditCardPaymentProcessor;\n"
+"}]]>"
#. Tag: para
#: injection.xml:120
@@ -340,12 +345,17 @@
msgid ""
"<![CDATA[@Initializer\n"
"public Checkout(@PayByCheque PaymentProcessor chequePaymentProcessor, \n"
-" @PayByCreditCard PaymentProcessor "
-"creditCardPaymentProcessor) {\n"
+" @PayByCreditCard PaymentProcessor creditCardPaymentProcessor) {\n"
" this.chequePaymentProcessor = chequePaymentProcessor;\n"
" this.creditCardPaymentProcessor = creditCardPaymentProcessor;\n"
"}]]>"
msgstr ""
+"<![CDATA[@Initializer\n"
+"public Checkout(@PayByCheque PaymentProcessor chequePaymentProcessor, \n"
+" @PayByCreditCard PaymentProcessor creditCardPaymentProcessor) {\n"
+" this.chequePaymentProcessor = chequePaymentProcessor;\n"
+" this.creditCardPaymentProcessor = creditCardPaymentProcessor;\n"
+"}]]>"
#. Tag: title
#: injection.xml:125
@@ -370,12 +380,18 @@
" PaymentType value();\n"
"}]]>"
msgstr ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"@Target({TYPE, METHOD, FIELD, PARAMETER})\n"
+"@BindingType\n"
+"public @interface PayBy {\n"
+" PaymentType value();\n"
+"}]]>"
#. Tag: para
#: injection.xml:131
#, no-c-format
msgid "In which case, the member value is significant:"
-msgstr ""
+msgstr "Em cada caso, o valor do membro é significante:"
#. Tag: programlisting
#: injection.xml:133
@@ -384,13 +400,13 @@
"<![CDATA[@PayBy(CHEQUE) PaymentProcessor chequePaymentProcessor;\n"
"@PayBy(CREDIT_CARD) PaymentProcessor creditCardPaymentProcessor;]]>"
msgstr ""
+"<![CDATA[@PayBy(CHEQUE) PaymentProcessor chequePaymentProcessor;\n"
+"@PayBy(CREDIT_CARD) PaymentProcessor creditCardPaymentProcessor;]]>"
#. Tag: para
#: injection.xml:135
#, no-c-format
-msgid ""
-"You can tell the Web Bean manager to ignore a member of a binding annotation "
-"type by annotating the member <literal>@NonBinding</literal>."
+msgid "You can tell the Web Bean manager to ignore a member of a binding annotation type by annotating the member <literal>@NonBinding</literal>."
msgstr ""
#. Tag: title
@@ -408,16 +424,13 @@
#. Tag: programlisting
#: injection.xml:145
#, no-c-format
-msgid ""
-"<![CDATA[@Asynchronous @PayByCheque PaymentProcessor paymentProcessor]]>"
-msgstr ""
+msgid "<![CDATA[@Asynchronous @PayByCheque PaymentProcessor paymentProcessor]]>"
+msgstr "<![CDATA[@Asynchronous @PayByCheque PaymentProcessor paymentProcessor]]>"
#. Tag: para
#: injection.xml:147
#, no-c-format
-msgid ""
-"In this case, only a Web Bean which has <emphasis>both</emphasis> binding "
-"annotations would be eligible for injection."
+msgid "In this case, only a Web Bean which has <emphasis>both</emphasis> binding annotations would be eligible for injection."
msgstr ""
#. Tag: title
@@ -438,11 +451,15 @@
msgid ""
"<![CDATA[@Produces \n"
"@Asynchronous @PayByCheque \n"
-"PaymentProcessor createAsyncPaymentProcessor(@PayByCheque PaymentProcessor "
-"processor) {\n"
+"PaymentProcessor createAsyncPaymentProcessor(@PayByCheque PaymentProcessor processor) {\n"
" return new AsynchronousPaymentProcessor(processor);\n"
"}]]>"
msgstr ""
+"<![CDATA[@Produces \n"
+"@Asynchronous @PayByCheque \n"
+"PaymentProcessor createAsyncPaymentProcessor(@PayByCheque PaymentProcessor processor) {\n"
+" return new AsynchronousPaymentProcessor(processor);\n"
+"}]]>"
#. Tag: title
#: injection.xml:162
@@ -453,58 +470,43 @@
#. Tag: para
#: injection.xml:164
#, no-c-format
-msgid ""
-"Web Beans defines a binding type <literal>@Current</literal> that is the "
-"default binding type for any injection point or Web Bean that does not "
-"explicitly specify a binding type."
+msgid "Web Beans defines a binding type <literal>@Current</literal> that is the default binding type for any injection point or Web Bean that does not explicitly specify a binding type."
msgstr ""
#. Tag: para
#: injection.xml:168
#, no-c-format
-msgid ""
-"There are two common circumstances in which it is necessary to explicitly "
-"specify <literal>@Current</literal>:"
+msgid "There are two common circumstances in which it is necessary to explicitly specify <literal>@Current</literal>:"
msgstr ""
#. Tag: para
#: injection.xml:173
#, no-c-format
-msgid ""
-"on a field, in order to declare it as an injected field with the default "
-"binding type, and"
+msgid "on a field, in order to declare it as an injected field with the default binding type, and"
msgstr ""
#. Tag: para
#: injection.xml:177
#, no-c-format
-msgid ""
-"on a Web Bean which has another binding type in addition to the default "
-"binding type."
+msgid "on a Web Bean which has another binding type in addition to the default binding type."
msgstr ""
#. Tag: title
#: injection.xml:187
#, no-c-format
msgid "Deployment types"
-msgstr ""
+msgstr "Tipo de deploy"
#. Tag: para
#: injection.xml:189
#, no-c-format
-msgid ""
-"All Web Beans have a <emphasis>deployment type</emphasis>. Each deployment "
-"type identifies a set of Web Beans that should be conditionally installed in "
-"some deployments of the system."
+msgid "All Web Beans have a <emphasis>deployment type</emphasis>. Each deployment type identifies a set of Web Beans that should be conditionally installed in some deployments of the system."
msgstr ""
#. Tag: para
#: injection.xml:193
#, no-c-format
-msgid ""
-"For example, we could define a deployment type named <literal>@Mock</"
-"literal>, which would identify Web Beans that should only be installed when "
-"the system executes inside an integration testing environment:"
+msgid "For example, we could define a deployment type named <literal>@Mock</literal>, which would identify Web Beans that should only be installed when the system executes inside an integration testing environment:"
msgstr ""
#. Tag: programlisting
@@ -516,13 +518,15 @@
" @DeploymentType\n"
" public @interface Mock {}]]>"
msgstr ""
+"<![CDATA[@Retention(RUNTIME)\n"
+" @Target({TYPE, METHOD})\n"
+" @DeploymentType\n"
+" public @interface Mock {}]]>"
#. Tag: para
#: injection.xml:199
#, no-c-format
-msgid ""
-"Suppose we had some Web Bean that interacted with an external system to "
-"process payments:"
+msgid "Suppose we had some Web Bean that interacted with an external system to process payments:"
msgstr ""
#. Tag: programlisting
@@ -537,21 +541,24 @@
" \n"
"}]]>"
msgstr ""
+"<![CDATA[public class ExternalPaymentProcessor {\n"
+" \n"
+" public void process(Payment p) {\n"
+" ...\n"
+" }\n"
+" \n"
+"}]]>"
#. Tag: para
#: injection.xml:204
#, no-c-format
-msgid ""
-"Since this Web Bean does not explicitly specify a deployment type, it has "
-"the default deployment type <literal>@Production</literal>."
+msgid "Since this Web Bean does not explicitly specify a deployment type, it has the default deployment type <literal>@Production</literal>."
msgstr ""
#. Tag: para
#: injection.xml:207
#, no-c-format
-msgid ""
-"For integration or unit testing, the external system is slow or unavailable. "
-"So we would create a mock object:"
+msgid "For integration or unit testing, the external system is slow or unavailable. So we would create a mock object:"
msgstr ""
#. Tag: programlisting
@@ -568,13 +575,20 @@
"\n"
"}]]>"
msgstr ""
+"<![CDATA[@Mock \n"
+"public class MockPaymentProcessor implements PaymentProcessor {\n"
+"\n"
+" @Override\n"
+" public void process(Payment p) {\n"
+" p.setSuccessful(true);\n"
+" }\n"
+"\n"
+"}]]>"
#. Tag: para
#: injection.xml:212
#, no-c-format
-msgid ""
-"But how does the Web Bean manager determine which implementation to use in a "
-"particular deployment?"
+msgid "But how does the Web Bean manager determine which implementation to use in a particular deployment?"
msgstr ""
#. Tag: title
@@ -586,20 +600,13 @@
#. Tag: para
#: injection.xml:218
#, no-c-format
-msgid ""
-"Web Beans defines two built-in deployment types: <literal>@Production</"
-"literal> and <literal>@Standard</literal>. By default, only Web Beans with "
-"the built-in deployment types are enabled when the system is deployed. We "
-"can identify additional deployment types to be enabled in a particular "
-"deployment by listing them in <literal>web-beans.xml</literal>."
+msgid "Web Beans defines two built-in deployment types: <literal>@Production</literal> and <literal>@Standard</literal>. By default, only Web Beans with the built-in deployment types are enabled when the system is deployed. We can identify additional deployment types to be enabled in a particular deployment by listing them in <literal>web-beans.xml</literal>."
msgstr ""
#. Tag: para
#: injection.xml:224
#, no-c-format
-msgid ""
-"Going back to our example, when we deploy our integration tests, we want all "
-"our <literal>@Mock</literal> objects to be installed:"
+msgid "Going back to our example, when we deploy our integration tests, we want all our <literal>@Mock</literal> objects to be installed:"
msgstr ""
#. Tag: programlisting
@@ -614,126 +621,90 @@
" </Deploy>\n"
"</WebBeans>]]>"
msgstr ""
+"<![CDATA[<WebBeans>\n"
+" <Deploy>\n"
+" <Standard/>\n"
+" <Production/>\n"
+" <test:Mock/>\n"
+" </Deploy>\n"
+"</WebBeans>]]>"
#. Tag: para
#: injection.xml:229
#, no-c-format
-msgid ""
-"Now the Web Bean manager will identify and install all Web Beans annotated "
-"<literal>@Production</literal>, <literal>@Standard</literal> or "
-"<literal>@Mock</literal> at deployment time."
+msgid "Now the Web Bean manager will identify and install all Web Beans annotated <literal>@Production</literal>, <literal>@Standard</literal> or <literal>@Mock</literal> at deployment time."
msgstr ""
#. Tag: para
#: injection.xml:233
#, no-c-format
-msgid ""
-"The deployment type <literal>@Standard</literal> is used only for certain "
-"special Web Beans defined by the Web Beans specification. We can't use it "
-"for our own Web Beans, and we can't disable it."
+msgid "The deployment type <literal>@Standard</literal> is used only for certain special Web Beans defined by the Web Beans specification. We can't use it for our own Web Beans, and we can't disable it."
msgstr ""
#. Tag: para
#: injection.xml:237
#, no-c-format
-msgid ""
-"The deployment type <literal>@Production</literal> is the default deployment "
-"type for Web Beans which don't explicitly declare a deployment type, and may "
-"be disabled."
+msgid "The deployment type <literal>@Production</literal> is the default deployment type for Web Beans which don't explicitly declare a deployment type, and may be disabled."
msgstr ""
#. Tag: title
#: injection.xml:244
#, no-c-format
msgid "Deployment type precedence"
-msgstr ""
+msgstr "Precedencia dos tipos de deploy"
#. Tag: para
#: injection.xml:246
#, no-c-format
-msgid ""
-"If you've been paying attention, you're probably wondering how the Web Bean "
-"manager decides which implementation — <literal>ExternalPaymentProcessor</"
-"literal> or <literal>MockPaymentProcessor</literal> — to choose. Consider "
-"what happens when the manager encounters this injection point:"
+msgid "If you've been paying attention, you're probably wondering how the Web Bean manager decides which implementation — <literal>ExternalPaymentProcessor</literal> or <literal>MockPaymentProcessor</literal> — to choose. Consider what happens when the manager encounters this injection point:"
msgstr ""
#. Tag: programlisting
#: injection.xml:251
#, no-c-format
msgid "<![CDATA[@Current PaymentProcessor paymentProcessor]]>"
-msgstr ""
+msgstr "<![CDATA[@Current PaymentProcessor paymentProcessor]]>"
#. Tag: para
#: injection.xml:253
#, no-c-format
-msgid ""
-"There are now two Web Beans which satisfy the <literal>PaymentProcessor</"
-"literal> contract. Of course, we can't use a binding annotation to "
-"disambiguate, since binding annotations are hard-coded into the source at "
-"the injection point, and we want the manager to be able to decide at "
-"deployment time!"
+msgid "There are now two Web Beans which satisfy the <literal>PaymentProcessor</literal> contract. Of course, we can't use a binding annotation to disambiguate, since binding annotations are hard-coded into the source at the injection point, and we want the manager to be able to decide at deployment time!"
msgstr ""
#. Tag: para
#: injection.xml:258
#, no-c-format
-msgid ""
-"The solution to this problem is that each deployment type has a different "
-"<emphasis>precedence</emphasis>. The precedence of the deployment types is "
-"determined by the order in which they appear in <literal>web-beans.xml</"
-"literal>. In our example, <literal>@Mock</literal> appears later than "
-"<literal>@Production</literal> so it has a higher precedence."
+msgid "The solution to this problem is that each deployment type has a different <emphasis>precedence</emphasis>. The precedence of the deployment types is determined by the order in which they appear in <literal>web-beans.xml</literal>. In our example, <literal>@Mock</literal> appears later than <literal>@Production</literal> so it has a higher precedence."
msgstr ""
#. Tag: para
#: injection.xml:264
#, no-c-format
-msgid ""
-"Whenever the manager discovers that more than one Web Bean could satisfy the "
-"contract (API type plus binding annotations) specified by an injection "
-"point, it considers the relative precedence of the Web Beans. If one has a "
-"higher precedence than the others, it chooses the higher precedence Web Bean "
-"to inject. So, in our example, the Web Bean manager will inject "
-"<literal>MockPaymentProcessor</literal> when executing in our integration "
-"testing environment (which is exactly what we want)."
+msgid "Whenever the manager discovers that more than one Web Bean could satisfy the contract (API type plus binding annotations) specified by an injection point, it considers the relative precedence of the Web Beans. If one has a higher precedence than the others, it chooses the higher precedence Web Bean to inject. So, in our example, the Web Bean manager will inject <literal>MockPaymentProcessor</literal> when executing in our integration testing environment (which is exactly what we want)."
msgstr ""
#. Tag: para
#: injection.xml:271
#, no-c-format
-msgid ""
-"It's interesting to compare this facility to today's popular manager "
-"architectures. Various \"lightweight\" containers also allow conditional "
-"deployment of classes that exist in the classpath, but the classes that are "
-"to be deployed must be explicity, individually, listed in configuration code "
-"or in some XML configuration file. Web Beans does support Web Bean "
-"definition and configuration via XML, but in the common case where no "
-"complex configuration is required, deployment types allow a whole set of Web "
-"Beans to be enabled with a single line of XML. Meanwhile, a developer "
-"browsing the code can easily identify what deployment scenarios the Web Bean "
-"will be used in."
+msgid "It's interesting to compare this facility to today's popular manager architectures. Various \"lightweight\" containers also allow conditional deployment of classes that exist in the classpath, but the classes that are to be deployed must be explicity, individually, listed in configuration code or in some XML configuration file. Web Beans does support Web Bean definition and configuration via XML, but in the common case where no complex configuration is required, deployment types allow a whole set of Web Beans to be enabled with a single line of XML. Meanwhile, a developer browsing the code can easily identify what deployment scenarios the Web Bean will be used in."
msgstr ""
#. Tag: title
#: injection.xml:284
#, no-c-format
msgid "Example deployment types"
-msgstr ""
+msgstr "Exemplo de tipos de deploy"
#. Tag: para
#: injection.xml:286
#, no-c-format
-msgid ""
-"Deployment types are useful for all kinds of things, here's some examples:"
+msgid "Deployment types are useful for all kinds of things, here's some examples:"
msgstr ""
#. Tag: para
#: injection.xml:290
#, no-c-format
-msgid ""
-"<literal>@Mock</literal> and <literal>@Staging</literal> deployment types "
-"for testing"
+msgid "<literal>@Mock</literal> and <literal>@Staging</literal> deployment types for testing"
msgstr ""
#. Tag: para
@@ -745,17 +716,13 @@
#. Tag: para
#: injection.xml:297
#, no-c-format
-msgid ""
-"<literal>@SeamFramework</literal>, <literal>@Guice</literal> for third-party "
-"frameworks which build on Web Beans"
+msgid "<literal>@SeamFramework</literal>, <literal>@Guice</literal> for third-party frameworks which build on Web Beans"
msgstr ""
#. Tag: para
#: injection.xml:301
#, no-c-format
-msgid ""
-"<literal>@Standard</literal> for standard Web Beans defined by the Web Beans "
-"specification"
+msgid "<literal>@Standard</literal> for standard Web Beans defined by the Web Beans specification"
msgstr ""
#. Tag: para
@@ -773,49 +740,31 @@
#. Tag: para
#: injection.xml:315
#, no-c-format
-msgid ""
-"The typesafe resolution algorithm fails when, after considering the binding "
-"annotations and and deployment types of all Web Beans that implement the API "
-"type of an injection point, the Web Bean manager is unable to identify "
-"exactly one Web Bean to inject."
+msgid "The typesafe resolution algorithm fails when, after considering the binding annotations and and deployment types of all Web Beans that implement the API type of an injection point, the Web Bean manager is unable to identify exactly one Web Bean to inject."
msgstr ""
#. Tag: para
#: injection.xml:320
#, no-c-format
-msgid ""
-"It's usually easy to fix an <literal>UnsatisfiedDependencyException</"
-"literal> or <literal>AmbiguousDependencyException</literal>."
+msgid "It's usually easy to fix an <literal>UnsatisfiedDependencyException</literal> or <literal>AmbiguousDependencyException</literal>."
msgstr ""
#. Tag: para
#: injection.xml:323
#, no-c-format
-msgid ""
-"To fix an <literal>UnsatisfiedDependencyException</literal>, simply provide "
-"a Web Bean which implements the API type and has the binding types of the "
-"injection point — or enable the deployment type of a Web Bean that "
-"already implements the API type and has the binding types."
+msgid "To fix an <literal>UnsatisfiedDependencyException</literal>, simply provide a Web Bean which implements the API type and has the binding types of the injection point — or enable the deployment type of a Web Bean that already implements the API type and has the binding types."
msgstr ""
#. Tag: para
#: injection.xml:328
#, no-c-format
-msgid ""
-"To fix an <literal>AmbiguousDependencyException</literal>, introduce a "
-"binding type to distinguish between the two implementations of the API type, "
-"or change the deployment type of one of the implementations so that the Web "
-"Bean manager can use deployment type precedence to choose between them. An "
-"<literal>AmbiguousDependencyException</literal> can only occur if two Web "
-"Beans share a binding type and have exactly the same deployment type."
+msgid "To fix an <literal>AmbiguousDependencyException</literal>, introduce a binding type to distinguish between the two implementations of the API type, or change the deployment type of one of the implementations so that the Web Bean manager can use deployment type precedence to choose between them. An <literal>AmbiguousDependencyException</literal> can only occur if two Web Beans share a binding type and have exactly the same deployment type."
msgstr ""
#. Tag: para
#: injection.xml:335
#, no-c-format
-msgid ""
-"There's one more issue you need to be aware of when using dependency "
-"injection in Web Beans."
+msgid "There's one more issue you need to be aware of when using dependency injection in Web Beans."
msgstr ""
#. Tag: title
@@ -827,54 +776,31 @@
#. Tag: para
#: injection.xml:343
#, no-c-format
-msgid ""
-"Clients of an injected Web Bean do not usually hold a direct reference to a "
-"Web Bean instance."
+msgid "Clients of an injected Web Bean do not usually hold a direct reference to a Web Bean instance."
msgstr ""
#. Tag: para
#: injection.xml:346
#, no-c-format
-msgid ""
-"Imagine that a Web Bean bound to the application scope held a direct "
-"reference to a Web Bean bound to the request scope. The application scoped "
-"Web Bean is shared between many different requests. However, each request "
-"should see a different instance of the request scoped Web bean!"
+msgid "Imagine that a Web Bean bound to the application scope held a direct reference to a Web Bean bound to the request scope. The application scoped Web Bean is shared between many different requests. However, each request should see a different instance of the request scoped Web bean!"
msgstr ""
#. Tag: para
#: injection.xml:351
#, no-c-format
-msgid ""
-"Now imagine that a Web Bean bound to the session scope held a direct "
-"reference to a Web Bean bound to the application scope. From time to time, "
-"the session context is serialized to disk in order to use memory more "
-"efficiently. However, the application scoped Web Bean instance should not be "
-"serialized along with the session scoped Web Bean!"
+msgid "Now imagine that a Web Bean bound to the session scope held a direct reference to a Web Bean bound to the application scope. From time to time, the session context is serialized to disk in order to use memory more efficiently. However, the application scoped Web Bean instance should not be serialized along with the session scoped Web Bean!"
msgstr ""
#. Tag: para
#: injection.xml:357
#, no-c-format
-msgid ""
-"Therefore, unless a Web Bean has the default scope <literal>@Dependent</"
-"literal>, the Web Bean manager must indirect all injected references to the "
-"Web Bean through a proxy object. This <emphasis>client proxy</emphasis> is "
-"responsible for ensuring that the Web Bean instance that receives a method "
-"invocation is the instance that is associated with the current context. The "
-"client proxy also allows Web Beans bound to contexts such as the session "
-"context to be serialized to disk without recursively serializing other "
-"injected Web Beans."
+msgid "Therefore, unless a Web Bean has the default scope <literal>@Dependent</literal>, the Web Bean manager must indirect all injected references to the Web Bean through a proxy object. This <emphasis>client proxy</emphasis> is responsible for ensuring that the Web Bean instance that receives a method invocation is the instance that is associated with the current context. The client proxy also allows Web Beans bound to contexts such as the session context to be serialized to disk without recursively serializing other injected Web Beans."
msgstr ""
#. Tag: para
#: injection.xml:365
#, no-c-format
-msgid ""
-"Unfortunately, due to limitations of the Java language, some Java types "
-"cannot be proxied by the Web Bean manager. Therefore, the Web Bean manager "
-"throws an <literal>UnproxyableDependencyException</literal> if the type of "
-"an injection point cannot be proxied."
+msgid "Unfortunately, due to limitations of the Java language, some Java types cannot be proxied by the Web Bean manager. Therefore, the Web Bean manager throws an <literal>UnproxyableDependencyException</literal> if the type of an injection point cannot be proxied."
msgstr ""
#. Tag: para
@@ -886,9 +812,7 @@
#. Tag: para
#: injection.xml:374
#, no-c-format
-msgid ""
-"classes which are declared <literal>final</literal> or have a "
-"<literal>final</literal> method,"
+msgid "classes which are declared <literal>final</literal> or have a <literal>final</literal> method,"
msgstr ""
#. Tag: para
@@ -906,11 +830,7 @@
#. Tag: para
#: injection.xml:385
#, no-c-format
-msgid ""
-"It's usually very easy to fix an <literal>UnproxyableDependencyException</"
-"literal>. Simply add a constructor with no parameters to the injected class, "
-"introduce an interface, or change the scope of the injected Web Bean to "
-"<literal>@Dependent</literal>."
+msgid "It's usually very easy to fix an <literal>UnproxyableDependencyException</literal>. Simply add a constructor with no parameters to the injected class, introduce an interface, or change the scope of the injected Web Bean to <literal>@Dependent</literal>."
msgstr ""
#. Tag: title
@@ -922,59 +842,47 @@
#. Tag: para
#: injection.xml:394
#, no-c-format
-msgid ""
-"The application may obtain an instance of the interface <literal>Manager</"
-"literal> by injection:"
+msgid "The application may obtain an instance of the interface <literal>Manager</literal> by injection:"
msgstr ""
#. Tag: programlisting
#: injection.xml:397
#, no-c-format
msgid "<![CDATA[@Current Manager manager;]]>"
-msgstr ""
+msgstr "<![CDATA[@Current Manager manager;]]>"
#. Tag: para
#: injection.xml:399
#, no-c-format
-msgid ""
-"The <literal>Manager</literal> object provides a set of methods for "
-"obtaining a Web Bean instance programatically."
+msgid "The <literal>Manager</literal> object provides a set of methods for obtaining a Web Bean instance programatically."
msgstr ""
#. Tag: programlisting
#: injection.xml:402
#, no-c-format
-msgid ""
-"<![CDATA[PaymentProcessor p = manager.getInstanceByType(PaymentProcessor."
-"class);]]>"
-msgstr ""
+msgid "<![CDATA[PaymentProcessor p = manager.getInstanceByType(PaymentProcessor.class);]]>"
+msgstr "<![CDATA[PaymentProcessor p = manager.getInstanceByType(PaymentProcessor.class);]]>"
#. Tag: para
#: injection.xml:404
#, no-c-format
-msgid ""
-"Binding annotations may be specified by subclassing the helper class "
-"<literal>AnnotationLiteral</literal>, since it is otherwise difficult to "
-"instantiate an annotation type in Java."
+msgid "Binding annotations may be specified by subclassing the helper class <literal>AnnotationLiteral</literal>, since it is otherwise difficult to instantiate an annotation type in Java."
msgstr ""
#. Tag: programlisting
#: injection.xml:408
#, no-c-format
msgid ""
-"<![CDATA[PaymentProcessor p = manager.getInstanceByType(PaymentProcessor."
-"class, \n"
-" new "
-"AnnotationLiteral<CreditCard>(){});]]>"
+"<![CDATA[PaymentProcessor p = manager.getInstanceByType(PaymentProcessor.class, \n"
+" new AnnotationLiteral<CreditCard>(){});]]>"
msgstr ""
+"<![CDATA[PaymentProcessor p = manager.getInstanceByType(PaymentProcessor.class, \n"
+" new AnnotationLiteral<CreditCard>(){});]]>"
#. Tag: para
#: injection.xml:410
#, no-c-format
-msgid ""
-"If the binding type has an annotation member, we can't use an anonymous "
-"subclass of <literal>AnnotationLiteral</literal> — instead we'll need to "
-"create a named subclass:"
+msgid "If the binding type has an annotation member, we can't use an anonymous subclass of <literal>AnnotationLiteral</literal> — instead we'll need to create a named subclass:"
msgstr ""
#. Tag: programlisting
@@ -985,62 +893,52 @@
" extends AnnotationLiteral<CreditCard> \n"
" implements CreditCard {}]]>"
msgstr ""
+"<![CDATA[abstract class CreditCardBinding \n"
+" extends AnnotationLiteral<CreditCard> \n"
+" implements CreditCard {}]]>"
#. Tag: programlisting
#: injection.xml:415
#, no-c-format
msgid ""
-"<![CDATA[PaymentProcessor p = manager.getInstanceByType(PaymentProcessor."
-"class, \n"
+"<![CDATA[PaymentProcessor p = manager.getInstanceByType(PaymentProcessor.class, \n"
" new CreditCardBinding() { \n"
-" public void value() "
-"{ return paymentType; } \n"
+" public void value() { return paymentType; } \n"
" } );]]>"
msgstr ""
+"<![CDATA[PaymentProcessor p = manager.getInstanceByType(PaymentProcessor.class, \n"
+" new CreditCardBinding() { \n"
+" public void value() { return paymentType; } \n"
+" } );]]>"
#. Tag: title
#: injection.xml:419
#, no-c-format
-msgid ""
-"Lifecycle callbacks, <literal>@Resource</literal>, <literal>@EJB</literal> "
-"and <literal>@PersistenceContext</literal>"
+msgid "Lifecycle callbacks, <literal>@Resource</literal>, <literal>@EJB</literal> and <literal>@PersistenceContext</literal>"
msgstr ""
#. Tag: para
#: injection.xml:422
#, no-c-format
-msgid ""
-"Enterprise Web Beans support all the lifecycle callbacks defined by the EJB "
-"specification: <literal>@PostConstruct</literal>, <literal>@PreDestroy</"
-"literal>, <literal>@PrePassivate</literal> and <literal>@PostActivate</"
-"literal>."
+msgid "Enterprise Web Beans support all the lifecycle callbacks defined by the EJB specification: <literal>@PostConstruct</literal>, <literal>@PreDestroy</literal>, <literal>@PrePassivate</literal> and <literal>@PostActivate</literal>."
msgstr ""
#. Tag: para
#: injection.xml:426
#, no-c-format
-msgid ""
-"Simple Web Beans support only the <literal>@PostConstruct</literal> and "
-"<literal>@PreDestroy</literal> callbacks."
+msgid "Simple Web Beans support only the <literal>@PostConstruct</literal> and <literal>@PreDestroy</literal> callbacks."
msgstr ""
#. Tag: para
#: injection.xml:429
#, no-c-format
-msgid ""
-"Both enterprise and simple Web Beans support the use of <literal>@Resource</"
-"literal>, <literal>@EJB</literal> and <literal>@PersistenceContext</literal> "
-"for injection of Java EE resources, EJBs and JPA persistence contexts, "
-"respectively. Simple Web Beans do not support the use of "
-"<literal>@PersistenceContext(type=EXTENDED)</literal>."
+msgid "Both enterprise and simple Web Beans support the use of <literal>@Resource</literal>, <literal>@EJB</literal> and <literal>@PersistenceContext</literal> for injection of Java EE resources, EJBs and JPA persistence contexts, respectively. Simple Web Beans do not support the use of <literal>@PersistenceContext(type=EXTENDED)</literal>."
msgstr ""
#. Tag: para
#: injection.xml:434
#, no-c-format
-msgid ""
-"The <literal>@PostConstruct</literal> callback always occurs after all "
-"dependencies have been injected."
+msgid "The <literal>@PostConstruct</literal> callback always occurs after all dependencies have been injected."
msgstr ""
#. Tag: title
@@ -1052,66 +950,49 @@
#. Tag: para
#: injection.xml:442
#, no-c-format
-msgid ""
-"There are certain kinds of dependent objects — Web Beans with scope "
-"<literal>@Dependent</literal> — that need to know something about the "
-"object or injection point into which they are injected in order to be able "
-"to do what they do. For example:"
+msgid "There are certain kinds of dependent objects — Web Beans with scope <literal>@Dependent</literal> — that need to know something about the object or injection point into which they are injected in order to be able to do what they do. For example:"
msgstr ""
#. Tag: para
#: injection.xml:448
#, no-c-format
-msgid ""
-"The log category for a <literal>Logger</literal> depends upon the class of "
-"the object that owns it."
+msgid "The log category for a <literal>Logger</literal> depends upon the class of the object that owns it."
msgstr ""
#. Tag: para
#: injection.xml:452
#, no-c-format
-msgid ""
-"Injection of a HTTP parameter or header value depends upon what parameter or "
-"header name was specified at the injection point."
+msgid "Injection of a HTTP parameter or header value depends upon what parameter or header name was specified at the injection point."
msgstr ""
#. Tag: para
#: injection.xml:456
#, no-c-format
-msgid ""
-"Injection of the result of an EL expression evaluation depends upon the "
-"expression that was specified at the injection point."
+msgid "Injection of the result of an EL expression evaluation depends upon the expression that was specified at the injection point."
msgstr ""
#. Tag: para
#: injection.xml:461
#, no-c-format
-msgid ""
-"A Web Bean with scope <literal>@Dependent</literal> may inject an instance "
-"of <literal>InjectionPoint</literal> and access metadata relating to the "
-"injection point to which it belongs."
+msgid "A Web Bean with scope <literal>@Dependent</literal> may inject an instance of <literal>InjectionPoint</literal> and access metadata relating to the injection point to which it belongs."
msgstr ""
#. Tag: para
#: injection.xml:465
#, no-c-format
-msgid ""
-"Let's look at an example. The following code is verbose, and vulnerable to "
-"refactoring problems:"
+msgid "Let's look at an example. The following code is verbose, and vulnerable to refactoring problems:"
msgstr ""
#. Tag: programlisting
#: injection.xml:468
#, no-c-format
msgid "<![CDATA[Logger log = Logger.getLogger(MyClass.class.getName());]]>"
-msgstr ""
+msgstr "<![CDATA[Logger log = Logger.getLogger(MyClass.class.getName());]]>"
#. Tag: para
#: injection.xml:470
#, no-c-format
-msgid ""
-"This clever little producer method lets you inject a JDK <literal>Logger</"
-"literal> without explicitly specifying the log category:"
+msgid "This clever little producer method lets you inject a JDK <literal>Logger</literal> without explicitly specifying the log category:"
msgstr ""
#. Tag: programlisting
@@ -1121,12 +1002,18 @@
"<![CDATA[class LogFactory {\n"
"\n"
" @Produces Logger createLogger(InjectionPoint injectionPoint) { \n"
-" return Logger.getLogger(injectionPoint.getMember().getDeclaringClass()."
-"getName()); \n"
+" return Logger.getLogger(injectionPoint.getMember().getDeclaringClass().getName()); \n"
" }\n"
"\n"
"}]]>"
msgstr ""
+"<![CDATA[class LogFactory {\n"
+"\n"
+" @Produces Logger createLogger(InjectionPoint injectionPoint) { \n"
+" return Logger.getLogger(injectionPoint.getMember().getDeclaringClass().getName()); \n"
+" }\n"
+"\n"
+"}]]>"
#. Tag: para
#: injection.xml:475
@@ -1138,14 +1025,12 @@
#: injection.xml:477
#, no-c-format
msgid "<![CDATA[@Current Logger log;]]>"
-msgstr ""
+msgstr "<![CDATA[@Current Logger log;]]>"
#. Tag: para
#: injection.xml:479
#, no-c-format
-msgid ""
-"Not convinced? Then here's a second example. To inject HTTP parameters, we "
-"need to define a binding type:"
+msgid "Not convinced? Then here's a second example. To inject HTTP parameters, we need to define a binding type:"
msgstr ""
#. Tag: programlisting
@@ -1159,6 +1044,12 @@
" @NonBinding public String value();\n"
"}]]>"
msgstr ""
+"<![CDATA[@BindingType\n"
+"@Retention(RUNTIME)\n"
+"@Target({TYPE, METHOD, FIELD, PARAMETER})\n"
+"public @interface HttpParam {\n"
+" @NonBinding public String value();\n"
+"}]]>"
#. Tag: para
#: injection.xml:484
@@ -1173,6 +1064,8 @@
"<![CDATA[@HttpParam(\"username\") String username;\n"
"@HttpParam(\"password\") String password;]]>"
msgstr ""
+"<![CDATA[@HttpParam(\"username\") String username;\n"
+"@HttpParam(\"password\") String password;]]>"
#. Tag: para
#: injection.xml:488
@@ -1188,28 +1081,30 @@
"\n"
" @Produces @HttpParam(\"\")\n"
" String getParamValue(ServletRequest request, InjectionPoint ip) {\n"
-" return request.getParameter(ip.getAnnotation(HttpParam.class).value"
-"());\n"
+" return request.getParameter(ip.getAnnotation(HttpParam.class).value());\n"
" }\n"
"\n"
"}]]>"
msgstr ""
+"<![CDATA[class HttpParams\n"
+"\n"
+" @Produces @HttpParam(\"\")\n"
+" String getParamValue(ServletRequest request, InjectionPoint ip) {\n"
+" return request.getParameter(ip.getAnnotation(HttpParam.class).value());\n"
+" }\n"
+"\n"
+"}]]>"
#. Tag: para
#: injection.xml:492
#, no-c-format
-msgid ""
-"(Note that the <literal>value()</literal> member of the <literal>HttpParam</"
-"literal> annotation is ignored by the Web Bean manager since it is annotated "
-"<literal>@NonBinding.</literal>)"
+msgid "(Note that the <literal>value()</literal> member of the <literal>HttpParam</literal> annotation is ignored by the Web Bean manager since it is annotated <literal>@NonBinding.</literal>)"
msgstr ""
#. Tag: para
#: injection.xml:495
#, no-c-format
-msgid ""
-"The Web Bean manager provides a built-in Web Bean that implements the "
-"<literal>InjectionPoint</literal> interface:"
+msgid "The Web Bean manager provides a built-in Web Bean that implements the <literal>InjectionPoint</literal> interface:"
msgstr ""
#. Tag: programlisting
@@ -1224,3 +1119,11 @@
" public Set<T extends Annotation> getAnnotations(); \n"
"}]]>"
msgstr ""
+"<![CDATA[public interface InjectionPoint { \n"
+" public Object getInstance(); \n"
+" public Bean<?> getBean(); \n"
+" public Member getMember(): \n"
+" public <T extends Annotation> T getAnnotation(Class<T> annotation); \n"
+" public Set<T extends Annotation> getAnnotations(); \n"
+"}]]>"
+
Modified: doc/trunk/reference/pt-BR/interceptors.po
===================================================================
--- doc/trunk/reference/pt-BR/interceptors.po 2009-02-28 14:04:13 UTC (rev 1744)
+++ doc/trunk/reference/pt-BR/interceptors.po 2009-03-01 00:42:05 UTC (rev 1745)
@@ -6,8 +6,8 @@
"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-06 11:30+0000\n"
-"PO-Revision-Date: 2009-01-06 11:30+0000\n"
-"Last-Translator: Automatically generated\n"
+"PO-Revision-Date: 2009-02-28 15:09-0300\n"
+"Last-Translator: João Paulo Viragine <joao.viragine(a)redhat.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -22,9 +22,7 @@
#. Tag: para
#: interceptors.xml:6
#, no-c-format
-msgid ""
-"Web Beans re-uses the basic interceptor architecture of EJB 3.0, extending "
-"the functionality in two directions:"
+msgid "Web Beans re-uses the basic interceptor architecture of EJB 3.0, extending the functionality in two directions:"
msgstr ""
#. Tag: para
@@ -36,22 +34,20 @@
#. Tag: para
#: interceptors.xml:14
#, no-c-format
-msgid ""
-"Web Beans features a more sophisticated annotation-based approach to binding "
-"interceptors to Web Beans."
+msgid "Web Beans features a more sophisticated annotation-based approach to binding interceptors to Web Beans."
msgstr ""
#. Tag: para
#: interceptors.xml:22
#, no-c-format
msgid "The EJB specification defines two kinds of interception points:"
-msgstr ""
+msgstr "A especificação de EJB define dois tipos de pontos de interceptação:"
#. Tag: para
#: interceptors.xml:26
#, no-c-format
msgid "business method interception, and"
-msgstr ""
+msgstr "interceptação de métodos de negócios, e"
#. Tag: para
#: interceptors.xml:29
@@ -62,9 +58,7 @@
#. Tag: para
#: interceptors.xml:33
#, no-c-format
-msgid ""
-"A <emphasis>business method interceptor</emphasis> applies to invocations of "
-"methods of the Web Bean by clients of the Web Bean:"
+msgid "A <emphasis>business method interceptor</emphasis> applies to invocations of methods of the Web Bean by clients of the Web Bean:"
msgstr ""
#. Tag: programlisting
@@ -72,17 +66,17 @@
#, no-c-format
msgid ""
"<![CDATA[public class TransactionInterceptor {\n"
-" @AroundInvoke public Object manageTransaction(InvocationContext ctx) "
-"{ ... }\n"
+" @AroundInvoke public Object manageTransaction(InvocationContext ctx) { ... }\n"
"}]]>"
msgstr ""
+"<![CDATA[public class TransactionInterceptor {\n"
+" @AroundInvoke public Object manageTransaction(InvocationContext ctx) { ... }\n"
+"}]]>"
#. Tag: para
#: interceptors.xml:38
#, no-c-format
-msgid ""
-"A <emphasis>lifecycle callback interceptor</emphasis> applies to invocations "
-"of lifecycle callbacks by the container:"
+msgid "A <emphasis>lifecycle callback interceptor</emphasis> applies to invocations of lifecycle callbacks by the container:"
msgstr ""
#. Tag: programlisting
@@ -90,17 +84,17 @@
#, no-c-format
msgid ""
"<![CDATA[public class DependencyInjectionInterceptor {\n"
-" @PostConstruct public void injectDependencies(InvocationContext ctx) "
-"{ ... }\n"
+" @PostConstruct public void injectDependencies(InvocationContext ctx) { ... }\n"
"}]]>"
msgstr ""
+"<![CDATA[public class DependencyInjectionInterceptor {\n"
+" @PostConstruct public void injectDependencies(InvocationContext ctx) { ... }\n"
+"}]]>"
#. Tag: para
#: interceptors.xml:43
#, no-c-format
-msgid ""
-"An interceptor class may intercept both lifecycle callbacks and business "
-"methods."
+msgid "An interceptor class may intercept both lifecycle callbacks and business methods."
msgstr ""
#. Tag: title
@@ -112,10 +106,7 @@
#. Tag: para
#: interceptors.xml:51
#, no-c-format
-msgid ""
-"Suppose we want to declare that some of our Web Beans are transactional. The "
-"first thing we need is an <emphasis>interceptor binding annotation</"
-"emphasis> to specify exactly which Web Beans we're interested in:"
+msgid "Suppose we want to declare that some of our Web Beans are transactional. The first thing we need is an <emphasis>interceptor binding annotation</emphasis> to specify exactly which Web Beans we're interested in:"
msgstr ""
#. Tag: programlisting
@@ -127,13 +118,15 @@
"@Retention(RUNTIME)\n"
"public @interface Transactional {}]]>"
msgstr ""
+"<![CDATA[@InterceptorBindingType\n"
+"@Target({METHOD, TYPE})\n"
+"@Retention(RUNTIME)\n"
+"public @interface Transactional {}]]>"
#. Tag: para
#: interceptors.xml:57
#, no-c-format
-msgid ""
-"Now we can easily specify that our <literal>ShoppingCart</literal> is a "
-"transactional object:"
+msgid "Now we can easily specify that our <literal>ShoppingCart</literal> is a transactional object:"
msgstr ""
#. Tag: programlisting
@@ -143,6 +136,8 @@
"<![CDATA[@Transactional\n"
"public class ShoppingCart { ... }]]>"
msgstr ""
+"<![CDATA[@Transactional\n"
+"public class ShoppingCart { ... }]]>"
#. Tag: para
#: interceptors.xml:62
@@ -158,21 +153,20 @@
" @Transactional public void checkout() { ... }\n"
"}]]>"
msgstr ""
+"<![CDATA[public class ShoppingCart {\n"
+" @Transactional public void checkout() { ... }\n"
+"}]]>"
#. Tag: title
#: interceptors.xml:69
#, no-c-format
msgid "Implementing interceptors"
-msgstr ""
+msgstr "Implementando interceptadores (interceptors)"
#. Tag: para
#: interceptors.xml:71
#, no-c-format
-msgid ""
-"That's great, but somewhere along the line we're going to have to actually "
-"implement the interceptor that provides this transaction management aspect. "
-"All we need to do is create a standard EJB interceptor, and annotate it "
-"<literal>@Interceptor</literal> and <literal>@Transactional</literal>."
+msgid "That's great, but somewhere along the line we're going to have to actually implement the interceptor that provides this transaction management aspect. All we need to do is create a standard EJB interceptor, and annotate it <literal>@Interceptor</literal> and <literal>@Transactional</literal>."
msgstr ""
#. Tag: programlisting
@@ -181,17 +175,18 @@
msgid ""
"<![CDATA[@Transactional @Interceptor\n"
"public class TransactionInterceptor {\n"
-" @AroundInvoke public Object manageTransaction(InvocationContext ctx) "
-"{ ... }\n"
+" @AroundInvoke public Object manageTransaction(InvocationContext ctx) { ... }\n"
"}]]>"
msgstr ""
+"<![CDATA[@Transactional @Interceptor\n"
+"public class TransactionInterceptor {\n"
+" @AroundInvoke public Object manageTransaction(InvocationContext ctx) { ... }\n"
+"}]]>"
#. Tag: para
#: interceptors.xml:78
#, no-c-format
-msgid ""
-"All Web Beans interceptors are simple Web Beans, and can take advantage of "
-"dependency injection and contextual lifecycle management."
+msgid "All Web Beans interceptors are simple Web Beans, and can take advantage of dependency injection and contextual lifecycle management."
msgstr ""
#. Tag: programlisting
@@ -203,11 +198,18 @@
"\n"
" @Resource Transaction transaction;\n"
"\n"
-" @AroundInvoke public Object manageTransaction(InvocationContext ctx) "
-"{ ... }\n"
+" @AroundInvoke public Object manageTransaction(InvocationContext ctx) { ... }\n"
" \n"
"}]]>"
msgstr ""
+"<![CDATA[@ApplicationScoped @Transactional @Interceptor\n"
+"public class TransactionInterceptor {\n"
+"\n"
+" @Resource Transaction transaction;\n"
+"\n"
+" @AroundInvoke public Object manageTransaction(InvocationContext ctx) { ... }\n"
+" \n"
+"}]]>"
#. Tag: para
#: interceptors.xml:83
@@ -219,14 +221,12 @@
#: interceptors.xml:88
#, no-c-format
msgid "Enabling interceptors"
-msgstr ""
+msgstr "Habiliatando interceptadores (interceptors)"
#. Tag: para
#: interceptors.xml:90
#, no-c-format
-msgid ""
-"Finally, we need to <emphasis>enable</emphasis> our interceptor in "
-"<literal>web-beans.xml</literal>."
+msgid "Finally, we need to <emphasis>enable</emphasis> our interceptor in <literal>web-beans.xml</literal>."
msgstr ""
#. Tag: programlisting
@@ -237,6 +237,9 @@
" <tx:TransactionInterceptor/>\n"
"</Interceptors>]]>"
msgstr ""
+"<![CDATA[<Interceptors>\n"
+" <tx:TransactionInterceptor/>\n"
+"</Interceptors>]]>"
#. Tag: para
#: interceptors.xml:95
@@ -248,14 +251,12 @@
#: interceptors.xml:97
#, no-c-format
msgid "Well, the XML declaration solves two problems:"
-msgstr ""
+msgstr "Bem, a declaração XML resolve dois problemas:"
#. Tag: para
#: interceptors.xml:101
#, no-c-format
-msgid ""
-"it enables us to specify a total ordering for all the interceptors in our "
-"system, ensuring deterministic behavior, and"
+msgid "it enables us to specify a total ordering for all the interceptors in our system, ensuring deterministic behavior, and"
msgstr ""
#. Tag: para
@@ -267,9 +268,7 @@
#. Tag: para
#: interceptors.xml:109
#, no-c-format
-msgid ""
-"For example, we could specify that our security interceptor runs before our "
-"<literal>TransactionInterceptor</literal>."
+msgid "For example, we could specify that our security interceptor runs before our <literal>TransactionInterceptor</literal>."
msgstr ""
#. Tag: programlisting
@@ -281,6 +280,10 @@
" <tx:TransactionInterceptor/>\n"
"</Interceptors>]]>"
msgstr ""
+"<![CDATA[<Interceptors>\n"
+" <sx:SecurityInterceptor/>\n"
+" <tx:TransactionInterceptor/>\n"
+"</Interceptors>]]>"
#. Tag: para
#: interceptors.xml:114
@@ -297,9 +300,7 @@
#. Tag: para
#: interceptors.xml:121
#, no-c-format
-msgid ""
-"Suppose we want to add some extra information to our "
-"<literal>@Transactional</literal> annotation:"
+msgid "Suppose we want to add some extra information to our <literal>@Transactional</literal> annotation:"
msgstr ""
#. Tag: programlisting
@@ -313,14 +314,17 @@
" boolean requiresNew() default false;\n"
"}]]>"
msgstr ""
+"<![CDATA[@InterceptorBindingType\n"
+"@Target({METHOD, TYPE})\n"
+"@Retention(RUNTIME)\n"
+"public @interface Transactional {\n"
+" boolean requiresNew() default false;\n"
+"}]]>"
#. Tag: para
#: interceptors.xml:126
#, no-c-format
-msgid ""
-"Web Beans will use the value of <literal>requiresNew</literal> to choose "
-"between two different interceptors, <literal>TransactionInterceptor</"
-"literal> and <literal>RequiresNewTransactionInterceptor</literal>."
+msgid "Web Beans will use the value of <literal>requiresNew</literal> to choose between two different interceptors, <literal>TransactionInterceptor</literal> and <literal>RequiresNewTransactionInterceptor</literal>."
msgstr ""
#. Tag: programlisting
@@ -329,17 +333,18 @@
msgid ""
"<![CDATA[@Transactional(requiresNew=true) @Interceptor\n"
"public class RequiresNewTransactionInterceptor {\n"
-" @AroundInvoke public Object manageTransaction(InvocationContext ctx) "
-"{ ... }\n"
+" @AroundInvoke public Object manageTransaction(InvocationContext ctx) { ... }\n"
"}]]>"
msgstr ""
+"<![CDATA[@Transactional(requiresNew=true) @Interceptor\n"
+"public class RequiresNewTransactionInterceptor {\n"
+" @AroundInvoke public Object manageTransaction(InvocationContext ctx) { ... }\n"
+"}]]>"
#. Tag: para
#: interceptors.xml:132
#, no-c-format
-msgid ""
-"Now we can use <literal>RequiresNewTransactionInterceptor</literal> like "
-"this:"
+msgid "Now we can use <literal>RequiresNewTransactionInterceptor</literal> like this:"
msgstr ""
#. Tag: programlisting
@@ -349,14 +354,13 @@
"<![CDATA[@Transactional(requiresNew=true)\n"
"public class ShoppingCart { ... }]]>"
msgstr ""
+"<![CDATA[@Transactional(requiresNew=true)\n"
+"public class ShoppingCart { ... }]]>"
#. Tag: para
#: interceptors.xml:136
#, no-c-format
-msgid ""
-"But what if we only have one interceptor and we want the manager to ignore "
-"the value of <literal>requiresNew</literal> when binding interceptors? We "
-"can use the <literal>@NonBinding</literal> annotation:"
+msgid "But what if we only have one interceptor and we want the manager to ignore the value of <literal>requiresNew</literal> when binding interceptors? We can use the <literal>@NonBinding</literal> annotation:"
msgstr ""
#. Tag: programlisting
@@ -370,6 +374,12 @@
" @NonBinding String[] rolesAllowed() default {};\n"
"}]]>"
msgstr ""
+"<![CDATA[@InterceptorBindingType\n"
+"@Target({METHOD, TYPE})\n"
+"@Retention(RUNTIME)\n"
+"public @interface Secure {\n"
+" @NonBinding String[] rolesAllowed() default {};\n"
+"}]]>"
#. Tag: title
#: interceptors.xml:145
@@ -380,11 +390,7 @@
#. Tag: para
#: interceptors.xml:147
#, no-c-format
-msgid ""
-"Usually we use combinations of interceptor bindings types to bind multiple "
-"interceptors to a Web Bean. For example, the following declaration would be "
-"used to bind <literal>TransactionInterceptor</literal> and "
-"<literal>SecurityInterceptor</literal> to the same Web Bean:"
+msgid "Usually we use combinations of interceptor bindings types to bind multiple interceptors to a Web Bean. For example, the following declaration would be used to bind <literal>TransactionInterceptor</literal> and <literal>SecurityInterceptor</literal> to the same Web Bean:"
msgstr ""
#. Tag: programlisting
@@ -394,13 +400,13 @@
"<![CDATA[@Secure(rolesAllowed=\"admin\") @Transactional\n"
"public class ShoppingCart { ... }]]>"
msgstr ""
+"<![CDATA[@Secure(rolesAllowed=\"admin\") @Transactional\n"
+"public class ShoppingCart { ... }]]>"
#. Tag: para
#: interceptors.xml:154
#, no-c-format
-msgid ""
-"However, in very complex cases, an interceptor itself may specify some "
-"combination of interceptor binding types:"
+msgid "However, in very complex cases, an interceptor itself may specify some combination of interceptor binding types:"
msgstr ""
#. Tag: programlisting
@@ -410,13 +416,13 @@
"<![CDATA[@Transactional @Secure @Interceptor\n"
"public class TransactionalSecureInterceptor { ... }]]>"
msgstr ""
+"<![CDATA[@Transactional @Secure @Interceptor\n"
+"public class TransactionalSecureInterceptor { ... }]]>"
#. Tag: para
#: interceptors.xml:159
#, no-c-format
-msgid ""
-"Then this interceptor could be bound to the <literal>checkout()</literal> "
-"method using any one of the following combinations:"
+msgid "Then this interceptor could be bound to the <literal>checkout()</literal> method using any one of the following combinations:"
msgstr ""
#. Tag: programlisting
@@ -427,6 +433,9 @@
" @Transactional @Secure public void checkout() { ... }\n"
"}]]>"
msgstr ""
+"<![CDATA[public class ShoppingCart {\n"
+" @Transactional @Secure public void checkout() { ... }\n"
+"}]]>"
#. Tag: programlisting
#: interceptors.xml:164
@@ -437,6 +446,10 @@
" @Transactional public void checkout() { ... }\n"
"}]]>"
msgstr ""
+"<![CDATA[@Secure\n"
+"public class ShoppingCart {\n"
+" @Transactional public void checkout() { ... }\n"
+"}]]>"
#. Tag: programlisting
#: interceptors.xml:166
@@ -447,6 +460,10 @@
" @Secure public void checkout() { ... }\n"
"}]]>"
msgstr ""
+"<![CDATA[@Transactionl\n"
+"public class ShoppingCart {\n"
+" @Secure public void checkout() { ... }\n"
+"}]]>"
#. Tag: programlisting
#: interceptors.xml:168
@@ -457,6 +474,10 @@
" public void checkout() { ... }\n"
"}]]>"
msgstr ""
+"<![CDATA[@Transactional @Secure\n"
+"public class ShoppingCart {\n"
+" public void checkout() { ... }\n"
+"}]]>"
#. Tag: title
#: interceptors.xml:173
@@ -467,28 +488,19 @@
#. Tag: para
#: interceptors.xml:175
#, no-c-format
-msgid ""
-"One limitation of the Java language support for annotations is the lack of "
-"annotation inheritance. Really, annotations should have reuse built in, to "
-"allow this kind of thing to work:"
+msgid "One limitation of the Java language support for annotations is the lack of annotation inheritance. Really, annotations should have reuse built in, to allow this kind of thing to work:"
msgstr ""
#. Tag: programlisting
#: interceptors.xml:179
#, no-c-format
-msgid ""
-"<![CDATA[public @interface Action extends Transactional, Secure { ... }]]>"
-msgstr ""
+msgid "<![CDATA[public @interface Action extends Transactional, Secure { ... }]]>"
+msgstr "<![CDATA[public @interface Action extends Transactional, Secure { ... }]]>"
#. Tag: para
#: interceptors.xml:181
#, no-c-format
-msgid ""
-"Well, fortunately, Web Beans works around this missing feature of Java. We "
-"may annotate one interceptor binding type with other interceptor binding "
-"types. The interceptor bindings are transitive — any Web Bean with the "
-"first interceptor binding inherits the interceptor bindings declared as meta-"
-"annotations."
+msgid "Well, fortunately, Web Beans works around this missing feature of Java. We may annotate one interceptor binding type with other interceptor binding types. The interceptor bindings are transitive — any Web Bean with the first interceptor binding inherits the interceptor bindings declared as meta-annotations."
msgstr ""
#. Tag: programlisting
@@ -501,15 +513,16 @@
"@Retention(RUNTIME)\n"
"public @interface Action { ... }]]>"
msgstr ""
+"<![CDATA[@Transactional @Secure\n"
+"@InterceptorBindingType\n"
+"@Target(TYPE)\n"
+"@Retention(RUNTIME)\n"
+"public @interface Action { ... }]]>"
#. Tag: para
#: interceptors.xml:188
#, no-c-format
-msgid ""
-"Any Web Bean annotated <literal>@Action</literal> will be bound to both "
-"<literal>TransactionInterceptor</literal> and <literal>SecurityInterceptor</"
-"literal>. (And even <literal>TransactionalSecureInterceptor</literal>, if it "
-"exists.)"
+msgid "Any Web Bean annotated <literal>@Action</literal> will be bound to both <literal>TransactionInterceptor</literal> and <literal>SecurityInterceptor</literal>. (And even <literal>TransactionalSecureInterceptor</literal>, if it exists.)"
msgstr ""
#. Tag: title
@@ -521,22 +534,22 @@
#. Tag: para
#: interceptors.xml:197
#, no-c-format
-msgid ""
-"The <literal>@Interceptors</literal> annotation defined by the EJB "
-"specification is supported for both enterprise and simple Web Beans, for "
-"example:"
+msgid "The <literal>@Interceptors</literal> annotation defined by the EJB specification is supported for both enterprise and simple Web Beans, for example:"
msgstr ""
#. Tag: programlisting
#: interceptors.xml:200
#, no-c-format
msgid ""
-"<![CDATA[(a)Interceptors({TransactionInterceptor.class, SecurityInterceptor."
-"class})\n"
+"<![CDATA[(a)Interceptors({TransactionInterceptor.class, SecurityInterceptor.class})\n"
"public class ShoppingCart {\n"
" public void checkout() { ... }\n"
"}]]>"
msgstr ""
+"<![CDATA[(a)Interceptors({TransactionInterceptor.class, SecurityInterceptor.class})\n"
+"public class ShoppingCart {\n"
+" public void checkout() { ... }\n"
+"}]]>"
#. Tag: para
#: interceptors.xml:202
@@ -559,14 +572,12 @@
#. Tag: para
#: interceptors.xml:212
#, no-c-format
-msgid ""
-"the interceptor ordering is non-global — it is determined by the order in "
-"which interceptors are listed at the class level."
+msgid "the interceptor ordering is non-global — it is determined by the order in which interceptors are listed at the class level."
msgstr ""
#. Tag: para
#: interceptors.xml:217
#, no-c-format
-msgid ""
-"Therefore, we recommend the use of Web Beans-style interceptor bindings."
+msgid "Therefore, we recommend the use of Web Beans-style interceptor bindings."
msgstr ""
+
Modified: doc/trunk/reference/pt-BR/intro.po
===================================================================
--- doc/trunk/reference/pt-BR/intro.po 2009-02-28 14:04:13 UTC (rev 1744)
+++ doc/trunk/reference/pt-BR/intro.po 2009-03-01 00:42:05 UTC (rev 1745)
@@ -6,8 +6,8 @@
"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-06 11:30+0000\n"
-"PO-Revision-Date: 2009-01-06 11:30+0000\n"
-"Last-Translator: Automatically generated\n"
+"PO-Revision-Date: 2009-02-28 15:10-0300\n"
+"Last-Translator: João Paulo Viragine <joao.viragine(a)redhat.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -17,48 +17,31 @@
#: intro.xml:4
#, no-c-format
msgid "Getting started with Web Beans"
-msgstr ""
+msgstr "Introdução a Web Beans"
#. Tag: para
#: intro.xml:6
#, no-c-format
-msgid ""
-"So you're already keen to get started writing your first Web Bean? Or "
-"perhaps you're skeptical, wondering what kinds of hoops the Web Beans "
-"specification will make you jump through! The good news is that you've "
-"probably already written and used hundreds, perhaps thousands of Web Beans. "
-"You might not even remember the first Web Bean you wrote."
-msgstr ""
+msgid "So you're already keen to get started writing your first Web Bean? Or perhaps you're skeptical, wondering what kinds of hoops the Web Beans specification will make you jump through! The good news is that you've probably already written and used hundreds, perhaps thousands of Web Beans. You might not even remember the first Web Bean you wrote."
+msgstr "Então você já está interessado em começar a escrever o seu primeiro Web Bean? Ou talvez você é cético, imaginando que tipos de hoops a especificação Web Beans fará com que você saltar passar! A boa notícia é que você provavelmente já escreveu e utilizou centenas, talvez milhares de Web Beans. Você pode até não se lembrar do primeiro Web Bean que você escreveu."
#. Tag: title
#: intro.xml:13
#, no-c-format
msgid "Your first Web Bean"
-msgstr ""
+msgstr "Seu primeiro Web Bean"
#. Tag: para
#: intro.xml:15
#, no-c-format
-msgid ""
-"With certain, very special exceptions, every Java class with a constructor "
-"that accepts no parameters is a Web Bean. That includes every JavaBean. "
-"Furthermore, every EJB 3-style session bean is a Web Bean. Sure, the "
-"JavaBeans and EJBs you've been writing every day have not been able to take "
-"advantage of the new services defined by the Web Beans specification, but "
-"you'll be able to use every one of them as Web Beans — injecting them "
-"into other Web Beans, configuring them via the Web Beans XML configuration "
-"facility, even adding interceptors and decorators to them — without "
-"touching your existing code."
+msgid "With certain, very special exceptions, every Java class with a constructor that accepts no parameters is a Web Bean. That includes every JavaBean. Furthermore, every EJB 3-style session bean is a Web Bean. Sure, the JavaBeans and EJBs you've been writing every day have not been able to take advantage of the new services defined by the Web Beans specification, but you'll be able to use every one of them as Web Beans — injecting them into other Web Beans, configuring them via the Web Beans XML configuration facility, even adding interceptors and decorators to them — without touching your existing code."
msgstr ""
#. Tag: para
#: intro.xml:25
#, no-c-format
-msgid ""
-"Suppose that we have two existing Java classes, that we've been using for "
-"years in various applications. The first class parses a string into a list "
-"of sentences:"
-msgstr ""
+msgid "Suppose that we have two existing Java classes, that we've been using for years in various applications. The first class parses a string into a list of sentences:"
+msgstr "Suponha que temos duas classes Java existentes, que temos utilizado por anos em várias aplicações. A primeira classe faz a divisão (parse) de uma string em uma lista de sentenças:"
#. Tag: programlisting
#: intro.xml:29
@@ -68,15 +51,15 @@
" public List<String> parse(String text) { ... }\n"
"}]]>"
msgstr ""
+"<![CDATA[public class SentenceParser {\n"
+" public List<String> parse(String text) { ... }\n"
+"}]]>"
#. Tag: para
#: intro.xml:31
#, no-c-format
-msgid ""
-"The second existing class is a stateless session bean front-end for an "
-"external system that is able to translate sentences from one language to "
-"another:"
-msgstr ""
+msgid "The second existing class is a stateless session bean front-end for an external system that is able to translate sentences from one language to another:"
+msgstr "A segunda classe existente é um stateless session bean de fachada (front-end) para um sistema externo que é capaz de traduzir frases de uma língua para outra:"
#. Tag: programlisting
#: intro.xml:35
@@ -87,12 +70,16 @@
" public String translate(String sentence) { ... }\n"
"}]]>"
msgstr ""
+"<![CDATA[@Stateless\n"
+"public class SentenceTranslator implements Translator {\n"
+" public String translate(String sentence) { ... }\n"
+"}]]>"
#. Tag: para
#: intro.xml:37
#, no-c-format
msgid "Where <literal>Translator</literal> is the local interface:"
-msgstr ""
+msgstr "Onde <literal>Translator</literal> é a interface local:"
#. Tag: programlisting
#: intro.xml:39
@@ -103,14 +90,16 @@
" public String translate(String sentence);\n"
"}]]>"
msgstr ""
+"<![CDATA[@Local\n"
+"public interface Translator {\n"
+" public String translate(String sentence);\n"
+"}]]>"
#. Tag: para
#: intro.xml:41
#, no-c-format
-msgid ""
-"Unfortunately, we don't have a preexisting class that translates whole text "
-"documents. So let's write a Web Bean that does this job:"
-msgstr ""
+msgid "Unfortunately, we don't have a preexisting class that translates whole text documents. So let's write a Web Bean that does this job:"
+msgstr " Infelizmente, não temos uma classe preexistente que traduz todo texto de documentos. Então vamos escrever um Web Bean que faz este trabalho:"
#. Tag: programlisting
#: intro.xml:44
@@ -122,8 +111,7 @@
" private Translator sentenceTranslator;\n"
" \n"
" @Initializer\n"
-" TextTranslator(SentenceParser sentenceParser, Translator "
-"sentenceTranslator) {\n"
+" TextTranslator(SentenceParser sentenceParser, Translator sentenceTranslator) {\n"
" this.sentenceParser = sentenceParser;\n"
" this.sentenceTranslator = sentenceTranslator;\n"
" }\n"
@@ -138,13 +126,31 @@
" \n"
"}]]>"
msgstr ""
+"<![CDATA[public class TextTranslator {\n"
+" \n"
+" private SentenceParser sentenceParser;\n"
+" private Translator sentenceTranslator;\n"
+" \n"
+" @Initializer\n"
+" TextTranslator(SentenceParser sentenceParser, Translator sentenceTranslator) {\n"
+" this.sentenceParser = sentenceParser;\n"
+" this.sentenceTranslator = sentenceTranslator;\n"
+" }\n"
+" \n"
+" public String translate(String text) {\n"
+" StringBuilder sb = new StringBuilder();\n"
+" for (String sentence: sentenceParser.parse(text)) {\n"
+" sb.append(sentenceTranslator.translate(sentence));\n"
+" }\n"
+" return sb.toString();\n"
+" }\n"
+" \n"
+"}]]>"
#. Tag: para
#: intro.xml:46
#, no-c-format
-msgid ""
-"We may obtain an instance of <literal>TextTranslator</literal> by injecting "
-"it into a Web Bean, Servlet or EJB:"
+msgid "We may obtain an instance of <literal>TextTranslator</literal> by injecting it into a Web Bean, Servlet or EJB:"
msgstr ""
#. Tag: programlisting
@@ -156,201 +162,142 @@
" this.textTranslator = textTranslator;\n"
"}]]>"
msgstr ""
+"<![CDATA[@Initializer\n"
+"public setTextTranslator(TextTranslator textTranslator) {\n"
+" this.textTranslator = textTranslator;\n"
+"}]]>"
#. Tag: para
#: intro.xml:51
#, no-c-format
-msgid ""
-"Alternatively, we may obtain an instance by directly calling a method of the "
-"Web Bean manager:"
-msgstr ""
+msgid "Alternatively, we may obtain an instance by directly calling a method of the Web Bean manager:"
+msgstr "Alternativamente, nós podemos obter uma instância invocando diretamente o método do gerenciador do Web Bean:"
#. Tag: programlisting
#: intro.xml:54
#, no-c-format
-msgid ""
-"<![CDATA[TextTranslator tt = manager.getInstanceByType(TextTranslator."
-"class);]]>"
-msgstr ""
+msgid "<![CDATA[TextTranslator tt = manager.getInstanceByType(TextTranslator.class);]]>"
+msgstr "<![CDATA[TextTranslator tt = manager.getInstanceByType(TextTranslator.class);]]>"
#. Tag: para
#: intro.xml:56
#, no-c-format
-msgid ""
-"But wait: <literal>TextTranslator</literal> does not have a constructor with "
-"no parameters! Is it still a Web Bean? Well, a class that does not have a "
-"constructor with no parameters can still be a Web Bean if it has a "
-"constructor annotated <literal>@Initializer</literal>."
+msgid "But wait: <literal>TextTranslator</literal> does not have a constructor with no parameters! Is it still a Web Bean? Well, a class that does not have a constructor with no parameters can still be a Web Bean if it has a constructor annotated <literal>@Initializer</literal>."
msgstr ""
#. Tag: para
#: intro.xml:61
#, no-c-format
-msgid ""
-"As you've guessed, the <literal>@Initializer</literal> annotation has "
-"something to do with dependency injection! <literal>@Initializer</literal> "
-"may be applied to a constructor or method of a Web Bean, and tells the Web "
-"Bean manager to call that constructor or method when instantiating the Web "
-"Bean. The Web Bean manager will inject other Web Beans to the parameters of "
-"the constructor or method."
+msgid "As you've guessed, the <literal>@Initializer</literal> annotation has something to do with dependency injection! <literal>@Initializer</literal> may be applied to a constructor or method of a Web Bean, and tells the Web Bean manager to call that constructor or method when instantiating the Web Bean. The Web Bean manager will inject other Web Beans to the parameters of the constructor or method."
msgstr ""
#. Tag: para
#: intro.xml:68
#, no-c-format
-msgid ""
-"At system initialization time, the Web Bean manager must validate that "
-"exactly one Web Bean exists which satisfies each injection point. In our "
-"example, if no implementation of <literal>Translator</literal> "
-"available — if the <literal>SentenceTranslator</literal> EJB was not "
-"deployed — the Web Bean manager would throw an "
-"<literal>UnsatisfiedDependencyException</literal>. If more than one "
-"implementation of <literal>Translator</literal> was available, the Web Bean "
-"manager would throw an <literal>AmbiguousDependencyException</literal>."
+msgid "At system initialization time, the Web Bean manager must validate that exactly one Web Bean exists which satisfies each injection point. In our example, if no implementation of <literal>Translator</literal> available — if the <literal>SentenceTranslator</literal> EJB was not deployed — the Web Bean manager would throw an <literal>UnsatisfiedDependencyException</literal>. If more than one implementation of <literal>Translator</literal> was available, the Web Bean manager would throw an <literal>AmbiguousDependencyException</literal>."
msgstr ""
#. Tag: title
#: intro.xml:80
#, no-c-format
msgid "What is a Web Bean?"
-msgstr ""
+msgstr "O que é um Web Bean?"
#. Tag: para
#: intro.xml:82
#, no-c-format
msgid "So what, <emphasis>exactly</emphasis>, is a Web Bean?"
-msgstr ""
+msgstr "Então, o que, <emphasis>exatamente</emphasis>, é um Web Bean?"
#. Tag: para
#: intro.xml:84
#, no-c-format
-msgid ""
-"A Web Bean is an application class that contains business logic. A Web Bean "
-"may be called directly from Java code, or it may be invoked via Unified EL. "
-"A Web Bean may access transactional resources. Dependencies between Web "
-"Beans are managed automatically by the Web Bean manager. Most Web Beans are "
-"<emphasis>stateful</emphasis> and <emphasis>contextual</emphasis>. The "
-"lifecycle of a Web Bean is always managed by the Web Bean manager."
+msgid "A Web Bean is an application class that contains business logic. A Web Bean may be called directly from Java code, or it may be invoked via Unified EL. A Web Bean may access transactional resources. Dependencies between Web Beans are managed automatically by the Web Bean manager. Most Web Beans are <emphasis>stateful</emphasis> and <emphasis>contextual</emphasis>. The lifecycle of a Web Bean is always managed by the Web Bean manager."
msgstr ""
#. Tag: para
#: intro.xml:91
#, no-c-format
-msgid ""
-"Let's back up a second. What does it really mean to be \"contextual\"? Since "
-"Web Beans may be stateful, it matters <emphasis>which</emphasis> bean "
-"instance I have. Unlike a stateless component model (for example, stateless "
-"session beans) or a singleton component model (such as servlets, or "
-"singleton beans), different clients of a Web Bean see the Web Bean in "
-"different states. The client-visible state depends upon which instance of "
-"the Web Bean the client has a reference to."
+msgid "Let's back up a second. What does it really mean to be \"contextual\"? Since Web Beans may be stateful, it matters <emphasis>which</emphasis> bean instance I have. Unlike a stateless component model (for example, stateless session beans) or a singleton component model (such as servlets, or singleton beans), different clients of a Web Bean see the Web Bean in different states. The client-visible state depends upon which instance of the Web Bean the client has a reference to."
msgstr ""
#. Tag: para
#: intro.xml:98
#, no-c-format
-msgid ""
-"However, like a stateless or singleton model, but <emphasis>unlike</"
-"emphasis> stateful session beans, the client does not control the lifecycle "
-"of the instance by explicitly creating and destroying it. Instead, the "
-"<emphasis>scope</emphasis> of the Web Bean determines:"
-msgstr ""
+msgid "However, like a stateless or singleton model, but <emphasis>unlike</emphasis> stateful session beans, the client does not control the lifecycle of the instance by explicitly creating and destroying it. Instead, the <emphasis>scope</emphasis> of the Web Bean determines:"
+msgstr "No entanto, como o modelo stateless ou singleton, mas <emphasis>ao contrário</emphasis> dos stateful session beans, o cliente não controla o ciclo de vida da instância por explicitamente criar e destruí-lo. Em vez disso, o <emphasis>escopo</emphasis> do Web Bean determina:"
#. Tag: para
#: intro.xml:105
#, no-c-format
msgid "the lifecycle of each instance of the Web Bean and"
-msgstr ""
+msgstr "o ciclo de vida de cada instância do Web Bean e"
#. Tag: para
#: intro.xml:108
#, no-c-format
-msgid ""
-"which clients share a reference to a particular instance of the Web Bean."
-msgstr ""
+msgid "which clients share a reference to a particular instance of the Web Bean."
+msgstr "que os clientes compartilham uma referência a uma instância específica do Web Bean."
#. Tag: para
#: intro.xml:113
#, no-c-format
-msgid ""
-"For a given thread in a Web Beans application, there may be an "
-"<emphasis>active context</emphasis> associated with the scope of the Web "
-"Bean. This context may be unique to the thread (for example, if the Web Bean "
-"is request scoped), or it may be shared with certain other threads (for "
-"example, if the Web Bean is session scoped) or even all other threads (if it "
-"is application scoped)."
+msgid "For a given thread in a Web Beans application, there may be an <emphasis>active context</emphasis> associated with the scope of the Web Bean. This context may be unique to the thread (for example, if the Web Bean is request scoped), or it may be shared with certain other threads (for example, if the Web Bean is session scoped) or even all other threads (if it is application scoped)."
msgstr ""
#. Tag: para
#: intro.xml:119
#, no-c-format
-msgid ""
-"Clients (for example, other Web Beans) executing in the same context will "
-"see the same instance of the Web Bean. But clients in a different context "
-"will see a different instance."
+msgid "Clients (for example, other Web Beans) executing in the same context will see the same instance of the Web Bean. But clients in a different context will see a different instance."
msgstr ""
#. Tag: para
#: intro.xml:123
#, no-c-format
-msgid ""
-"One great advantage of the contextual model is that it allows stateful Web "
-"Beans to be treated like services! The client need not concern itself with "
-"managing the lifecycle of the Web Bean it is using, <emphasis>nor does it "
-"even need to know what that lifecyle is.</emphasis> Web Beans interact by "
-"passing messages, and the Web Bean implementations define the lifecycle of "
-"their own state. The Web Beans are loosely coupled because:"
+msgid "One great advantage of the contextual model is that it allows stateful Web Beans to be treated like services! The client need not concern itself with managing the lifecycle of the Web Bean it is using, <emphasis>nor does it even need to know what that lifecyle is.</emphasis> Web Beans interact by passing messages, and the Web Bean implementations define the lifecycle of their own state. The Web Beans are loosely coupled because:"
msgstr ""
#. Tag: para
#: intro.xml:132
#, no-c-format
msgid "they interact via well-defined public APIs"
-msgstr ""
+msgstr "ele interagem por uma API pública bem definida"
#. Tag: para
#: intro.xml:135
#, no-c-format
msgid "their lifecycles are completely decoupled"
-msgstr ""
+msgstr "seus ciclos de vida são completamente desacoplados"
#. Tag: para
#: intro.xml:139
#, no-c-format
-msgid ""
-"We can replace one Web Bean with a different Web Bean that implements the "
-"same API and has a different lifecycle (a different scope) without affecting "
-"the other Web Bean implementation. In fact, Web Beans defines a "
-"sophisticated facility for overriding Web Bean implementations at deployment "
-"time, as we will see in <xref linkend=\"deploymenttypes\"/>."
+msgid "We can replace one Web Bean with a different Web Bean that implements the same API and has a different lifecycle (a different scope) without affecting the other Web Bean implementation. In fact, Web Beans defines a sophisticated facility for overriding Web Bean implementations at deployment time, as we will see in <xref linkend=\"deploymenttypes\"/>."
msgstr ""
#. Tag: para
#: intro.xml:145
#, no-c-format
-msgid ""
-"Note that not all clients of a Web Bean are Web Beans. Other objects such as "
-"Servlets or Message-Driven Beans — which are by nature not injectable, "
-"contextual objects — may also obtain references to Web Beans by injection."
-msgstr ""
+msgid "Note that not all clients of a Web Bean are Web Beans. Other objects such as Servlets or Message-Driven Beans — which are by nature not injectable, contextual objects — may also obtain references to Web Beans by injection."
+msgstr "Note que nem todos os clientes de um Web Bean são Web Beans. Outros objetos, tais como Servlets ou Message-Driven Beans — que são, por natureza, não injetável, objetos contextuais — podem também obter referências a Web Beans por injeção."
#. Tag: para
#: intro.xml:149
#, no-c-format
msgid "Enough hand-waving. More formally, according to the spec:"
-msgstr ""
+msgstr "Chega de mão abanando. Mais formalmente, de acordo com a especificação:"
#. Tag: para
#: intro.xml:153
#, no-c-format
msgid "A Web Bean comprises:"
-msgstr ""
+msgstr "Um Web Bean compreende:"
#. Tag: para
#: intro.xml:156
#, no-c-format
msgid "A (nonempty) set of API types"
-msgstr ""
+msgstr "Um conjunto (não vazio) de tipos de API (API types)"
#. Tag: para
#: intro.xml:157
@@ -362,19 +309,19 @@
#: intro.xml:158
#, no-c-format
msgid "A scope"
-msgstr ""
+msgstr "Um escopo"
#. Tag: para
#: intro.xml:159
#, no-c-format
msgid "A deployment type"
-msgstr ""
+msgstr "Um tipo de publicação (deployment type)"
#. Tag: para
#: intro.xml:160
#, no-c-format
msgid "Optionally, a Web Bean name"
-msgstr ""
+msgstr "Opcionalmente, um nome Web Bean"
#. Tag: para
#: intro.xml:161
@@ -386,13 +333,13 @@
#: intro.xml:162
#, no-c-format
msgid "A Web Bean implementation"
-msgstr ""
+msgstr "A implementação de Web Bean"
#. Tag: para
#: intro.xml:167
#, no-c-format
msgid "Let's see what some of these terms mean, to the Web Bean developer."
-msgstr ""
+msgstr "Vamos ver o que alguns destes termos significam, para o desenvolvedor Web Bean."
#. Tag: title
#: intro.xml:170
@@ -403,75 +350,55 @@
#. Tag: para
#: intro.xml:172
#, no-c-format
-msgid ""
-"Web Beans usually acquire references to other Web Beans via dependency "
-"injection. Any injected attribute specifies a \"contract\" that must be "
-"satisfied by the Web Bean to be injected. The contract is:"
+msgid "Web Beans usually acquire references to other Web Beans via dependency injection. Any injected attribute specifies a \"contract\" that must be satisfied by the Web Bean to be injected. The contract is:"
msgstr ""
#. Tag: para
#: intro.xml:177
#, no-c-format
msgid "an API type, together with"
-msgstr ""
+msgstr "um tipo de API, juntamente com"
#. Tag: para
#: intro.xml:178
-#, no-c-format
+#, fuzzy, no-c-format
msgid "a set of binding types."
-msgstr ""
+msgstr "os tipos têm de corresponder\n"
#. Tag: para
#: intro.xml:181
#, no-c-format
-msgid ""
-"An API is a user-defined class or interface. (If the Web Bean is an EJB "
-"session bean, the API type is the <literal>@Local</literal> interface or "
-"bean-class local view). A binding type represents some client-visible "
-"semantic that is satisfied by some implementations of the API and not by "
-"others."
+msgid "An API is a user-defined class or interface. (If the Web Bean is an EJB session bean, the API type is the <literal>@Local</literal> interface or bean-class local view). A binding type represents some client-visible semantic that is satisfied by some implementations of the API and not by others."
msgstr ""
#. Tag: para
#: intro.xml:186
#, no-c-format
-msgid ""
-"Binding types are represented by user-defined annotations that are "
-"themselves annotated <literal>@BindingType</literal>. For example, the "
-"following injection point has API type <literal>PaymentProcessor</literal> "
-"and binding type <literal>@CreditCard</literal>:"
+msgid "Binding types are represented by user-defined annotations that are themselves annotated <literal>@BindingType</literal>. For example, the following injection point has API type <literal>PaymentProcessor</literal> and binding type <literal>@CreditCard</literal>:"
msgstr ""
#. Tag: programlisting
#: intro.xml:191
#, no-c-format
msgid "<![CDATA[@CreditCard PaymentProcessor paymentProcessor]]>"
-msgstr ""
+msgstr "<![CDATA[@CreditCard PaymentProcessor paymentProcessor]]>"
#. Tag: para
#: intro.xml:193
#, no-c-format
-msgid ""
-"If no binding type is explicitly specified at an injection point, the "
-"default binding type <literal>@Current</literal> is assumed."
+msgid "If no binding type is explicitly specified at an injection point, the default binding type <literal>@Current</literal> is assumed."
msgstr ""
#. Tag: para
#: intro.xml:196
#, no-c-format
-msgid ""
-"For each injection point, the Web Bean manager searches for a Web Bean which "
-"satisfies the contract (implements the API, and has all the binding types), "
-"and injects that Web Bean."
+msgid "For each injection point, the Web Bean manager searches for a Web Bean which satisfies the contract (implements the API, and has all the binding types), and injects that Web Bean."
msgstr ""
#. Tag: para
#: intro.xml:200
#, no-c-format
-msgid ""
-"The following Web Bean has the binding type <literal>@CreditCard</literal> "
-"and implements the API type <literal>PaymentProcessor</literal>. It could "
-"therefore be injected to the example injection point:"
+msgid "The following Web Bean has the binding type <literal>@CreditCard</literal> and implements the API type <literal>PaymentProcessor</literal>. It could therefore be injected to the example injection point:"
msgstr ""
#. Tag: programlisting
@@ -482,61 +409,44 @@
"public class CreditCardPaymentProcessor \n"
" implements PaymentProcessor { ... }]]>"
msgstr ""
+"<![CDATA[@CreditCard\n"
+"public class CreditCardPaymentProcessor \n"
+" implements PaymentProcessor { ... }]]>"
#. Tag: para
#: intro.xml:206
#, no-c-format
-msgid ""
-"If a Web Bean does not explicitly specify a set of binding types, it has "
-"exactly one binding type: the default binding type <literal>@Current</"
-"literal>."
+msgid "If a Web Bean does not explicitly specify a set of binding types, it has exactly one binding type: the default binding type <literal>@Current</literal>."
msgstr ""
#. Tag: para
#: intro.xml:209
#, no-c-format
-msgid ""
-"Web Beans defines a sophisticated but intuitive <emphasis>resolution "
-"algorithm</emphasis> that helps the container decide what to do if there is "
-"more than one Web Bean that satisfies a particular contract. We'll get into "
-"the details in <xref linkend=\"injection\"/>."
+msgid "Web Beans defines a sophisticated but intuitive <emphasis>resolution algorithm</emphasis> that helps the container decide what to do if there is more than one Web Bean that satisfies a particular contract. We'll get into the details in <xref linkend=\"injection\"/>."
msgstr ""
#. Tag: title
#: intro.xml:217
#, no-c-format
msgid "Deployment types"
-msgstr ""
+msgstr "Tipos de publicação (deployment types)"
#. Tag: para
#: intro.xml:219
#, no-c-format
-msgid ""
-"<emphasis>Deployment types</emphasis> let us classify our Web Beans by "
-"deployment scenario. A deployment type is an annotation that represents a "
-"particular deployment scenario, for example <literal>@Mock</literal>, "
-"<literal>@Staging</literal> or <literal>@AustralianTaxLaw</literal>. We "
-"apply the annotation to Web Beans which should be deployed in that scenario. "
-"A deployment type allows a whole set of Web Beans to be conditionally "
-"deployed, with a just single line of configuration."
+msgid "<emphasis>Deployment types</emphasis> let us classify our Web Beans by deployment scenario. A deployment type is an annotation that represents a particular deployment scenario, for example <literal>@Mock</literal>, <literal>@Staging</literal> or <literal>@AustralianTaxLaw</literal>. We apply the annotation to Web Beans which should be deployed in that scenario. A deployment type allows a whole set of Web Beans to be conditionally deployed, with a just single line of configuration."
msgstr ""
#. Tag: para
#: intro.xml:226
#, no-c-format
-msgid ""
-"Many Web Beans just use the default deployment type <literal>@Production</"
-"literal>, in which case no deployment type need be explicitly specified. All "
-"three Web Bean in our example have the deployment type <literal>@Production</"
-"literal>."
+msgid "Many Web Beans just use the default deployment type <literal>@Production</literal>, in which case no deployment type need be explicitly specified. All three Web Bean in our example have the deployment type <literal>@Production</literal>."
msgstr ""
#. Tag: para
#: intro.xml:230
#, no-c-format
-msgid ""
-"In a testing environment, we might want to replace the "
-"<literal>SentenceTranslator</literal> Web Bean with a \"mock object\":"
+msgid "In a testing environment, we might want to replace the <literal>SentenceTranslator</literal> Web Bean with a \"mock object\":"
msgstr ""
#. Tag: programlisting
@@ -550,48 +460,42 @@
" }\n"
"}]]>"
msgstr ""
+"<![CDATA[@Mock\n"
+"public class MockSentenceTranslator implements Translator {\n"
+" public String translate(String sentence) {\n"
+" return \"Lorem ipsum dolor sit amet\";\n"
+" }\n"
+"}]]>"
#. Tag: para
#: intro.xml:236
#, no-c-format
-msgid ""
-"We would enable the deployment type <literal>@Mock</literal> in our testing "
-"environment, to indicate that <literal>MockSentenceTranslator</literal> and "
-"any other Web Bean annotated <literal>@Mock</literal> should be used."
+msgid "We would enable the deployment type <literal>@Mock</literal> in our testing environment, to indicate that <literal>MockSentenceTranslator</literal> and any other Web Bean annotated <literal>@Mock</literal> should be used."
msgstr ""
#. Tag: para
#: intro.xml:240
#, no-c-format
-msgid ""
-"We'll talk more about this unique and powerful feature in <xref linkend="
-"\"deploymenttypes\"/>."
-msgstr ""
+msgid "We'll talk more about this unique and powerful feature in <xref linkend=\"deploymenttypes\"/>."
+msgstr "Iremos falar mais sobre essa única e poderosa funcionalidade em <xref linkend=\"deploymenttypes\"/>."
#. Tag: title
#: intro.xml:246
#, no-c-format
msgid "Scope"
-msgstr ""
+msgstr "Escopo"
#. Tag: para
#: intro.xml:248
#, no-c-format
-msgid ""
-"The <emphasis>scope</emphasis> defines the lifecycle and visibility of "
-"instances of the Web Bean. The Web Beans context model is extensible, "
-"accommodating arbitrary scopes. However, certain important scopes are built-"
-"in to the specification, and provided by the Web Bean manager. A scope is "
-"represented by an annotation type."
+msgid "The <emphasis>scope</emphasis> defines the lifecycle and visibility of instances of the Web Bean. The Web Beans context model is extensible, accommodating arbitrary scopes. However, certain important scopes are built-in to the specification, and provided by the Web Bean manager. A scope is represented by an annotation type."
msgstr ""
#. Tag: para
#: intro.xml:254
#, no-c-format
-msgid ""
-"For example, any web application may have <emphasis>session scoped</"
-"emphasis> Web Beans:"
-msgstr ""
+msgid "For example, any web application may have <emphasis>session scoped</emphasis> Web Beans:"
+msgstr "Por exemplo, qualquer aplicação web pode ter Web Beans com <emphasis>escopo de sessão (session scoped)</emphasis>:"
#. Tag: programlisting
#: intro.xml:257
@@ -600,43 +504,37 @@
"<![CDATA[@SessionScoped\n"
"public class ShoppingCart { ... }]]>"
msgstr ""
+"<![CDATA[@SessionScoped\n"
+"public class ShoppingCart { ... }]]>"
#. Tag: para
#: intro.xml:259
#, no-c-format
-msgid ""
-"An instance of a session scoped Web Bean is bound to a user session and is "
-"shared by all requests that execute in the context of that session."
+msgid "An instance of a session scoped Web Bean is bound to a user session and is shared by all requests that execute in the context of that session."
msgstr ""
#. Tag: para
#: intro.xml:262
#, no-c-format
-msgid ""
-"By default, Web Beans belong to a special scope called the "
-"<emphasis>dependent pseudo-scope</emphasis>. Web Beans with this scope are "
-"pure dependent objects of the object into which they are injected, and their "
-"lifecycle is bound to the lifecycle of that object."
-msgstr ""
+msgid "By default, Web Beans belong to a special scope called the <emphasis>dependent pseudo-scope</emphasis>. Web Beans with this scope are pure dependent objects of the object into which they are injected, and their lifecycle is bound to the lifecycle of that object."
+msgstr "Por padrão, os Web Beans pertencem a um escopo especial chamado de <emphasis>dependent pseudo-scope</emphasis>. Web Beans com este escopo são objetos puramente dependentes do objeto em que são injetados, e seu ciclo de vida está atrelado ao ciclo de vida desse objeto."
#. Tag: para
#: intro.xml:267
#, no-c-format
msgid "We'll talk more about scopes in <xref linkend=\"scopescontexts\"/>."
-msgstr ""
+msgstr "Falaremos mais sobre escopos em <xref linkend=\"scopescontexts\"/>."
#. Tag: title
#: intro.xml:272
#, no-c-format
msgid "Web Bean names and Unified EL"
-msgstr ""
+msgstr "Nomes Web Beans e Unified EL"
#. Tag: para
#: intro.xml:274
#, no-c-format
-msgid ""
-"A Web Bean may have a <emphasis>name</emphasis>, allowing it to be used in "
-"Unified EL expressions. It's easy to specify the name of a Web Bean:"
+msgid "A Web Bean may have a <emphasis>name</emphasis>, allowing it to be used in Unified EL expressions. It's easy to specify the name of a Web Bean:"
msgstr ""
#. Tag: programlisting
@@ -646,12 +544,14 @@
"<![CDATA[@SessionScoped @Named(\"cart\")\n"
"public class ShoppingCart { ... }]]>"
msgstr ""
+"<![CDATA[@SessionScoped @Named(\"cart\")\n"
+"public class ShoppingCart { ... }]]>"
#. Tag: para
#: intro.xml:280
#, no-c-format
msgid "Now we can easily use the Web Bean in any JSF or JSP page:"
-msgstr ""
+msgstr "Agora podemos facilmente utilizar o Web Bean em qualquer página JSF ou JSP:"
#. Tag: programlisting
#: intro.xml:282
@@ -661,12 +561,14 @@
" ....\n"
"</h:dataTable>]]>"
msgstr ""
+"<![CDATA[<h:dataTable value=\"#{cart.lineItems}\" var=\"item\">\n"
+" ....\n"
+"</h:dataTable>]]>"
#. Tag: para
#: intro.xml:284
#, no-c-format
-msgid ""
-"It's even easier to just let the name be defaulted by the Web Bean manager:"
+msgid "It's even easier to just let the name be defaulted by the Web Bean manager:"
msgstr ""
#. Tag: programlisting
@@ -676,37 +578,31 @@
"<![CDATA[@SessionScoped @Named\n"
"public class ShoppingCart { ... }]]>"
msgstr ""
+"<![CDATA[@SessionScoped @Named\n"
+"public class ShoppingCart { ... }]]>"
#. Tag: para
#: intro.xml:289
#, no-c-format
-msgid ""
-"In this case, the name defaults to <literal>shoppingCart</literal> — the "
-"unqualified class name, with the first character changed to lowercase."
-msgstr ""
+msgid "In this case, the name defaults to <literal>shoppingCart</literal> — the unqualified class name, with the first character changed to lowercase."
+msgstr "Neste caso, o nome padrão para <literal>shoppingCart</literal> — o nome da classe (unqualified class name), com o primeiro caractere alterado para minúsculas."
#. Tag: title
#: intro.xml:295
-#, no-c-format
+#, fuzzy, no-c-format
msgid "Interceptor binding types"
-msgstr ""
+msgstr "os tipos têm de corresponder\n"
#. Tag: para
#: intro.xml:297
#, no-c-format
-msgid ""
-"Web Beans supports the interceptor functionality defined by EJB 3, not only "
-"for EJB beans, but also for plain Java classes. In addition, Web Beans "
-"provides a new approach to binding interceptors to EJB beans and other Web "
-"Beans."
-msgstr ""
+msgid "Web Beans supports the interceptor functionality defined by EJB 3, not only for EJB beans, but also for plain Java classes. In addition, Web Beans provides a new approach to binding interceptors to EJB beans and other Web Beans."
+msgstr "Web Beans suporta a funcionalidade de interceptador (interceptor) definida pela EJB 3, não apenas para beans EJB , mas também para classes Java simples (plain Java classes). Além disso, a Web Beans oferece uma nova abordagem para vincular interceptores (binding interceptors) para beans EJB e outros Web Beans."
#. Tag: para
#: intro.xml:302
#, no-c-format
-msgid ""
-"It remains possible to directly specify the interceptor class via use of the "
-"<literal>@Interceptors</literal> annotation:"
+msgid "It remains possible to directly specify the interceptor class via use of the <literal>@Interceptors</literal> annotation:"
msgstr ""
#. Tag: programlisting
@@ -717,14 +613,15 @@
"@Interceptors(TransactionInterceptor.class)\n"
"public class ShoppingCart { ... }]]>"
msgstr ""
+"<![CDATA[@SessionScoped \n"
+"@Interceptors(TransactionInterceptor.class)\n"
+"public class ShoppingCart { ... }]]>"
#. Tag: para
#: intro.xml:307
#, no-c-format
-msgid ""
-"However, it is more elegant, and better practice, to indirect the "
-"interceptor binding through an <emphasis>interceptor binding type</emphasis>:"
-msgstr ""
+msgid "However, it is more elegant, and better practice, to indirect the interceptor binding through an <emphasis>interceptor binding type</emphasis>:"
+msgstr "No entanto, é mais elegante, e uma melhor prática, o interceptador "
#. Tag: programlisting
#: intro.xml:311
@@ -733,49 +630,43 @@
"<![CDATA[@SessionScoped @Transactional\n"
"public class ShoppingCart { ... }]]>"
msgstr ""
+"<![CDATA[@SessionScoped @Transactional\n"
+"public class ShoppingCart { ... }]]>"
#. Tag: para
#: intro.xml:313
#, no-c-format
-msgid ""
-"We'll discuss Web Beans interceptors and decorators in <xref linkend="
-"\"interceptors\"/> and <xref linkend=\"decorators\"/>."
+msgid "We'll discuss Web Beans interceptors and decorators in <xref linkend=\"interceptors\"/> and <xref linkend=\"decorators\"/>."
msgstr ""
#. Tag: title
#: intro.xml:321
#, no-c-format
msgid "What kinds of objects can be Web Beans?"
-msgstr ""
+msgstr "Que tipos de objetos podem ser Web Beans?"
#. Tag: para
#: intro.xml:323
#, no-c-format
-msgid ""
-"We've already seen that JavaBeans, EJBs and some other Java classes can be "
-"Web Beans. But exactly what kinds of objects are Web Beans?"
+msgid "We've already seen that JavaBeans, EJBs and some other Java classes can be Web Beans. But exactly what kinds of objects are Web Beans?"
msgstr ""
#. Tag: title
#: intro.xml:327
#, no-c-format
msgid "Simple Web Beans"
-msgstr ""
+msgstr "Web Beans Simples"
#. Tag: para
#: intro.xml:329
#, no-c-format
-msgid ""
-"The Web Beans specification says that a concrete Java class is a "
-"<emphasis>simple</emphasis> Web Bean if:"
-msgstr ""
+msgid "The Web Beans specification says that a concrete Java class is a <emphasis>simple</emphasis> Web Bean if:"
+msgstr "A especificação de Web Beans diz que uma classe Java concreta é um Web Bean <emphasis>simples</emphasis> se:"
#. Tag: para
#: intro.xml:334
#, no-c-format
-msgid ""
-"it is not an EE container-managed component, like an EJB, a Servlet or a JPA "
-"entity,"
+msgid "it is not an EE container-managed component, like an EJB, a Servlet or a JPA entity,"
msgstr ""
#. Tag: para
@@ -786,70 +677,50 @@
#. Tag: para
#: intro.xml:341
-#, no-c-format
+#, fuzzy, no-c-format
msgid "it is not a parameterized type, and"
-msgstr ""
+msgstr "tipo do índice de uma matriz não pode ser %s porque ele não é uma matriz"
#. Tag: para
#: intro.xml:344
#, no-c-format
-msgid ""
-"it has a constructor with no parameters, or a constructor annotated "
-"<literal>@Initializer</literal>."
+msgid "it has a constructor with no parameters, or a constructor annotated <literal>@Initializer</literal>."
msgstr ""
#. Tag: para
#: intro.xml:349
#, no-c-format
msgid "Thus, almost every JavaBean is a simple Web Bean."
-msgstr ""
+msgstr "Assim, quase todo JavaBean é um Web Bean simples."
#. Tag: para
#: intro.xml:351
#, no-c-format
-msgid ""
-"Every interface implemented directly or indirectly by a simple Web Bean is "
-"an API type of the simple Web Bean. The class and its superclasses are also "
-"API types."
+msgid "Every interface implemented directly or indirectly by a simple Web Bean is an API type of the simple Web Bean. The class and its superclasses are also API types."
msgstr ""
#. Tag: title
#: intro.xml:358
#, no-c-format
msgid "Enterprise Web Beans"
-msgstr ""
+msgstr "Web Beans corporativos (Enterprise Web Beans)"
#. Tag: para
#: intro.xml:360
#, no-c-format
-msgid ""
-"The specification says that all EJB 3-style session and singleton beans are "
-"<emphasis>enterprise</emphasis> Web Beans. Message driven beans are not Web "
-"Beans — since they are not intended to be injected into other "
-"objects — but they can take advantage of most of the functionality of Web "
-"Beans, including dependency injection and interceptors."
+msgid "The specification says that all EJB 3-style session and singleton beans are <emphasis>enterprise</emphasis> Web Beans. Message driven beans are not Web Beans — since they are not intended to be injected into other objects — but they can take advantage of most of the functionality of Web Beans, including dependency injection and interceptors."
msgstr ""
#. Tag: para
#: intro.xml:366
#, no-c-format
-msgid ""
-"Every local interface of an enterprise Web Bean that does not have a "
-"wildcard type parameter or type variable, and every one of its "
-"superinterfaces, is an API type of the enterprise Web Bean. If the EJB bean "
-"has a bean class local view, the bean class, and every one of its "
-"superclasses, is also an API type."
+msgid "Every local interface of an enterprise Web Bean that does not have a wildcard type parameter or type variable, and every one of its superinterfaces, is an API type of the enterprise Web Bean. If the EJB bean has a bean class local view, the bean class, and every one of its superclasses, is also an API type."
msgstr ""
#. Tag: para
#: intro.xml:372
#, no-c-format
-msgid ""
-"Stateful session beans should declare a remove method with no parameters or "
-"a remove method annotated <literal>@Destructor</literal>. The Web Bean "
-"manager calls this method to destroy the stateful session bean instance at "
-"the end of its lifecycle. This method is called the <emphasis>destructor</"
-"emphasis> method of the enterprise Web Bean."
+msgid "Stateful session beans should declare a remove method with no parameters or a remove method annotated <literal>@Destructor</literal>. The Web Bean manager calls this method to destroy the stateful session bean instance at the end of its lifecycle. This method is called the <emphasis>destructor</emphasis> method of the enterprise Web Bean."
msgstr ""
#. Tag: programlisting
@@ -866,110 +737,92 @@
"\n"
"}]]>"
msgstr ""
+"<![CDATA[@Stateful @SessionScoped\n"
+"public class ShoppingCart {\n"
+"\n"
+" ...\n"
+" \n"
+" @Remove\n"
+" public void destroy() {}\n"
+"\n"
+"}]]>"
#. Tag: para
#: intro.xml:380
#, no-c-format
-msgid ""
-"So when should we use an enterprise Web Bean instead of a simple Web Bean? "
-"Well, whenever we need the advanced enterprise services offered by EJB, such "
-"as:"
-msgstr ""
+msgid "So when should we use an enterprise Web Bean instead of a simple Web Bean? Well, whenever we need the advanced enterprise services offered by EJB, such as:"
+msgstr "Então, quando deveremos usar Web Bean corporativo (enterprise) em vez de um simples Web Bean? Bem, sempre que tivermos a necessidade de serviços corporatvios (enterprise) avançados oferecidos pelo EJB, tais como:"
#. Tag: para
#: intro.xml:387
#, no-c-format
msgid "method-level transaction management and security,"
-msgstr ""
+msgstr "gerenciamento de transações e segurança em nível de método,"
#. Tag: para
#: intro.xml:390
#, no-c-format
msgid "concurrency management,"
-msgstr ""
+msgstr "gerenciamento de concorrência,"
#. Tag: para
#: intro.xml:393
#, no-c-format
-msgid ""
-"instance-level passivation for stateful session beans and instance-pooling "
-"for stateless session beans,"
+msgid "instance-level passivation for stateful session beans and instance-pooling for stateless session beans,"
msgstr ""
#. Tag: para
#: intro.xml:397
#, no-c-format
msgid "remote and web service invocation, and"
-msgstr ""
+msgstr "remoto e invocação de web service, e"
#. Tag: para
#: intro.xml:400
#, no-c-format
msgid "timers and asynchronous methods,"
-msgstr ""
+msgstr "temporizadores (timers) e métodos assíncronos"
#. Tag: para
#: intro.xml:404
#, no-c-format
-msgid ""
-"we should use an enterprise Web Bean. When we don't need any of these "
-"things, a simple Web Bean will serve just fine."
-msgstr ""
+msgid "we should use an enterprise Web Bean. When we don't need any of these things, a simple Web Bean will serve just fine."
+msgstr "devemos utilizar um Web Bean corporativo (enterprise). Quando não precisamos de nenhuma destas coisas, um Web Bean simples vai servir muito bem."
#. Tag: para
#: intro.xml:407
#, no-c-format
-msgid ""
-"Many Web Beans (including any session or application scoped Web Bean) are "
-"available for concurrent access. Therefore, the concurrency management "
-"provided by EJB 3.1 is especially useful. Most session and application "
-"scoped Web Beans should be EJBs."
-msgstr ""
+msgid "Many Web Beans (including any session or application scoped Web Bean) are available for concurrent access. Therefore, the concurrency management provided by EJB 3.1 is especially useful. Most session and application scoped Web Beans should be EJBs."
+msgstr "Muitos Web Beans (incluindo qualquer Web Bean em escopo de sessão ou de aplicação) estão disponíveis para acesso concorrente. Por isso, o gerenciamento de concorrência fornecida pelo EJB 3.1 é especialmente útil. A maioria dos Web Beans em escopo de sessão e aplicação devem ser EJBs."
#. Tag: para
#: intro.xml:412
#, no-c-format
-msgid ""
-"Web Beans which hold references to heavy-weight resources, or hold a lot of "
-"internal state benefit from the advanced container-managed lifecycle defined "
-"by the EJB <literal>@Stateless</literal>/<literal>@Stateful</literal>/"
-"<literal>@Singleton</literal> model, with its support for passivation and "
-"instance pooling."
+msgid "Web Beans which hold references to heavy-weight resources, or hold a lot of internal state benefit from the advanced container-managed lifecycle defined by the EJB <literal>@Stateless</literal>/<literal>@Stateful</literal>/<literal>@Singleton</literal> model, with its support for passivation and instance pooling."
msgstr ""
#. Tag: para
#: intro.xml:417
#, no-c-format
-msgid ""
-"Finally, it's usually obvious when method-level transaction management, "
-"method-level security, timers, remote methods or asynchronous methods are "
-"needed."
-msgstr ""
+msgid "Finally, it's usually obvious when method-level transaction management, method-level security, timers, remote methods or asynchronous methods are needed."
+msgstr "Por último, isso normalmente é óbvio quando gerenciamento de transações e segurança em nível de método, temporizadores, métodos remotos ou assíncronos são necessários."
#. Tag: para
#: intro.xml:420
#, no-c-format
-msgid ""
-"It's usually easy to start with simple Web Bean, and then turn it into an "
-"EJB, just by adding an annotation: <literal>@Stateless</literal>, "
-"<literal>@Stateful</literal> or <literal>@Singleton</literal>."
+msgid "It's usually easy to start with simple Web Bean, and then turn it into an EJB, just by adding an annotation: <literal>@Stateless</literal>, <literal>@Stateful</literal> or <literal>@Singleton</literal>."
msgstr ""
#. Tag: title
#: intro.xml:427
#, no-c-format
msgid "Producer methods"
-msgstr ""
+msgstr "Métodos produtores (producer methods)"
#. Tag: para
#: intro.xml:429
#, no-c-format
-msgid ""
-"A <emphasis>producer method</emphasis> is a method that is called by the Web "
-"Bean manager to obtain an instance of the Web Bean when no instance exists "
-"in the current context. A producer method lets the application take full "
-"control of the instantiation process, instead of leaving instantiation to "
-"the Web Bean manager. For example:"
+msgid "A <emphasis>producer method</emphasis> is a method that is called by the Web Bean manager to obtain an instance of the Web Bean when no instance exists in the current context. A producer method lets the application take full control of the instantiation process, instead of leaving instantiation to the Web Bean manager. For example:"
msgstr ""
#. Tag: programlisting
@@ -987,27 +840,33 @@
"\n"
"}]]>"
msgstr ""
+"<![CDATA[@ApplicationScoped\n"
+"public class Generator {\n"
+"\n"
+" private Random random = new Random( System.currentTimeMillis() );\n"
+" \n"
+" @Produces @Random int next() {\n"
+" return random.nextInt(100);\n"
+" }\n"
+"\n"
+"}]]>"
#. Tag: para
#: intro.xml:437
#, no-c-format
-msgid ""
-"The result of a producer method is injected just like any other Web Bean."
+msgid "The result of a producer method is injected just like any other Web Bean."
msgstr ""
#. Tag: programlisting
#: intro.xml:439
#, no-c-format
msgid "<![CDATA[@Random int randomNumber]]>"
-msgstr ""
+msgstr "<![CDATA[@Random int randomNumber]]>"
#. Tag: para
#: intro.xml:441
#, no-c-format
-msgid ""
-"The method return type and all interfaces it extends/implements directly or "
-"indirectly are API types of the producer method. If the return type is a "
-"class, all superclasses are also API types."
+msgid "The method return type and all interfaces it extends/implements directly or indirectly are API types of the producer method. If the return type is a class, all superclasses are also API types."
msgstr ""
#. Tag: para
@@ -1024,13 +883,14 @@
" return createConnection( user.getId(), user.getPassword() );\n"
"}]]>"
msgstr ""
+"<![CDATA[@Produces @RequestScoped Connection connect(User user) {\n"
+" return createConnection( user.getId(), user.getPassword() );\n"
+"}]]>"
#. Tag: para
#: intro.xml:449
#, no-c-format
-msgid ""
-"These producer methods may define matching <emphasis>disposal methods</"
-"emphasis>:"
+msgid "These producer methods may define matching <emphasis>disposal methods</emphasis>:"
msgstr ""
#. Tag: programlisting
@@ -1041,35 +901,31 @@
" connection.close();\n"
"}]]>"
msgstr ""
+"<![CDATA[void close(@Disposes Connection connection) {\n"
+" connection.close();\n"
+"}]]>"
#. Tag: para
#: intro.xml:453
#, no-c-format
-msgid ""
-"This disposal method is called automatically by the Web Bean manager at the "
-"end of the request."
+msgid "This disposal method is called automatically by the Web Bean manager at the end of the request."
msgstr ""
#. Tag: para
#: intro.xml:456
#, no-c-format
-msgid ""
-"We'll talk much more about producer methods in <xref linkend="
-"\"producermethods\"/>."
+msgid "We'll talk much more about producer methods in <xref linkend=\"producermethods\"/>."
msgstr ""
#. Tag: title
#: intro.xml:461
#, no-c-format
msgid "JMS endpoints"
-msgstr ""
+msgstr "JMS endpoints"
#. Tag: para
#: intro.xml:463
#, no-c-format
-msgid ""
-"Finally, a JMS queue or topic can be a Web Bean. Web Beans relieves the "
-"developer from the tedium of managing the lifecycles of all the various JMS "
-"objects required to send messages to queues and topics. We'll discuss JMS "
-"endpoints in <xref linkend=\"jms\"/>."
+msgid "Finally, a JMS queue or topic can be a Web Bean. Web Beans relieves the developer from the tedium of managing the lifecycles of all the various JMS objects required to send messages to queues and topics. We'll discuss JMS endpoints in <xref linkend=\"jms\"/>."
msgstr ""
+
Modified: doc/trunk/reference/pt-BR/master.po
===================================================================
--- doc/trunk/reference/pt-BR/master.po 2009-02-28 14:04:13 UTC (rev 1744)
+++ doc/trunk/reference/pt-BR/master.po 2009-03-01 00:42:05 UTC (rev 1745)
@@ -6,8 +6,8 @@
"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-02-07 18:51+0000\n"
-"PO-Revision-Date: 2009-01-06 11:30+0000\n"
-"Last-Translator: Automatically generated\n"
+"PO-Revision-Date: 2009-02-28 15:04-0300\n"
+"Last-Translator: João Paulo Viragine <joao.viragine(a)redhat.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -17,18 +17,12 @@
#: master.xml:10
#, no-c-format
msgid "Note"
-msgstr ""
+msgstr "Nota"
#. Tag: para
#: master.xml:11
#, no-c-format
-msgid ""
-"JSR-299 has recently changed its name from \"Web Beans\" to \"Java Contexts "
-"and Dependency Injection\". The reference guide still refers to JSR-299 as "
-"\"Web Beans\" and the JSR-299 Reference Implementation as the \"Web Beans RI"
-"\". Other documentation, blogs, forum posts etc. may use the new "
-"nomenclature, including the new name for the JSR-299 Reference "
-"Implementation - \"Web Beans\"."
+msgid "JSR-299 has recently changed its name from \"Web Beans\" to \"Java Contexts and Dependency Injection\". The reference guide still refers to JSR-299 as \"Web Beans\" and the JSR-299 Reference Implementation as the \"Web Beans RI\". Other documentation, blogs, forum posts etc. may use the new nomenclature, including the new name for the JSR-299 Reference Implementation - \"Web Beans\"."
msgstr ""
#. Tag: title
@@ -47,10 +41,11 @@
#: master.xml:47
#, no-c-format
msgid "Making the most of strong typing"
-msgstr ""
+msgstr "Obtendo o máximo da tipificação forte (strong typing)"
#. Tag: title
#: master.xml:58
#, no-c-format
msgid "Web Beans and the Java EE ecosystem"
msgstr ""
+
Modified: doc/trunk/reference/pt-BR/next.po
===================================================================
--- doc/trunk/reference/pt-BR/next.po 2009-02-28 14:04:13 UTC (rev 1744)
+++ doc/trunk/reference/pt-BR/next.po 2009-03-01 00:42:05 UTC (rev 1745)
@@ -6,8 +6,8 @@
"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-06 11:30+0000\n"
-"PO-Revision-Date: 2009-01-06 11:30+0000\n"
-"Last-Translator: Automatically generated\n"
+"PO-Revision-Date: 2009-02-28 15:07-0300\n"
+"Last-Translator: João Paulo Viragine <joao.viragine(a)redhat.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -17,33 +17,23 @@
#: next.xml:4
#, no-c-format
msgid "Next steps"
-msgstr ""
+msgstr "Próximos passos"
#. Tag: para
#: next.xml:6
#, no-c-format
-msgid ""
-"Because Web Beans is so new, there's not yet a lot of information available "
-"online."
-msgstr ""
+msgid "Because Web Beans is so new, there's not yet a lot of information available online."
+msgstr "Porque a Web Beans é muito nova, ainda não existe muita informação disponível online."
#. Tag: para
#: next.xml:9
#, no-c-format
-msgid ""
-"Of course, the Web Beans specification is the best source of more "
-"information about Web Beans. The spec is about 100 pages long, only twice "
-"the length of this article, and almost as readable. But, of course, it "
-"covers many details that we've skipped over. The spec is available from "
-"<literal>http://jcp.org/en/jsr/detail?id=299</literal>."
-msgstr ""
+msgid "Of course, the Web Beans specification is the best source of more information about Web Beans. The spec is about 100 pages long, only twice the length of this article, and almost as readable. But, of course, it covers many details that we've skipped over. The spec is available from <literal>http://jcp.org/en/jsr/detail?id=299</literal>."
+msgstr "Claro que a especificação de Web beans é a melhor fonte para mais informações sobre Web Beans. A especificação possui cerca de 100 páginas, duas vezes o tamanho desse artigo.Mas, evidentemente, que abrange muitas informações que não cubrimos. A especificação está disponível em <literal>http://jcp.org/en/jsr/detail?id=299</literal>."
#. Tag: para
#: next.xml:15
#, no-c-format
-msgid ""
-"The Web Beans Reference implementation is being developed at <literal>http://"
-"seamframework.org/WebBeans</literal>. The RI development team and the Web "
-"Beans spec lead blog at <literal>http://in.relation.to</literal>. This "
-"article is substantially based upon a series of blog entries published there."
-msgstr ""
+msgid "The Web Beans Reference implementation is being developed at <literal>http://seamframework.org/WebBeans</literal>. The RI development team and the Web Beans spec lead blog at <literal>http://in.relation.to</literal>. This article is substantially based upon a series of blog entries published there."
+msgstr "A implementação de referência de Web Beans (Web Beans RI) está sendo desenvolvida em <literal>http://seamframework.org/WebBeans</literal>. O blog do time de desenvolvimento da implementação de referência (RI) e do lider da especificação (Web Beans spec lead) em: <literal>http://in.relation.to</literal>. Esse artigo é substancialmente baseado em uma série de entradas de blog publicados lá."
+
Modified: doc/trunk/reference/pt-BR/part1.po
===================================================================
--- doc/trunk/reference/pt-BR/part1.po 2009-02-28 14:04:13 UTC (rev 1744)
+++ doc/trunk/reference/pt-BR/part1.po 2009-03-01 00:42:05 UTC (rev 1745)
@@ -6,8 +6,8 @@
"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-06 11:30+0000\n"
-"PO-Revision-Date: 2009-01-06 11:30+0000\n"
-"Last-Translator: Automatically generated\n"
+"PO-Revision-Date: 2009-02-28 15:10-0300\n"
+"Last-Translator: João Paulo Viragine <joao.viragine(a)redhat.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -16,214 +16,162 @@
#. Tag: para
#: part1.xml:5
#, no-c-format
-msgid ""
-"The Web Beans (JSR-299) specification defines a set of services for the Java "
-"EE environment that makes applications much easier to develop. Web Beans "
-"layers an enhanced lifecycle and interaction model over existing Java "
-"component types including JavaBeans and Enterprise Java Beans. As a "
-"complement to the traditional Java EE programming model, the Web Beans "
-"services provide:"
-msgstr ""
+msgid "The Web Beans (JSR-299) specification defines a set of services for the Java EE environment that makes applications much easier to develop. Web Beans layers an enhanced lifecycle and interaction model over existing Java component types including JavaBeans and Enterprise Java Beans. As a complement to the traditional Java EE programming model, the Web Beans services provide:"
+msgstr "A especificação Web Beans (JSR-299) define um conjunto de serviços para o ambiente Java EE que torna o desenvolvimento muito simples. Camadas Web Beans "
#. Tag: para
#: part1.xml:14
#, no-c-format
-msgid ""
-"an improved lifecycle for stateful components, bound to well-defined "
-"<emphasis>contexts</emphasis>,"
-msgstr ""
+msgid "an improved lifecycle for stateful components, bound to well-defined <emphasis>contexts</emphasis>,"
+msgstr "um ciclo de vida melhorado para componentes stateful, vinculados a <emphasis>contextos</emphasis> bem definidos"
#. Tag: para
#: part1.xml:18
#, no-c-format
msgid "a typesafe approach to <emphasis>dependency injection</emphasis>,"
-msgstr ""
+msgstr "uma apordagem typesafe para <emphasis>injeção de dependência</emphasis>,"
#. Tag: para
#: part1.xml:21
#, no-c-format
-msgid ""
-"interaction via an <emphasis>event notification</emphasis> facility, and"
-msgstr ""
+msgid "interaction via an <emphasis>event notification</emphasis> facility, and"
+msgstr "interação via <emphasis>notificação de eventos (event notification)</emphasis>, e"
#. Tag: para
#: part1.xml:25
#, no-c-format
-msgid ""
-"a better approach to binding <emphasis>interceptors</emphasis> to "
-"components, along with a new kind of interceptor, called a "
-"<emphasis>decorator</emphasis>, that is more appropriate for use in solving "
-"business problems."
-msgstr ""
+msgid "a better approach to binding <emphasis>interceptors</emphasis> to components, along with a new kind of interceptor, called a <emphasis>decorator</emphasis>, that is more appropriate for use in solving business problems."
+msgstr "uma melhor abordagem para associar <emphasis>interceptadores (interceptors)</emphasis> para componentes, juntamente com um novo tipo de interceptador (interceptor), chamado de <emphasis>decorador (decorator)</emphasis>, que é mais adequado para utilização na resolução de problemas de negócio."
#. Tag: para
#: part1.xml:32
#, no-c-format
-msgid ""
-"Dependency injection, together with contextual lifecycle management, saves "
-"the user of an unfamiliar API from having to ask and answer the following "
-"questions:"
-msgstr ""
+msgid "Dependency injection, together with contextual lifecycle management, saves the user of an unfamiliar API from having to ask and answer the following questions:"
+msgstr "Injeção de dependências (Dependency injection), junto com o gerenciamento de estados contextual (contextual lifecycle management), livra o usuário de uma API desconhecida e ter de perguntar e reponders as seguintes questões:"
#. Tag: para
#: part1.xml:38
#, no-c-format
msgid "what is the lifecycle of this object?"
-msgstr ""
+msgstr "qual o ciclo de vida desse objeto?"
#. Tag: para
#: part1.xml:41
#, no-c-format
msgid "how many simultaneous clients can it have?"
-msgstr ""
+msgstr "quantos clientes simultâneos eu posso ter?"
#. Tag: para
#: part1.xml:44
#, no-c-format
msgid "is it multithreaded?"
-msgstr ""
+msgstr "é multithreaded?"
#. Tag: para
#: part1.xml:47
#, no-c-format
msgid "where can I get one from?"
-msgstr ""
+msgstr "onde posso obter um de?"
#. Tag: para
#: part1.xml:50
#, no-c-format
msgid "do I need to explicitly destroy it?"
-msgstr ""
+msgstr "eu preciso explicitamente destruí-lo?"
#. Tag: para
#: part1.xml:53
#, no-c-format
msgid "where should I keep my reference to it when I'm not using it directly?"
-msgstr ""
+msgstr "onde devo manter minha referência quando não estou usando-o diretamente?"
#. Tag: para
#: part1.xml:57
#, no-c-format
-msgid ""
-"how can I add an indirection layer, so that the implementation of this "
-"object can vary at deployment time?"
-msgstr ""
+msgid "how can I add an indirection layer, so that the implementation of this object can vary at deployment time?"
+msgstr "como posso adicionar uma camada de indireção (indirection layer), de modo que a implementação desse objeto possa variar em tempo de publicação (deployment time)?"
#. Tag: para
#: part1.xml:61
#, no-c-format
msgid "how should I go about sharing this object between other objects?"
-msgstr ""
+msgstr "como compartilhar esse objeto entre outros objetos?"
#. Tag: para
#: part1.xml:65
#, no-c-format
-msgid ""
-"A Web Bean specifies only the type and semantics of other Web Beans it "
-"depends upon. It need not be aware of the actual lifecycle, concrete "
-"implementation, threading model or other clients of any Web Bean it depends "
-"upon. Even better, the concrete implementation, lifecycle and threading "
-"model of a Web Bean it depends upon may vary according to the deployment "
-"scenario, without affecting any client."
-msgstr ""
+msgid "A Web Bean specifies only the type and semantics of other Web Beans it depends upon. It need not be aware of the actual lifecycle, concrete implementation, threading model or other clients of any Web Bean it depends upon. Even better, the concrete implementation, lifecycle and threading model of a Web Bean it depends upon may vary according to the deployment scenario, without affecting any client."
+msgstr "Um Web Bean apenas especifica o tipo e a semântica de outros Web Beans que ele depende. Ele não precisa estar consciente do próprio ciclo de vida, implementação concreta, modelo de threading ou outros clientes de qualquer Web Bean que ele dependa. Ainda melhor, a implementação concreta, ciclo de vida e o modelo de threading do Web Bean que ele depende pode variar de acordo com o cenário de deployment, sem afetar qualquer cliente."
#. Tag: para
#: part1.xml:72
#, no-c-format
-msgid ""
-"Events, interceptors and decorators enhance the <emphasis>loose-coupling</"
-"emphasis> that is inherent in this model:"
-msgstr ""
+msgid "Events, interceptors and decorators enhance the <emphasis>loose-coupling</emphasis> that is inherent in this model:"
+msgstr "Eventos, interceptadores e decoradores XXX o <emphasis>fraco acoplamento</emphasis> que é XXX nesse modelo:"
#. Tag: para
#: part1.xml:77
#, no-c-format
-msgid ""
-"<emphasis>event notifications</emphasis> decouple event producers from event "
-"consumers,"
-msgstr ""
+msgid "<emphasis>event notifications</emphasis> decouple event producers from event consumers,"
+msgstr "<emphasis>notificadores de eventos</emphasis> desacoplam os produtores de eventos dos consumidores dos eventos,"
#. Tag: para
#: part1.xml:81
#, no-c-format
-msgid ""
-"<emphasis>interceptors</emphasis> decouple technical concerns from business "
-"logic, and"
-msgstr ""
+msgid "<emphasis>interceptors</emphasis> decouple technical concerns from business logic, and"
+msgstr "<emphasis>interceptadores (interceptors)</emphasis> desacoplam (decouple) preocupações técnicas (technical concerns) da lógica de negócios (business logic), e"
#. Tag: para
#: part1.xml:85
#, no-c-format
-msgid ""
-"<emphasis>decorators</emphasis> allow business concerns to be "
-"compartmentalized."
-msgstr ""
+msgid "<emphasis>decorators</emphasis> allow business concerns to be compartmentalized."
+msgstr "<emphasis>decoradores (decorators)</emphasis> permitem que preocupações de negócios (business concerns) sejam compartimentadas"
#. Tag: para
#: part1.xml:90
#, no-c-format
-msgid ""
-"Most importantly, Web Beans provides all these facilities in a "
-"<emphasis>typesafe</emphasis> way. Web Beans never uses string-based "
-"identifiers to determine how collaborating objects fit together. And XML, "
-"though it remains an option, is rarely used. Instead, Web Beans uses the "
-"typing information that is already available in the Java object model, "
-"together with a new pattern, called <emphasis>binding annotations</"
-"emphasis>, to wire together Web Beans, their dependencies, their "
-"interceptors and decorators and their event consumers."
-msgstr ""
+msgid "Most importantly, Web Beans provides all these facilities in a <emphasis>typesafe</emphasis> way. Web Beans never uses string-based identifiers to determine how collaborating objects fit together. And XML, though it remains an option, is rarely used. Instead, Web Beans uses the typing information that is already available in the Java object model, together with a new pattern, called <emphasis>binding annotations</emphasis>, to wire together Web Beans, their dependencies, their interceptors and decorators and their event consumers."
+msgstr "Mais importante, Web Beans oferece todas essas facilidades de uma maneira <emphasis>typesafe</emphasis>. Web Beans nunca utiliza identificadores baseados em strings para determinar o modo como objetos se relacionam. XML, continua a ser uma opção, mas raramente é utilizado. Em vez disso, a Web Beans utiliza a informação de tipo que já está disponível no modelo de objeto Java, juntamente com um novo padrão, chamado <emphasis>anotações de ligação (binding annotations)</emphasis>, para interconectar Web Beans, suas dependências, seus interceptadores (interceptors) e decoradores (decorators) e seus consumidores de eventos (event consumers)."
#. Tag: para
#: part1.xml:100
#, no-c-format
-msgid ""
-"The Web Beans services are general and apply to the following types of "
-"components that exist in the Java EE environment:"
-msgstr ""
+msgid "The Web Beans services are general and apply to the following types of components that exist in the Java EE environment:"
+msgstr "Os serviços do Web Beans são genéricos e aplicados aos seguintes tipo de componentes existentes no ambiente Java EE:"
#. Tag: para
#: part1.xml:105
#, no-c-format
msgid "all JavaBeans,"
-msgstr ""
+msgstr "todos JavaBeans,"
#. Tag: para
#: part1.xml:108
#, no-c-format
msgid "all EJBs, and"
-msgstr ""
+msgstr "todos EJBs, e"
#. Tag: para
#: part1.xml:111
#, no-c-format
msgid "all Servlets."
-msgstr ""
+msgstr "todos os Servlets."
#. Tag: para
#: part1.xml:115
#, no-c-format
-msgid ""
-"Web Beans even provides the necessary integration points so that other kinds "
-"of components defined by future Java EE specifications or by non-standard "
-"frameworks may be cleanly integrated with Web Beans, take advantage of the "
-"Web Beans services, and interact with any other kind of Web Bean."
-msgstr ""
+msgid "Web Beans even provides the necessary integration points so that other kinds of components defined by future Java EE specifications or by non-standard frameworks may be cleanly integrated with Web Beans, take advantage of the Web Beans services, and interact with any other kind of Web Bean."
+msgstr "Web Beans prevê ainda pontos de integração necessários para que outros tipos de componentes definidos pelas futuras especificações Java EE ou por frameworks não-padrão possam ser transparentemente integrados com a Web Beans, tirando proveito dos serviços da Web Beans, e interagindo com qualquer outro tipo de Web Bean."
#. Tag: para
#: part1.xml:120
#, no-c-format
-msgid ""
-"Web Beans was influenced by a number of existing Java frameworks, including "
-"Seam, Guice and Spring. However, Web Beans has its own very distinct "
-"character: more typesafe than Seam, more stateful and less XML-centric than "
-"Spring, more web and enterprise-application capable than Guice."
-msgstr ""
+msgid "Web Beans was influenced by a number of existing Java frameworks, including Seam, Guice and Spring. However, Web Beans has its own very distinct character: more typesafe than Seam, more stateful and less XML-centric than Spring, more web and enterprise-application capable than Guice."
+msgstr "Web Beans foi influênciado por inúmeros frameworks Java existentes, incluindo Seam, Guice e Spring. Entretanto, Web Beans tem suas características peculiares: mais typesafe que o Seam, mais stateful e mesmo centrado em XML (XML-centric) que o Spring, mais web e enterprise-aplication que o Guice."
#. Tag: para
#: part1.xml:125
#, no-c-format
-msgid ""
-"Most importantly, Web Beans is a JCP standard that integrates cleanly with "
-"Java EE, and with any Java SE environment where embeddable EJB Lite is "
-"available."
-msgstr ""
+msgid "Most importantly, Web Beans is a JCP standard that integrates cleanly with Java EE, and with any Java SE environment where embeddable EJB Lite is available."
+msgstr "Mais importante, Web Beans é um padrão do JCP que integra-se transparentemente com o Java EE, e com qualquer outro ambiente Java SE onde o EJB leve embutido (embeddable EJB Lite) está disponível."
+
Modified: doc/trunk/reference/pt-BR/part2.po
===================================================================
--- doc/trunk/reference/pt-BR/part2.po 2009-02-28 14:04:13 UTC (rev 1744)
+++ doc/trunk/reference/pt-BR/part2.po 2009-03-01 00:42:05 UTC (rev 1745)
@@ -6,8 +6,8 @@
"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-06 11:30+0000\n"
-"PO-Revision-Date: 2009-01-06 11:30+0000\n"
-"Last-Translator: Automatically generated\n"
+"PO-Revision-Date: 2009-02-28 15:06-0300\n"
+"Last-Translator: João Paulo Viragine <joao.viragine(a)redhat.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -16,87 +16,66 @@
#. Tag: para
#: part2.xml:5
#, no-c-format
-msgid ""
-"The first major theme of Web Beans is <emphasis>loose coupling</emphasis>. "
-"We've already seen three means of achieving loose coupling:"
-msgstr ""
+msgid "The first major theme of Web Beans is <emphasis>loose coupling</emphasis>. We've already seen three means of achieving loose coupling:"
+msgstr "O primeiro grande tema da Web Beans é <emphasis>fraco acoplamento (loose coupling)</emphasis>. Já vimos três meios de alcançar o fraco acoplamento (loose coupling):"
#. Tag: para
#: part2.xml:10
#, no-c-format
-msgid ""
-"<emphasis>deployment types</emphasis> enable deployment time polymorphism,"
-msgstr ""
+msgid "<emphasis>deployment types</emphasis> enable deployment time polymorphism,"
+msgstr "<emphasis>tipo de publicadores (deployment types)</emphasis> habilitam o polimorfismo em tempo de publicação (deployment time polymorphism),"
#. Tag: para
#: part2.xml:14
#, no-c-format
msgid "<emphasis>producer methods</emphasis> enable runtime polymorphism, and"
-msgstr ""
+msgstr "<emphasis>método produtores (producer methods)</emphasis> habilitam o polimorfismo em tempo de execução (runtime polymorphism), e"
#. Tag: para
#: part2.xml:18
#, no-c-format
-msgid ""
-"<emphasis>contextual lifecycle management</emphasis> decouples Web Bean "
-"lifecycles."
-msgstr ""
+msgid "<emphasis>contextual lifecycle management</emphasis> decouples Web Bean lifecycles."
+msgstr "<emphasis>gerenciamento de ciclo de vida contextual (contextual lifecycle management)</emphasis> desacopla o ciclo de vida do Web Bean."
#. Tag: para
#: part2.xml:23
#, no-c-format
-msgid ""
-"These techniques serve to enable loose coupling of client and server. The "
-"client is no longer tightly bound to an implementation of an API, nor is it "
-"required to manage the lifecycle of the server object. This approach lets "
-"<emphasis>stateful objects interact as if they were services</emphasis>."
-msgstr ""
+msgid "These techniques serve to enable loose coupling of client and server. The client is no longer tightly bound to an implementation of an API, nor is it required to manage the lifecycle of the server object. This approach lets <emphasis>stateful objects interact as if they were services</emphasis>."
+msgstr "Essas técnicas servem para habiliatr a fraco acoplamento (loose coupling) do cliente e do servidor. O cliente não está mais fortemente ligado (tightly bound) a um implementação de uma API, nem é obrigado a gerenciar o ciclo de vida do obejto servidor. Essa abordagem permite que <emphasis>stateful objects interajam como se fossem serviços</emphasis>."
#. Tag: para
#: part2.xml:28
#, no-c-format
-msgid ""
-"Loose coupling makes a system more <emphasis>dynamic</emphasis>. The system "
-"can respond to change in a well-defined manner. In the past, frameworks that "
-"attempted to provide the facilities listed above invariably did it by "
-"sacrificing type safety. Web Beans is the first technology that achieves "
-"this level of loose coupling in a typesafe way."
-msgstr ""
+msgid "Loose coupling makes a system more <emphasis>dynamic</emphasis>. The system can respond to change in a well-defined manner. In the past, frameworks that attempted to provide the facilities listed above invariably did it by sacrificing type safety. Web Beans is the first technology that achieves this level of loose coupling in a typesafe way."
+msgstr "O fraco acoplamento (loose coupling) torna o sistema mais <emphasis>dinâmico</emphasis>. O sistema pode responder a mudanças de uma maneira bem definida. No passado, frameworks que tentaram prover essas facilidades listadas acima invariavelmente acabaram sacrificando a (type safety). A Web Beans é a primeira tecnologia que alcança esse nível de baixo acoplamento (loose coupling) de uma meneira (typesafe)."
#. Tag: para
#: part2.xml:34
#, no-c-format
-msgid ""
-"Web Beans provides three extra important facilities that further the goal of "
-"loose coupling:"
-msgstr ""
+msgid "Web Beans provides three extra important facilities that further the goal of loose coupling:"
+msgstr "Web Beans provê três facilidades extras importantes que ultrapassam o objetivo do fraco acoplamento ( loose coupling):"
#. Tag: para
#: part2.xml:39
#, no-c-format
-msgid ""
-"<emphasis>interceptors</emphasis> decouple technical concerns from business "
-"logic,"
-msgstr ""
+msgid "<emphasis>interceptors</emphasis> decouple technical concerns from business logic,"
+msgstr "<emphasis>interceptadores</emphasis> desacompalm technical concerns from business logic,"
#. Tag: para
#: part2.xml:43
#, no-c-format
-msgid ""
-"<emphasis>decorators</emphasis> may be used to decouple some business "
-"concerns, and"
-msgstr ""
+msgid "<emphasis>decorators</emphasis> may be used to decouple some business concerns, and"
+msgstr "<emphasis>decoradores</emphasis> podem ser utilzados para desacoplar"
#. Tag: para
#: part2.xml:47
#, no-c-format
-msgid ""
-"<emphasis>event notifications</emphasis> decouple event producers from event "
-"consumers."
-msgstr ""
+msgid "<emphasis>event notifications</emphasis> decouple event producers from event consumers."
+msgstr "<emphasis>notificadores de eventos</emphasis> desacoplam os produtores de eventos dos consumidores de eventos."
#. Tag: para
#: part2.xml:52
#, no-c-format
msgid "Let's explore interceptors first."
-msgstr ""
+msgstr "Vamos primeiramente explorar os interceptadores (interceptors)"
+
Modified: doc/trunk/reference/pt-BR/part3.po
===================================================================
--- doc/trunk/reference/pt-BR/part3.po 2009-02-28 14:04:13 UTC (rev 1744)
+++ doc/trunk/reference/pt-BR/part3.po 2009-03-01 00:42:05 UTC (rev 1745)
@@ -6,8 +6,8 @@
"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-06 11:30+0000\n"
-"PO-Revision-Date: 2009-01-06 11:30+0000\n"
-"Last-Translator: Automatically generated\n"
+"PO-Revision-Date: 2009-02-28 15:08-0300\n"
+"Last-Translator: João Paulo Viragine <joao.viragine(a)redhat.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -16,135 +16,102 @@
#. Tag: para
#: part3.xml:5
#, no-c-format
-msgid ""
-"The second major theme of Web Beans is <emphasis>strong typing</emphasis>. "
-"The information about the dependencies, interceptors and decorators of a Web "
-"Bean, and the information about event consumers for an event producer, is "
-"contained in typesafe Java constructs that may be validated by the compiler."
+msgid "The second major theme of Web Beans is <emphasis>strong typing</emphasis>. The information about the dependencies, interceptors and decorators of a Web Bean, and the information about event consumers for an event producer, is contained in typesafe Java constructs that may be validated by the compiler."
msgstr ""
#. Tag: para
#: part3.xml:10
#, no-c-format
-msgid ""
-"You don't see string-based identifiers in Web Beans code, not because the "
-"framework is hiding them from you using clever defaulting rules — so-"
-"called \"configuration by convention\" — but because there are simply no "
-"strings there to begin with!"
+msgid "You don't see string-based identifiers in Web Beans code, not because the framework is hiding them from you using clever defaulting rules — so-called \"configuration by convention\" — but because there are simply no strings there to begin with!"
msgstr ""
#. Tag: para
#: part3.xml:15
#, no-c-format
-msgid ""
-"The obvious benefit of this approach is that <emphasis>any</emphasis> IDE "
-"can provide autocompletion, validation and refactoring without the need for "
-"special tooling. But there is a second, less-immediately-obvious, benefit. "
-"It turns out that when you start thinking of identifying objects, events or "
-"interceptors via annotations instead of names, you have an opportunity to "
-"lift the semantic level of your code."
+msgid "The obvious benefit of this approach is that <emphasis>any</emphasis> IDE can provide autocompletion, validation and refactoring without the need for special tooling. But there is a second, less-immediately-obvious, benefit. It turns out that when you start thinking of identifying objects, events or interceptors via annotations instead of names, you have an opportunity to lift the semantic level of your code."
msgstr ""
#. Tag: para
#: part3.xml:21
#, no-c-format
-msgid ""
-"Web Beans encourages you develop annotations that model concepts, for "
-"example,"
-msgstr ""
+msgid "Web Beans encourages you develop annotations that model concepts, for example,"
+msgstr "Web Beans incentiva você desenvolver anotações que modelam conceitos, por exemplo,"
#. Tag: para
#: part3.xml:26
#, no-c-format
msgid "<literal>@Asynchronous</literal>,"
-msgstr ""
+msgstr "<literal>@Asynchronous</literal>,"
#. Tag: para
#: part3.xml:29
#, no-c-format
msgid "<literal>@Mock</literal>,"
-msgstr ""
+msgstr "<literal>@Mock</literal>,"
#. Tag: para
#: part3.xml:32
#, no-c-format
msgid "<literal>@Secure</literal> or"
-msgstr ""
+msgstr "<literal>@Secure</literal> or"
#. Tag: para
#: part3.xml:35
#, no-c-format
msgid "<literal>@Updated</literal>,"
-msgstr ""
+msgstr "<literal>@Updated</literal>,"
#. Tag: para
#: part3.xml:39
#, no-c-format
msgid "instead of using compound names like"
-msgstr ""
+msgstr "em vez de utilizar nomes compostos como"
#. Tag: para
#: part3.xml:43
#, no-c-format
msgid "<literal>asyncPaymentProcessor</literal>,"
-msgstr ""
+msgstr "<literal>asyncPaymentProcessor</literal>,"
#. Tag: para
#: part3.xml:46
#, no-c-format
msgid "<literal>mockPaymentProcessor</literal>,"
-msgstr ""
+msgstr "<literal>mockPaymentProcessor</literal>,"
#. Tag: para
#: part3.xml:49
#, no-c-format
msgid "<literal>SecurityInterceptor</literal> or"
-msgstr ""
+msgstr "<literal>SecurityInterceptor</literal> or"
#. Tag: para
#: part3.xml:52
#, no-c-format
msgid "<literal>DocumentUpdatedEvent</literal>."
-msgstr ""
+msgstr "<literal>DocumentUpdatedEvent</literal>."
#. Tag: para
#: part3.xml:56
#, no-c-format
-msgid ""
-"The annotations are reusable. They help describe common qualities of "
-"disparate parts of the system. They help us categorize and understand our "
-"code. They help us deal with common concerns in a common way. They make our "
-"code more literate and more understandable."
+msgid "The annotations are reusable. They help describe common qualities of disparate parts of the system. They help us categorize and understand our code. They help us deal with common concerns in a common way. They make our code more literate and more understandable."
msgstr ""
#. Tag: para
#: part3.xml:61
#, no-c-format
-msgid ""
-"Web Beans <emphasis>stereotypes</emphasis> take this idea a step further. A "
-"stereotype models a common <emphasis>role</emphasis> in your application "
-"architecture. It encapsulates various properties of the role, including "
-"scope, interceptor bindings, deployment type, etc, into a single reusable "
-"package."
+msgid "Web Beans <emphasis>stereotypes</emphasis> take this idea a step further. A stereotype models a common <emphasis>role</emphasis> in your application architecture. It encapsulates various properties of the role, including scope, interceptor bindings, deployment type, etc, into a single reusable package."
msgstr ""
#. Tag: para
#: part3.xml:66
#, no-c-format
-msgid ""
-"Even Web Beans XML metadata is strongly typed! There's no compiler for XML, "
-"so Web Beans takes advantage of XML schemas to validate the Java types and "
-"attributes that appear in XML. This approach turns out to make the XML more "
-"literate, just like annotations made our Java code more literate."
-msgstr ""
+msgid "Even Web Beans XML metadata is strongly typed! There's no compiler for XML, so Web Beans takes advantage of XML schemas to validate the Java types and attributes that appear in XML. This approach turns out to make the XML more literate, just like annotations made our Java code more literate."
+msgstr "Mesmo os metadados da Web Beans é fortemente tipado (strongly typed)! Não há um compilador para XML, então a Web Beans tira proveito de esquemas XML (XML schemas) para validar os tipos Java e os atributos que aparecem em XML. Esta abordagem acaba por tornar o XML mais legível, assim como anotações deixam nosso código Java mais legível."
#. Tag: para
#: part3.xml:71
#, no-c-format
-msgid ""
-"We're now ready to meet some more advanced features of Web Beans. Bear in "
-"mind that these features exist to make our code both easier to validate and "
-"more understandable. Most of the time you don't ever really <emphasis>need</"
-"emphasis> to use these features, but if you use them wisely, you'll come to "
-"appreciate their power."
-msgstr ""
+msgid "We're now ready to meet some more advanced features of Web Beans. Bear in mind that these features exist to make our code both easier to validate and more understandable. Most of the time you don't ever really <emphasis>need</emphasis> to use these features, but if you use them wisely, you'll come to appreciate their power."
+msgstr "Nós agora estamos prontos para verificar mais algumas funcionalidades avançadas da Web Beans. Tenha em mente que essas funcionalidades existema para tornar nosso código fácil para validar e ao mesmo tempo mais facil de entender. Na maioria das vezes você nem <emphasis>precisa</emphasis> se preocupar em utilizar essas funcionalidades, mas se são fáceis de usar, você irá apreciar seu poder."
+
Modified: doc/trunk/reference/pt-BR/part4.po
===================================================================
--- doc/trunk/reference/pt-BR/part4.po 2009-02-28 14:04:13 UTC (rev 1744)
+++ doc/trunk/reference/pt-BR/part4.po 2009-03-01 00:42:05 UTC (rev 1745)
@@ -6,8 +6,8 @@
"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-06 11:30+0000\n"
-"PO-Revision-Date: 2009-01-06 11:30+0000\n"
-"Last-Translator: Automatically generated\n"
+"PO-Revision-Date: 2009-02-28 15:09-0300\n"
+"Last-Translator: João Paulo Viragine <joao.viragine(a)redhat.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -16,37 +16,18 @@
#. Tag: para
#: part4.xml:5
#, no-c-format
-msgid ""
-"The third theme of Web Beans is <emphasis>integration</emphasis>. Web Beans "
-"was designed to work in concert with other technologies, helping the "
-"application developer fit the other technologies together. Web Beans is an "
-"open technology. It forms a part of the Java EE ecosystem, and is itself the "
-"foundation for a new ecosystem of portable extensions and integration with "
-"existing frameworks and technologies."
-msgstr ""
+msgid "The third theme of Web Beans is <emphasis>integration</emphasis>. Web Beans was designed to work in concert with other technologies, helping the application developer fit the other technologies together. Web Beans is an open technology. It forms a part of the Java EE ecosystem, and is itself the foundation for a new ecosystem of portable extensions and integration with existing frameworks and technologies."
+msgstr "A terceira motivação da Web Beans é <emphasis>integração</emphasis>. Web Beans foi projetada para trabalhar em conjunto com outras tecnologias, ajudando o desenvolvedor a trabalhar outras tecnologias em conjunto. Web Beans é uma tecnologia aberta. Ela faz parte do ecossistema Java EE, e é por si só a base para um novo ecossistema de extensões portáteis e integração com os frameworks e as tecnologias existentes."
#. Tag: para
#: part4.xml:12
#, no-c-format
-msgid ""
-"We've already seen how Web Beans helps integrate EJB and JSF, allowing EJBs "
-"to be bound directly to JSF pages. That's just the beginning. Web Beans "
-"offers the same potential to diverse other technologies, such as Business "
-"Process Management engines, other Web Frameworks, and third-party component "
-"models. The Java EE platform will never be able to standardize all the "
-"interesting technologies that are used in the world of Java application "
-"development, but Web Beans makes it easier to use the technologies which are "
-"not yet part of the platform seamlessly within the Java EE environment."
-msgstr ""
+msgid "We've already seen how Web Beans helps integrate EJB and JSF, allowing EJBs to be bound directly to JSF pages. That's just the beginning. Web Beans offers the same potential to diverse other technologies, such as Business Process Management engines, other Web Frameworks, and third-party component models. The Java EE platform will never be able to standardize all the interesting technologies that are used in the world of Java application development, but Web Beans makes it easier to use the technologies which are not yet part of the platform seamlessly within the Java EE environment."
+msgstr "Nós já temos visto como Web Beans ajuda a integrar EJB e JSF, permitindo EJBs serem vinculados diretamente à páginas JSF . Isso é só o começo. Web Beans oferece o mesmo potencial para diversas outras tecnologias, tais como engines de Business Process Management, outros Frameworks Web , e modelos de componentes de terceiros. A plataforma Java EE nunca será capaz de padronizar todas as tecnologias interessantes que são utilizadas no mundo de desenvolvimento de aplicações Java , mas Web Beans facilita a utilização das tecnologias que ainda não fazem parte da plataforma suavemente dentro do ambiente Java EE. "
#. Tag: para
#: part4.xml:21
#, no-c-format
-msgid ""
-"We're about to see how to take full advantage of the Java EE platform in an "
-"application that uses Web Beans. We'll also briefly meet a set of SPIs that "
-"are provided to support portable extensions to Web Beans. You might not ever "
-"need to use these SPIs directly, but it's nice to know they are there if you "
-"need them. Most importantly, you'll take advantage of them indirectly, every "
-"time you use a third-party extension."
-msgstr ""
+msgid "We're about to see how to take full advantage of the Java EE platform in an application that uses Web Beans. We'll also briefly meet a set of SPIs that are provided to support portable extensions to Web Beans. You might not ever need to use these SPIs directly, but it's nice to know they are there if you need them. Most importantly, you'll take advantage of them indirectly, every time you use a third-party extension."
+msgstr "Estamos prestes a ver como tirar o máximo de proveito da plataforma Java EE em uma aplicação que usa Web Beans. Iremos também brevemente reunir um conjunto de SPIs que são fornecidas para suportar extensões portáteis para Web Beans. Talvez você nunca precisará usar estas SPIs diretamente, mas é bom saber que estão lá se você precisar deles. Mais importante, você irá se aproveitar delas indiretamente, toda vez que você utilizar uma extensão de terceiros."
+
Modified: doc/trunk/reference/pt-BR/producermethods.po
===================================================================
--- doc/trunk/reference/pt-BR/producermethods.po 2009-02-28 14:04:13 UTC (rev 1744)
+++ doc/trunk/reference/pt-BR/producermethods.po 2009-03-01 00:42:05 UTC (rev 1745)
@@ -6,8 +6,8 @@
"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-06 11:30+0000\n"
-"PO-Revision-Date: 2009-01-06 11:30+0000\n"
-"Last-Translator: Automatically generated\n"
+"PO-Revision-Date: 2009-02-28 15:05-0300\n"
+"Last-Translator: João Paulo Viragine <joao.viragine(a)redhat.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -17,48 +17,25 @@
#: producermethods.xml:5
#, no-c-format
msgid "Producer methods"
-msgstr ""
+msgstr "Métodos produtores (producer methods)"
#. Tag: para
#: producermethods.xml:7
#, no-c-format
-msgid ""
-"Producer methods let us overcome certain limitations that arise when the Web "
-"Bean manager, instead of the application, is responsible for instantiating "
-"objects. They're also the easiest way to integrate objects which are not Web "
-"Beans into the Web Beans environment. (We'll meet a second approach in <xref "
-"linkend=\"xml\"/>.)"
-msgstr ""
+msgid "Producer methods let us overcome certain limitations that arise when the Web Bean manager, instead of the application, is responsible for instantiating objects. They're also the easiest way to integrate objects which are not Web Beans into the Web Beans environment. (We'll meet a second approach in <xref linkend=\"xml\"/>.)"
+msgstr "Métodos produtores (producer methods) permite superarmos certas limitações que surgem quando o gerenciador do Web Bean, em vez da aplicação, é responsável por instanciar objetos. Eles são também a forma mais fácil de integrar os objetos que não são Web Beans para o ambiente Web Beans. (Vamos ver uma segunda abordagem em <xref linkend=\"xml\"/>.)"
#. Tag: para
#: producermethods.xml:12
#, no-c-format
msgid "According to the spec:"
-msgstr ""
+msgstr "De acordo com a especificação:"
#. Tag: chapter
#: producermethods.xml:12
#, no-c-format
msgid ""
-"<blockquote> <para>A Web Beans producer method acts as a source of objects "
-"to be injected, where:</para> <itemizedlist> <listitem> <para>the objects to "
-"be injected are not required to be instances of Web Beans,</para> </"
-"listitem> <listitem> <para>the concrete type of the objects to be injected "
-"may vary at runtime or</para> </listitem> <listitem> <para>the objects "
-"require some custom initialization that is not performed by the Web Bean "
-"constructor</para> </listitem> </itemizedlist> </blockquote> <para>For "
-"example, producer methods let us:</para> <itemizedlist> <listitem> "
-"<para>expose a JPA entity as a Web Bean,</para> </listitem> <listitem> "
-"<para>expose any JDK class as a Web Bean,</para> </listitem> <listitem> "
-"<para>define multiple Web Beans, with different scopes or initialization, "
-"for the same implementation class, or</para> </listitem> <listitem> "
-"<para>vary the implementation of an API type at runtime.</para> </listitem> "
-"</itemizedlist> <para>In particular, producer methods let us use runtime "
-"polymorphism with Web Beans. As we've seen, deployment types are a powerful "
-"solution to the problem of deployment-time polymorphism. But once the system "
-"is deployed, the Web Bean implementation is fixed. A producer method has no "
-"such limitation:</para> <programlisting role=\"JAVA\"><![CDATA"
-"[@SessionScoped\n"
+"<blockquote> <para>A Web Beans producer method acts as a source of objects to be injected, where:</para> <itemizedlist> <listitem> <para>the objects to be injected are not required to be instances of Web Beans,</para> </listitem> <listitem> <para>the concrete type of the objects to be injected may vary at runtime or</para> </listitem> <listitem> <para>the objects require some custom initialization that is not performed by the Web Bean constructor</para> </listitem> </itemizedlist> </blockquote> <para>For example, producer methods let us:</para> <itemizedlist> <listitem> <para>expose a JPA entity as a Web Bean,</para> </listitem> <listitem> <para>expose any JDK class as a Web Bean,</para> </listitem> <listitem> <para>define multiple Web Beans, with different scopes or initialization, for the same implementation class, or</para> </listitem> <listitem> <para>vary the implementation of an API type at runtime.</para> </listitem> </itemizedlist> <para>In particular, producer met!
hods let us use runtime polymorphism with Web Beans. As we've seen, deployment types are a powerful solution to the problem of deployment-time polymorphism. But once the system is deployed, the Web Bean implementation is fixed. A producer method has no such limitation:</para> <programlisting role=\"JAVA\"><![CDATA[@SessionScoped\n"
"public class Preferences {\n"
" \n"
" private PaymentStrategyType paymentStrategy;\n"
@@ -75,39 +52,26 @@
" } \n"
" }\n"
" \n"
-"}]]></programlisting> <para>Consider an injection point:</para> "
-"<programlisting role=\"JAVA\"><![CDATA[@Preferred PaymentStrategy "
-"paymentStrat;]]></programlisting> <para>This injection point has the same "
-"type and binding annotations as the producer method, so it resolves to the "
-"producer method using the usual Web Beans injection rules. The producer "
-"method will be called by the Web Bean manager to obtain an instance to "
-"service this injection point.</para>."
+"}]]></programlisting> <para>Consider an injection point:</para> <programlisting role=\"JAVA\"><![CDATA[@Preferred PaymentStrategy paymentStrat;]]></programlisting> <para>This injection point has the same type and binding annotations as the producer method, so it resolves to the producer method using the usual Web Beans injection rules. The producer method will be called by the Web Bean manager to obtain an instance to service this injection point.</para>."
msgstr ""
#. Tag: title
#: producermethods.xml:68
#, no-c-format
msgid "Scope of a producer method"
-msgstr ""
+msgstr "Escopo de um método produtor (producer methods)"
#. Tag: para
#: producermethods.xml:70
#, no-c-format
-msgid ""
-"The scope of the producer method defaults to <literal>@Dependent</literal>, "
-"and so it will be called <emphasis>every time</emphasis> the Web Bean "
-"manager injects this field or any other field that resolves to the same "
-"producer method. Thus, there could be multiple instances of the "
-"<literal>PaymentStrategy</literal> object for each user session."
-msgstr ""
+msgid "The scope of the producer method defaults to <literal>@Dependent</literal>, and so it will be called <emphasis>every time</emphasis> the Web Bean manager injects this field or any other field that resolves to the same producer method. Thus, there could be multiple instances of the <literal>PaymentStrategy</literal> object for each user session."
+msgstr "O escopo padrão dos métodos produtores (producer method ) é <literal>@Dependent</literal>, e, por isso, vão ser chamados <emphasis>toda vez</emphasis> que o gerenciador do Web Bean injetar esse atributo ou qualquer outro atributo que resolve para o mesmo método produtor (producer method). Assim, poderia haver várias instâncias do objeto <literal>PaymentStrategy</literal> para cada sessão do usuário."
#. Tag: para
#: producermethods.xml:75
#, no-c-format
-msgid ""
-"To change this behavior, we can add a <literal>@SessionScoped</literal> "
-"annotation to the method."
-msgstr ""
+msgid "To change this behavior, we can add a <literal>@SessionScoped</literal> annotation to the method."
+msgstr "Para mudar esse comportamento, nós podemos adicionar a anotação <literal>@SessionScoped</literal> ao método."
#. Tag: programlisting
#: producermethods.xml:78
@@ -118,40 +82,34 @@
" ...\n"
"}]]>"
msgstr ""
+"<![CDATA[@Produces @Preferred @SessionScoped\n"
+"public PaymentStrategy getPaymentStrategy() {\n"
+" ...\n"
+"}]]>"
#. Tag: para
#: producermethods.xml:80
#, no-c-format
-msgid ""
-"Now, when the producer method is called, the returned "
-"<literal>PaymentStrategy</literal> will be bound to the session context. The "
-"producer method won't be called again in the same session."
-msgstr ""
+msgid "Now, when the producer method is called, the returned <literal>PaymentStrategy</literal> will be bound to the session context. The producer method won't be called again in the same session."
+msgstr "Agora, quando o método produtor (producer method) é chamado, o <literal>PaymentStrategy</literal> retornado será vinculado (bound) ao contexto sessão. O método produtor (producer method) não será invocado novamente na mesma sessão."
#. Tag: title
#: producermethods.xml:87
#, no-c-format
msgid "Injection into producer methods"
-msgstr ""
+msgstr "Injeção em métodos produtores (producer methods)"
#. Tag: para
#: producermethods.xml:89
#, no-c-format
-msgid ""
-"There's one potential problem with the code above. The implementations of "
-"<literal>CreditCardPaymentStrategy</literal> are instantiated using the Java "
-"<literal>new</literal> operator. Objects instantiated directly by the "
-"application can't take advantage of dependency injection and don't have "
-"interceptors."
-msgstr ""
+msgid "There's one potential problem with the code above. The implementations of <literal>CreditCardPaymentStrategy</literal> are instantiated using the Java <literal>new</literal> operator. Objects instantiated directly by the application can't take advantage of dependency injection and don't have interceptors."
+msgstr "Existe um problema potencial com o código acima. As implementações de <literal>CreditCardPaymentStrategy</literal> são instanciadas utilizando o operador de Java <literal>new</literal>.Objetos instanciados diretamente pela aplicação não usufruem da injeção de dependências e não possuem interceptadores (interceptors)."
#. Tag: para
#: producermethods.xml:94
#, no-c-format
-msgid ""
-"If this isn't what we want we can use dependency injection into the producer "
-"method to obtain Web Bean instances:"
-msgstr ""
+msgid "If this isn't what we want we can use dependency injection into the producer method to obtain Web Bean instances:"
+msgstr "Se isso não é o que queremos, podemos utilizar a injeção de dependências no método produtor (producer method) para obter instâncias do Web Bean:"
#. Tag: programlisting
#: producermethods.xml:97
@@ -169,62 +127,56 @@
" } \n"
"}]]>"
msgstr ""
+"<![CDATA[@Produces @Preferred @SessionScoped\n"
+"public PaymentStrategy getPaymentStrategy(CreditCardPaymentStrategy ccps,\n"
+" ChequePaymentStrategy cps,\n"
+" PayPalPaymentStrategy ppps) {\n"
+" switch (paymentStrategy) {\n"
+" case CREDIT_CARD: return ccps;\n"
+" case CHEQUE: return cps;\n"
+" case PAYPAL: return ppps;\n"
+" default: return null;\n"
+" } \n"
+"}]]>"
#. Tag: para
#: producermethods.xml:99
#, no-c-format
-msgid ""
-"Wait, what if <literal>CreditCardPaymentStrategy</literal> is a request "
-"scoped Web Bean? Then the producer method has the effect of \"promoting\" "
-"the current request scoped instance into session scope. This is almost "
-"certainly a bug! The request scoped object will be destroyed by the Web Bean "
-"manager before the session ends, but the reference to the object will be "
-"left \"hanging\" in the session scope. This error will <emphasis>not</"
-"emphasis> be detected by the Web Bean manager, so please take extra care "
-"when returning Web Bean instances from producer methods!"
-msgstr ""
+msgid "Wait, what if <literal>CreditCardPaymentStrategy</literal> is a request scoped Web Bean? Then the producer method has the effect of \"promoting\" the current request scoped instance into session scope. This is almost certainly a bug! The request scoped object will be destroyed by the Web Bean manager before the session ends, but the reference to the object will be left \"hanging\" in the session scope. This error will <emphasis>not</emphasis> be detected by the Web Bean manager, so please take extra care when returning Web Bean instances from producer methods!"
+msgstr "Espere, o que se <literal>CreditCardPaymentStrategy</literal> é um Web Bean de escopo de request? Então o método produtor (producer method) tem o efeito de \"promover \" a instancia atual no escopo de request para o escopo de sessão. Isso é quase certamente um erro! O objeto no escopo de request será destruído pelo gerenciador do Web Bean antes de terminar a sessão, mas a referência ao objeto será deixada \"presa\" no escopo sessão. Este erro <emphasis>não</emphasis> será detectado pelo gerenciador do Web Bean, por isso, tome cuidado quando retornar instâncias de Web Bean de métodos produtores (producer methods)!"
#. Tag: para
#: producermethods.xml:107
#, no-c-format
-msgid ""
-"There's at least three ways we could go about fixing this bug. We could "
-"change the scope of the <literal>CreditCardPaymentStrategy</literal> "
-"implementation, but this would affect other clients of that Web Bean. A "
-"better option would be to change the scope of the producer method to "
-"<literal>@Dependent</literal> or <literal>@RequestScoped</literal>."
-msgstr ""
+msgid "There's at least three ways we could go about fixing this bug. We could change the scope of the <literal>CreditCardPaymentStrategy</literal> implementation, but this would affect other clients of that Web Bean. A better option would be to change the scope of the producer method to <literal>@Dependent</literal> or <literal>@RequestScoped</literal>."
+msgstr "Existe pelo menos três maneiras de corrigirmos esse bug. Podemos alterar o escopo da implementação do <literal>CreditCardPaymentStrategy</literal>, mas isso poderia afetar outros clientes desse Web Bean. A mehor opção seria alterar o escopo do médoto produtor (producer method) para <literal>@Dependent</literal> ou <literal>@RequestScoped</literal>."
#. Tag: para
#: producermethods.xml:113
#, no-c-format
-msgid ""
-"But a more common solution is to use the special <literal>@New</literal> "
-"binding annotation."
-msgstr ""
+msgid "But a more common solution is to use the special <literal>@New</literal> binding annotation."
+msgstr "Mas, uma solução mais comum é utilizar a anotação especial para ligação (binding annotation) <literal>@New</literal>"
#. Tag: title
#: producermethods.xml:119
#, no-c-format
msgid "Use of <literal>@New</literal> with producer methods"
-msgstr ""
+msgstr "Use do <literal>@New</literal> em métodos produtores (producer methods)"
#. Tag: para
#: producermethods.xml:121
#, no-c-format
msgid "Consider the following producer method:"
-msgstr ""
+msgstr "Considere o seguinte método produtor (producer methods):"
#. Tag: programlisting
#: producermethods.xml:123
#, no-c-format
msgid ""
"<![CDATA[@Produces @Preferred @SessionScoped\n"
-"public PaymentStrategy getPaymentStrategy(@New CreditCardPaymentStrategy "
-"ccps,\n"
+"public PaymentStrategy getPaymentStrategy(@New CreditCardPaymentStrategy ccps,\n"
" @New ChequePaymentStrategy cps,\n"
-" @New PayPalPaymentStrategy ppps) "
-"{\n"
+" @New PayPalPaymentStrategy ppps) {\n"
" switch (paymentStrategy) {\n"
" case CREDIT_CARD: return ccps;\n"
" case CHEQUE: return cps;\n"
@@ -233,15 +185,21 @@
" } \n"
"}]]>"
msgstr ""
+"<![CDATA[@Produces @Preferred @SessionScoped\n"
+"public PaymentStrategy getPaymentStrategy(@New CreditCardPaymentStrategy ccps,\n"
+" @New ChequePaymentStrategy cps,\n"
+" @New PayPalPaymentStrategy ppps) {\n"
+" switch (paymentStrategy) {\n"
+" case CREDIT_CARD: return ccps;\n"
+" case CHEQUE: return cps;\n"
+" case PAYPAL: return ppps;\n"
+" default: return null;\n"
+" } \n"
+"}]]>"
#. Tag: para
#: producermethods.xml:125
#, no-c-format
-msgid ""
-"Then a new <emphasis>dependent</emphasis> instance of "
-"<literal>CreditCardPaymentStrategy</literal> will be created, passed to the "
-"producer method, returned by the producer method and finally bound to the "
-"session context. The dependent object won't be destroyed until the "
-"<literal>Preferences</literal> object is destroyed, at the end of the "
-"session."
-msgstr ""
+msgid "Then a new <emphasis>dependent</emphasis> instance of <literal>CreditCardPaymentStrategy</literal> will be created, passed to the producer method, returned by the producer method and finally bound to the session context. The dependent object won't be destroyed until the <literal>Preferences</literal> object is destroyed, at the end of the session."
+msgstr "Assim a nova instancia <emphasis>dependente (dependent)</emphasis> de <literal>CreditCardPaymentStrategy</literal> será criada, passada para o método produtor (producer method), retornada pelo método produtor (producer method) e finalmente ligada (bound) ao contexto de sessão (session context). O objeto dependente não será destruído até que o objeto <literal>Preferences</literal> seja destruído, no término da sessão (session)."
+
Modified: doc/trunk/reference/pt-BR/ri-spi.po
===================================================================
--- doc/trunk/reference/pt-BR/ri-spi.po 2009-02-28 14:04:13 UTC (rev 1744)
+++ doc/trunk/reference/pt-BR/ri-spi.po 2009-03-01 00:42:05 UTC (rev 1745)
@@ -6,8 +6,8 @@
"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-02-28 13:48+0000\n"
-"PO-Revision-Date: 2009-01-06 11:30+0000\n"
-"Last-Translator: Automatically generated\n"
+"PO-Revision-Date: 2009-02-28 15:07-0300\n"
+"Last-Translator: João Paulo Viragine <joao.viragine(a)redhat.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -17,57 +17,43 @@
#: ri-spi.xml:4
#, no-c-format
msgid "Integrating the Web Beans RI into other environments"
-msgstr ""
+msgstr "Integrando a Web Beans RI em outros ambientes"
#. Tag: para
#: ri-spi.xml:6
#, no-c-format
-msgid ""
-"Currently the Web Beans RI only runs in JBoss AS 5; integrating the RI into "
-"other EE environments (for example another application server like "
-"Glassfish), into a servlet container (like Tomcat), or with an Embedded "
-"EJB3.1 implementation is fairly easy. In this Appendix we will briefly "
-"discuss the steps needed."
+msgid "Currently the Web Beans RI only runs in JBoss AS 5; integrating the RI into other EE environments (for example another application server like Glassfish), into a servlet container (like Tomcat), or with an Embedded EJB3.1 implementation is fairly easy. In this Appendix we will briefly discuss the steps needed."
msgstr ""
#. Tag: para
#: ri-spi.xml:15
#, no-c-format
-msgid ""
-"It should be possible to run Web Beans in an SE environment, but you'll to "
-"do more work, adding your own contexts and lifecycle. The Web Beans RI "
-"currently doesn't expose lifecycle extension points, so you would have to "
-"code directly against Web Beans RI classes."
+msgid "It should be possible to run Web Beans in an SE environment, but you'll to do more work, adding your own contexts and lifecycle. The Web Beans RI currently doesn't expose lifecycle extension points, so you would have to code directly against Web Beans RI classes."
msgstr ""
#. Tag: title
#: ri-spi.xml:24
#, no-c-format
msgid "The Web Beans RI SPI"
-msgstr ""
+msgstr "A SPI da Web Beans RI (The Web Beans RI SPI)"
#. Tag: para
#: ri-spi.xml:26
#, no-c-format
-msgid ""
-"The Web Beans SPI is located in <literal>webbeans-ri-spi</literal> module, "
-"and packaged as <literal>webbeans-ri-spi.jar</literal>. Some SPIs are "
-"optional, if you need to override the default behavior, others are required."
+msgid "The Web Beans SPI is located in <literal>webbeans-ri-spi</literal> module, and packaged as <literal>webbeans-ri-spi.jar</literal>. Some SPIs are optional, if you need to override the default behavior, others are required."
msgstr ""
#. Tag: para
#: ri-spi.xml:33
#, no-c-format
-msgid ""
-"All interfaces in the SPI support the decorator pattern and provide a "
-"<literal>Forwarding</literal> class."
+msgid "All interfaces in the SPI support the decorator pattern and provide a <literal>Forwarding</literal> class."
msgstr ""
#. Tag: title
#: ri-spi.xml:39
#, no-c-format
msgid "Web Bean Discovery"
-msgstr ""
+msgstr "Descoberta de Web Bean (Web Bean Discovery)"
#. Tag: programlisting
#: ri-spi.xml:41
@@ -75,8 +61,7 @@
msgid ""
"<![CDATA[public interface WebBeanDiscovery {\n"
" /**\n"
-" * Gets list of all classes in classpath archives with web-beans.xml "
-"files\n"
+" * Gets list of all classes in classpath archives with web-beans.xml files\n"
" * \n"
" * @return An iterable over the classes \n"
" */\n"
@@ -91,30 +76,39 @@
" \n"
"}]]>"
msgstr ""
+"<![CDATA[public interface WebBeanDiscovery {\n"
+" /**\n"
+" * Gets list of all classes in classpath archives with web-beans.xml files\n"
+" * \n"
+" * @return An iterable over the classes \n"
+" */\n"
+" public Iterable<Class<?>> discoverWebBeanClasses();\n"
+" \n"
+" /**\n"
+" * Gets a list of all web-beans.xml files in the app classpath\n"
+" * \n"
+" * @return An iterable over the web-beans.xml files \n"
+" */\n"
+" public Iterable<URL> discoverWebBeansXml();\n"
+" \n"
+"}]]>"
#. Tag: para
#: ri-spi.xml:43
#, no-c-format
-msgid ""
-"The discovery of Web Bean classes and <literal>web-bean.xml</literal> files "
-"is self-explanatory (the algorithm is described in Section 11.1 of the JSR-"
-"299 specification, and isn't repeated here)."
+msgid "The discovery of Web Bean classes and <literal>web-bean.xml</literal> files is self-explanatory (the algorithm is described in Section 11.1 of the JSR-299 specification, and isn't repeated here)."
msgstr ""
#. Tag: title
#: ri-spi.xml:52
#, no-c-format
msgid "EJB Discovery"
-msgstr ""
+msgstr "Descoberta de EJB (EJB Discovery)"
#. Tag: para
#: ri-spi.xml:54
#, no-c-format
-msgid ""
-"The Web Beans RI also delegates EJB3 bean discovery to the container so that "
-"it doesn't have to scan for EJB3 annotations or parse <literal>ejb-jar.xml</"
-"literal>. For each EJB in the application an EJBDescriptor should be "
-"discovered:"
+msgid "The Web Beans RI also delegates EJB3 bean discovery to the container so that it doesn't have to scan for EJB3 annotations or parse <literal>ejb-jar.xml</literal>. For each EJB in the application an EJBDescriptor should be discovered:"
msgstr ""
#. Tag: programlisting
@@ -134,6 +128,18 @@
" \n"
"}]]>"
msgstr ""
+"<![CDATA[public interface EjbDiscovery\n"
+"{\n"
+" public static final String PROPERTY_NAME = EjbDiscovery.class.getName();\n"
+" \n"
+" /**\n"
+" * Gets a descriptor for each EJB in the application\n"
+" * \n"
+" * @return The bean class to descriptor map \n"
+" */\n"
+" public Iterable<EjbDescriptor<?>> discoverEjbs();\n"
+" \n"
+"}]]>"
#. Tag: programlisting
#: ri-spi.xml:63
@@ -153,16 +159,14 @@
" * \n"
" * @return An iterator over the local business interfaces\n"
" */\n"
-" public Iterable<BusinessInterfaceDescriptor<?>> getLocalBusinessInterfaces"
-"();\n"
+" public Iterable<BusinessInterfaceDescriptor<?>> getLocalBusinessInterfaces();\n"
" \n"
" /**\n"
" * Gets the remote business interfaces of the EJB\n"
" * \n"
" * @return An iterator over the remote business interfaces\n"
" */\n"
-" public Iterable<BusinessInterfaceDescriptor<?>> "
-"getRemoteBusinessInterfaces();\n"
+" public Iterable<BusinessInterfaceDescriptor<?>> getRemoteBusinessInterfaces();\n"
" \n"
" /**\n"
" * Get the remove methods of the EJB\n"
@@ -209,138 +213,156 @@
" \n"
"}]]>"
msgstr ""
+"<![CDATA[public interface EjbDescriptor<T> {\n"
+" \n"
+" /**\n"
+" * Gets the EJB type\n"
+" * \n"
+" * @return The EJB Bean class\n"
+" */\n"
+" public Class<T> getType();\n"
+"\n"
+" /**\n"
+" * Gets the local business interfaces of the EJB\n"
+" * \n"
+" * @return An iterator over the local business interfaces\n"
+" */\n"
+" public Iterable<BusinessInterfaceDescriptor<?>> getLocalBusinessInterfaces();\n"
+" \n"
+" /**\n"
+" * Gets the remote business interfaces of the EJB\n"
+" * \n"
+" * @return An iterator over the remote business interfaces\n"
+" */\n"
+" public Iterable<BusinessInterfaceDescriptor<?>> getRemoteBusinessInterfaces();\n"
+" \n"
+" /**\n"
+" * Get the remove methods of the EJB\n"
+" * \n"
+" * @return An iterator over the remove methods\n"
+" */\n"
+" public Iterable<Method> getRemoveMethods();\n"
+"\n"
+" /**\n"
+" * Indicates if the bean is stateless\n"
+" * \n"
+" * @return True if stateless, false otherwise\n"
+" */\n"
+" public boolean isStateless();\n"
+"\n"
+" /**\n"
+" * Indicates if the bean is a EJB 3.1 Singleton\n"
+" * \n"
+" * @return True if the bean is a singleton, false otherwise\n"
+" */\n"
+" public boolean isSingleton();\n"
+"\n"
+" /**\n"
+" * Indicates if the EJB is stateful\n"
+" * \n"
+" * @return True if the bean is stateful, false otherwise\n"
+" */\n"
+" public boolean isStateful();\n"
+"\n"
+" /**\n"
+" * Indicates if the EJB is and MDB\n"
+" * \n"
+" * @return True if the bean is an MDB, false otherwise\n"
+" */\n"
+" public boolean isMessageDriven();\n"
+"\n"
+" /**\n"
+" * Gets the EJB name\n"
+" * \n"
+" * @return The name\n"
+" */\n"
+" public String getEjbName();\n"
+" \n"
+" \n"
+"}]]>"
#. Tag: para
#: ri-spi.xml:65
#, no-c-format
-msgid ""
-"The <literal>EjbDescriptor</literal> is fairly self-explanatory, and should "
-"return the relevant metadata as defined in the EJB specification. In "
-"addition to these two interfaces, there is "
-"<literal>BusinessInterfaceDescriptor</literal> which represents a local "
-"business interface (encapsulating the interface class and jndi name used to "
-"look up an instance of the EJB)."
+msgid "The <literal>EjbDescriptor</literal> is fairly self-explanatory, and should return the relevant metadata as defined in the EJB specification. In addition to these two interfaces, there is <literal>BusinessInterfaceDescriptor</literal> which represents a local business interface (encapsulating the interface class and jndi name used to look up an instance of the EJB)."
msgstr ""
#. Tag: title
#: ri-spi.xml:77
#, no-c-format
-msgid ""
-"<literal>@EJB</literal>, <literal>@PersistenceContext</literal> and "
-"<literal>@Resource</literal> resolution"
+msgid "<literal>@EJB</literal>, <literal>@PersistenceContext</literal> and <literal>@Resource</literal> resolution"
msgstr ""
#. Tag: para
#: ri-spi.xml:79
#, no-c-format
-msgid ""
-"The resolution of <literal>@EJB</literal>, <literal>@PersistenceContext</"
-"literal> and <literal>@Resource</literal> is delegated to the container. You "
-"must provide an implementation of <literal>org.jboss.webbeans.ejb.spi."
-"EjbResolver</literal> which provides these operations. Web Beans passes in "
-"the <literal>javax.inject.manager.InjectionPoint</literal> the resolution is "
-"for, as well as the <literal>NamingContext</literal> in use for each "
-"resolution request."
+msgid "The resolution of <literal>@EJB</literal>, <literal>@PersistenceContext</literal> and <literal>@Resource</literal> is delegated to the container. You must provide an implementation of <literal>org.jboss.webbeans.ejb.spi.EjbResolver</literal> which provides these operations. Web Beans passes in the <literal>javax.inject.manager.InjectionPoint</literal> the resolution is for, as well as the <literal>NamingContext</literal> in use for each resolution request."
msgstr ""
#. Tag: title
#: ri-spi.xml:94
-#, no-c-format
+#, fuzzy, no-c-format
msgid "The application context"
-msgstr ""
+msgstr "Contexto SELinux"
#. Tag: para
#: ri-spi.xml:96
#, no-c-format
-msgid ""
-"Web Beans expects the Application Server or other container to provide the "
-"storage for each application's context. The <literal>org.jboss.webbeans."
-"context.api.BeanStore</literal> should be implemented to provide an "
-"application scoped storage. You may find <literal>org.jboss.webbeans.context."
-"api.helpers.ConcurrentHashMapBeanStore</literal> useful."
+msgid "Web Beans expects the Application Server or other container to provide the storage for each application's context. The <literal>org.jboss.webbeans.context.api.BeanStore</literal> should be implemented to provide an application scoped storage. You may find <literal>org.jboss.webbeans.context.api.helpers.ConcurrentHashMapBeanStore</literal> useful."
msgstr ""
#. Tag: title
#: ri-spi.xml:109
-#, no-c-format
+#, fuzzy, no-c-format
msgid "Bootstrap and shutdown"
-msgstr ""
+msgstr "Recebido pedido para desligar"
#. Tag: para
#: ri-spi.xml:110
#, no-c-format
-msgid ""
-"The <literal>org.jboss.webbeans.bootstrap.api.Bootstrap</literal> interface "
-"defines the bootstrap for Web Beans. To boot Web Beans, you must obtain an "
-"instance of <literal>org.jboss.webbeans.bootstrap.WebBeansBootstrap</"
-"literal> (which implements <literal>Boostrap</literal>), tell it about the "
-"SPIs in use, and then request the container start."
+msgid "The <literal>org.jboss.webbeans.bootstrap.api.Bootstrap</literal> interface defines the bootstrap for Web Beans. To boot Web Beans, you must obtain an instance of <literal>org.jboss.webbeans.bootstrap.WebBeansBootstrap</literal> (which implements <literal>Boostrap</literal>), tell it about the SPIs in use, and then request the container start."
msgstr ""
#. Tag: para
#: ri-spi.xml:119
#, no-c-format
-msgid ""
-"The bootstrap is split into phases, bootstrap initialization and bootstrap. "
-"Initialization will create a manager, and add the standard (specification "
-"defined) contexts. Bootstrap will discover EJBs, classes and XML; add beans "
-"defined using annotations; add beans defined using XML; and validate all "
-"beans."
+msgid "The bootstrap is split into phases, bootstrap initialization and bootstrap. Initialization will create a manager, and add the standard (specification defined) contexts. Bootstrap will discover EJBs, classes and XML; add beans defined using annotations; add beans defined using XML; and validate all beans."
msgstr ""
#. Tag: para
#: ri-spi.xml:127
#, no-c-format
-msgid ""
-"To initialize the bootstrap you call <literal>Bootstrap.initialize()</"
-"literal>. Before calling <literal>initialize()</literal> you must have "
-"called <literal>Bootstrap.setEjbResolver()</literal>. If you are not using "
-"the built in <literal>DefaultNamingContext</literal> or the built in "
-"<literal>DefaultResourceLoader</literal> you must set these before calling "
-"<literal>initialize()</literal>."
+msgid "To initialize the bootstrap you call <literal>Bootstrap.initialize()</literal>. Before calling <literal>initialize()</literal> you must have called <literal>Bootstrap.setEjbResolver()</literal>. If you are not using the built in <literal>DefaultNamingContext</literal> or the built in <literal>DefaultResourceLoader</literal> you must set these before calling <literal>initialize()</literal>."
msgstr ""
#. Tag: para
#: ri-spi.xml:137
#, no-c-format
-msgid ""
-"Having called <literal>initialize()</literal>, the <literal>Manager</"
-"literal> can be obtained by calling <literal>Bootstrap.getManager()</"
-"literal>."
+msgid "Having called <literal>initialize()</literal>, the <literal>Manager</literal> can be obtained by calling <literal>Bootstrap.getManager()</literal>."
msgstr ""
#. Tag: para
#: ri-spi.xml:143
#, no-c-format
-msgid ""
-"To boot the container you call <literal>Bootstrap.boot()</literal>. Before "
-"calling <literal>boot()</literal> you must have called <literal>Bootstrap."
-"setWebBeanDiscovery()</literal>, <literal>Bootstrap.setEjbDiscovery()</"
-"literal> and <literal>Bootstrap.setApplicationContext()</literal>."
+msgid "To boot the container you call <literal>Bootstrap.boot()</literal>. Before calling <literal>boot()</literal> you must have called <literal>Bootstrap.setWebBeanDiscovery()</literal>, <literal>Bootstrap.setEjbDiscovery()</literal> and <literal>Bootstrap.setApplicationContext()</literal>."
msgstr ""
#. Tag: para
#: ri-spi.xml:151
#, no-c-format
-msgid ""
-"To shutdown the container you call <literal>Bootstrap.shutdown()</literal>. "
-"This allows the container to perform any cleanup operations needed."
+msgid "To shutdown the container you call <literal>Bootstrap.shutdown()</literal>. This allows the container to perform any cleanup operations needed."
msgstr ""
#. Tag: title
#: ri-spi.xml:160
#, no-c-format
msgid "JNDI"
-msgstr ""
+msgstr "JNDI"
#. Tag: para
#: ri-spi.xml:162
#, no-c-format
-msgid ""
-"The Web Beans RI implements JNDI binding and lookup according to standards, "
-"however you may want to alter the binding and lookup (for example in an "
-"environment where JNDI isn't available). To do this, implement <literal>org."
-"jboss.webbeans.resources.spi.NamingContext</literal>:"
+msgid "The Web Beans RI implements JNDI binding and lookup according to standards, however you may want to alter the binding and lookup (for example in an environment where JNDI isn't available). To do this, implement <literal>org.jboss.webbeans.resources.spi.NamingContext</literal>:"
msgstr ""
#. Tag: programlisting
@@ -369,22 +391,38 @@
" \n"
"}]]>"
msgstr ""
+"<![CDATA[public interface NamingContext extends Serializable {\n"
+" \n"
+" /**\n"
+" * Typed JNDI lookup\n"
+" * \n"
+" * @param <T> The type\n"
+" * @param name The JNDI name\n"
+" * @param expectedType The expected type\n"
+" * @return The object\n"
+" */\n"
+" public <T> T lookup(String name, Class<? extends T> expectedType);\n"
+"\n"
+" /**\n"
+" * Binds an item to JNDI\n"
+" * \n"
+" * @param name The key to bind under\n"
+" * @param value The item to bind\n"
+" */\n"
+" public void bind(String name, Object value);\n"
+" \n"
+"}]]>"
#. Tag: title
#: ri-spi.xml:175
#, no-c-format
msgid "Resource loading"
-msgstr ""
+msgstr "Carregando recursos"
#. Tag: para
#: ri-spi.xml:177
#, no-c-format
-msgid ""
-"The Web Beans RI needs to load classes and resources from the classpath at "
-"various times. By default, they are loaded from the same classloader that "
-"was used to load the RI, however this may not be correct for some "
-"environments. If this is case, you can implement <literal>org.jboss.webbeans."
-"spi.ResourceLoader</literal>:"
+msgid "The Web Beans RI needs to load classes and resources from the classpath at various times. By default, they are loaded from the same classloader that was used to load the RI, however this may not be correct for some environments. If this is case, you can implement <literal>org.jboss.webbeans.spi.ResourceLoader</literal>:"
msgstr ""
#. Tag: programlisting
@@ -421,82 +459,143 @@
"}\n"
" ]]>"
msgstr ""
+"<![CDATA[\n"
+" public interface ResourceLoader {\n"
+" \n"
+" /**\n"
+" * Creates a class from a given FQCN\n"
+" * \n"
+" * @param name The name of the clsas\n"
+" * @return The class\n"
+" */\n"
+" public Class<?> classForName(String name);\n"
+" \n"
+" /**\n"
+" * Gets a resource as a URL by name\n"
+" * \n"
+" * @param name The name of the resource\n"
+" * @return An URL to the resource\n"
+" */\n"
+" public URL getResource(String name);\n"
+" \n"
+" /**\n"
+" * Gets resources as URLs by name\n"
+" * \n"
+" * @param name The name of the resource\n"
+" * @return An iterable reference to the URLS\n"
+" */\n"
+" public Iterable<URL> getResources(String name);\n"
+" \n"
+"}\n"
+" ]]>"
#. Tag: title
#: ri-spi.xml:192
#, no-c-format
msgid "The contract with the container"
-msgstr ""
+msgstr "O contrato com o container"
#. Tag: para
#: ri-spi.xml:194
#, no-c-format
-msgid ""
-"There are a number of requirements that the Web Beans RI places on the "
-"container for correct functioning that fall outside implementation of APIs"
+msgid "There are a number of requirements that the Web Beans RI places on the container for correct functioning that fall outside implementation of APIs"
msgstr ""
#. Tag: term
#: ri-spi.xml:202
#, no-c-format
msgid "Classloader isolation"
-msgstr ""
+msgstr "Isolamento de Classloader (Classloader isolation)"
#. Tag: para
#: ri-spi.xml:206
#, no-c-format
-msgid ""
-"If you are integrating the Web Beans RI into an environment that supports "
-"deployment of multiple applications, you must enable, automatically, or "
-"through user configuation, classloader isolation for each Web Beans "
-"application."
+msgid "If you are integrating the Web Beans RI into an environment that supports deployment of multiple applications, you must enable, automatically, or through user configuation, classloader isolation for each Web Beans application."
msgstr ""
#. Tag: term
#: ri-spi.xml:215
#, no-c-format
msgid "Servlet listener"
-msgstr ""
+msgstr "Servlet listener"
#. Tag: para
#: ri-spi.xml:219
#, no-c-format
-msgid ""
-"If you are integrating the Web Beans into a Servlet environment you must "
-"register <literal>org.jboss.webbeans.servlet.WebBeansListener</literal> as a "
-"Servlet listener, either automatically, or through user configuration, for "
-"each Web Beans application which uses Servlet."
+msgid "If you are integrating the Web Beans into a Servlet environment you must register <literal>org.jboss.webbeans.servlet.WebBeansListener</literal> as a Servlet listener, either automatically, or through user configuration, for each Web Beans application which uses Servlet."
msgstr ""
#. Tag: term
#: ri-spi.xml:230
#, no-c-format
msgid "Session Bean Interceptor"
-msgstr ""
+msgstr "Interceptador de Session Bean (Session Bean Interceptor)"
#. Tag: para
#: ri-spi.xml:234
#, no-c-format
-msgid ""
-"If you are integrating the Web Beans into an EJB environment you must "
-"register <literal>org.jboss.webbeans.ejb.SessionBeanInterceptor</literal> as "
-"a EJB interceptor for all EJBs in the application, either automatically, or "
-"through user configuration, for each Web Beans application which uses "
-"enterprise beans."
+msgid "If you are integrating the Web Beans into an EJB environment you must register <literal>org.jboss.webbeans.ejb.SessionBeanInterceptor</literal> as a EJB interceptor for all EJBs in the application, either automatically, or through user configuration, for each Web Beans application which uses enterprise beans."
msgstr ""
#. Tag: term
#: ri-spi.xml:245
#, no-c-format
msgid "The <literal>webbeans-ri.jar</literal>"
-msgstr ""
+msgstr "A <literal>webbeans-ri.jar</literal>"
#. Tag: para
#: ri-spi.xml:249
#, no-c-format
-msgid ""
-"If you are integrating the Web Beans into an environment that supports "
-"deployment of applications, you must insert the <literal>webbeans-ri.jar</"
-"literal> into the applications isolated classloader. It cannot be loaded "
-"from a shared classloader."
+msgid "If you are integrating the Web Beans into an environment that supports deployment of applications, you must insert the <literal>webbeans-ri.jar</literal> into the applications isolated classloader. It cannot be loaded from a shared classloader."
msgstr ""
+
+#~ msgid ""
+#~ "org.jboss.webbeans.bootstrap.spi.WebBeanDiscovery= \\ \n"
+#~ " org.jboss.webbeans.integration.jbossas.WebBeanDiscoveryImpl"
+#~ msgstr ""
+#~ "org.jboss.webbeans.bootstrap.spi.WebBeanDiscovery= \\ \n"
+#~ " org.jboss.webbeans.integration.jbossas.WebBeanDiscoveryImpl"
+#~ msgid ""
+#~ "<![CDATA[public WebBeanDiscoveryImpl(ServletContext servletContext) {}]]>"
+#~ msgstr ""
+#~ "<![CDATA[public WebBeanDiscoveryImpl(ServletContext servletContext) {}]]>"
+#~ msgid ""
+#~ "org.jboss.webbeans.bootstrap.spi.EjbDiscovery= \\\n"
+#~ " org.jboss.webbeans.integration.jbossas.EjbDiscoveryImpl"
+#~ msgstr ""
+#~ "org.jboss.webbeans.bootstrap.spi.EjbDiscovery= \\\n"
+#~ " org.jboss.webbeans.integration.jbossas.EjbDiscoveryImpl"
+#~ msgid ""
+#~ "<![CDATA[public EjbDiscoveryImpl(ServletContext servletContext) {}]]>"
+#~ msgstr ""
+#~ "<![CDATA[public EjbDiscoveryImpl(ServletContext servletContext) {}]]>"
+#~ msgid "and tell the RI to use it:"
+#~ msgstr "e informar para a RI usá-lo:"
+#~ msgid ""
+#~ "org.jboss.webbeans.resources.spi.NamingContext=com.acme.MyNamingContext"
+#~ msgstr ""
+#~ "org.jboss.webbeans.resources.spi.NamingContext=com.acme.MyNamingContext"
+#~ msgid "<![CDATA[public MyNamingContext(ServletContext servletContext) {}]]>"
+#~ msgstr ""
+#~ "<![CDATA[public MyNamingContext(ServletContext servletContext) {}]]>"
+#~ msgid ""
+#~ "The servlet context can be used to allow your implementation of "
+#~ "<literal>NamingContext</literal> to interact with the container."
+#~ msgstr ""
+#~ "O contexto servlet pode ser utilizado para permitir a implementação de "
+#~ "<literal>NamingContext</literal> para interagir com o container."
+#~ msgid ""
+#~ "org.jboss.webbeans.resources.spi.ResourceLoader=com.acme.ResourceLoader"
+#~ msgstr ""
+#~ "org.jboss.webbeans.resources.spi.ResourceLoader=com.acme.ResourceLoader"
+#~ msgid ""
+#~ "<![CDATA[public MyResourceLoader(ServletContext servletContext) {}]]>"
+#~ msgstr ""
+#~ "<![CDATA[public MyResourceLoader(ServletContext servletContext) {}]]>"
+#~ msgid ""
+#~ "The servlet context can be used to allow your implementation of "
+#~ "<literal>ResourceLoader</literal> to interact with the container."
+#~ msgstr ""
+#~ "O contexto servlet pode ser utilizado para permitir a implementação de "
+#~ "<literal>ResourceLoader</literal> para interagir com o container."
+
Modified: doc/trunk/reference/pt-BR/ri.po
===================================================================
--- doc/trunk/reference/pt-BR/ri.po 2009-02-28 14:04:13 UTC (rev 1744)
+++ doc/trunk/reference/pt-BR/ri.po 2009-03-01 00:42:05 UTC (rev 1745)
@@ -6,8 +6,8 @@
"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-02-01 21:16+0000\n"
-"PO-Revision-Date: 2009-01-06 11:30+0000\n"
-"Last-Translator: Automatically generated\n"
+"PO-Revision-Date: 2009-02-28 15:06-0300\n"
+"Last-Translator: João Paulo Viragine <joao.viragine(a)redhat.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -17,54 +17,37 @@
#: ri.xml:4
#, no-c-format
msgid "The Web Beans Reference Implementation"
-msgstr ""
+msgstr "A Implementação de Referência de Web Beans"
#. Tag: para
-#: ri.xml:6
-#, no-c-format
-msgid ""
-"The Web Beans Reference Implementation is being developed at <ulink url="
-"\"http://seamframework.org/WebBeans\">the Seam project</ulink>. You can "
-"download the latest developer release of Web Beans from the <ulink url="
-"\"http://seamframework.org/Download\">the downloads page</ulink>."
-msgstr ""
-
-#. Tag: para
#: ri.xml:13
#, no-c-format
-msgid ""
-"The Web Beans RI comes with a two deployable example applications: "
-"<literal>webbeans-numberguess</literal>, a war example, containing only "
-"simple beans, and <literal>webbeans-translator</literal> an ear example, "
-"containing enterprise beans. To run the examples you'll need the following:"
-msgstr ""
+msgid "The Web Beans RI comes with a two deployable example applications: <literal>webbeans-numberguess</literal>, a war example, containing only simple beans, and <literal>webbeans-translator</literal> an ear example, containing enterprise beans. To run the examples you'll need the following:"
+msgstr "A implementação de referência de Web Beans vem com duas aplicações de exemplo: <literal>webbeans-numberguess</literal>, um war, contendo apenas beans simples (simple beans), e <literal>webbeans-translator</literal> um ear, contendo benas corporativos (enterprise beans). Para executar os exemplos, você precisará do seguinte:"
#. Tag: para
#: ri.xml:22
#, no-c-format
msgid "the latest release of the Web Beans RI,"
-msgstr ""
+msgstr "a última versão da Web Beans RI,"
#. Tag: para
#: ri.xml:25
#, no-c-format
msgid "JBoss AS 5.0.0.GA, and"
-msgstr ""
+msgstr "JBoss AS 5.0.0.GA, e"
#. Tag: para
#: ri.xml:28
#, no-c-format
msgid "Ant 1.7.0."
-msgstr ""
+msgstr "Ant 1.7.0."
#. Tag: para
#: ri.xml:32
#, no-c-format
-msgid ""
-"Currently, the Web Beans RI only runs on JBoss Application Server 5. You'll "
-"need to download JBoss AS 5.0.0.GA from <ulink url=\"http://www.jboss.org/"
-"jbossas/downloads/\">jboss.org</ulink>, and unzip it. For example:"
-msgstr ""
+msgid "Currently, the Web Beans RI only runs on JBoss Application Server 5. You'll need to download JBoss AS 5.0.0.GA from <ulink url=\"http://www.jboss.org/jbossas/downloads/\">jboss.org</ulink>, and unzip it. For example:"
+msgstr "Atualmente, a Web Beans RI roda apenas no JBoss Application Server 5. Você precisa baixar o JBoss AS 5.0.0.GA de <ulink url=\"http://www.jboss.org/jbossas/downloads/\">jboss.org</ulink>, e descompacta-lo. Por exemplo:\""
#. Tag: programlisting
#: ri.xml:39
@@ -73,14 +56,14 @@
"<![CDATA[$ cd /Applications\n"
"$ unzip ~/jboss-5.0.0.GA.zip]]>"
msgstr ""
+"<![CDATA[$ cd /Applications\n"
+"$ unzip ~/jboss-5.0.0.GA.zip]]>"
#. Tag: para
#: ri.xml:41
#, no-c-format
-msgid ""
-"Next, download the Web Beans RI from <ulink url=\"http://seamframework.org/"
-"Download\">seamframework.org</ulink>, and unzip it. For example"
-msgstr ""
+msgid "Next, download the Web Beans RI from <ulink url=\"http://seamframework.org/Download\">seamframework.org</ulink>, and unzip it. For example"
+msgstr "Depois, baixe a implementação de referência de Web Beans (Web Beans RI) de <ulink url=\"http://seamframework.org/Download\">seamframework.org</ulink>, e descompacte-o. Por exemplo"
#. Tag: programlisting
#: ri.xml:47
@@ -89,49 +72,38 @@
"<![CDATA[$ cd ~/\n"
"$ unzip ~/webbeans-$VERSION.zip]]>"
msgstr ""
+"<![CDATA[$ cd ~/\n"
+"$ unzip ~/webbeans-1.0.0.ALPHA1.zip]]>"
#. Tag: para
#: ri.xml:50
#, no-c-format
-msgid ""
-"Next, we need to tell Web Beans where JBoss is located. Edit <literal>jboss-"
-"as/build.properties</literal> and set the <literal>jboss.home</literal> "
-"property. For example:"
+msgid "Next, we need to tell Web Beans where JBoss is located. Edit <literal>jboss-as/build.properties</literal> and set the <literal>jboss.home</literal> property. For example:"
msgstr ""
#. Tag: programlisting
#: ri.xml:56
#, no-c-format
msgid "jboss.home=/Applications/jboss-5.0.0.GA"
-msgstr ""
+msgstr "jboss.home=/Applications/jboss-5.0.0.GA"
#. Tag: para
#: ri.xml:58
#, no-c-format
-msgid ""
-"As Web Beans is a new piece of software, you need to update JBoss AS to run "
-"the Web Beans RI. Future versions of JBoss AS will include these updates, "
-"and this step won't be necessary."
-msgstr ""
+msgid "As Web Beans is a new piece of software, you need to update JBoss AS to run the Web Beans RI. Future versions of JBoss AS will include these updates, and this step won't be necessary."
+msgstr "Como o Web Beabs é uma nova peça de software, você de fazer a atualização do JBoss AS para poder executar a implementação de referência de Web Beans (Web Beans RI). Futuras versões do JBoss AS incluirão essas atualizações e esse passo será desnecessário."
#. Tag: para
#: ri.xml:65
#, no-c-format
-msgid ""
-"Currently, two updates are needed. Firstly, a new deployer, "
-"<literal>webbeans.deployer</literal> is added. This adds supports for Web "
-"Bean archives to JBoss AS, and allows the Web Beans RI to query the EJB3 "
-"container and discover which EJBs are installed in your application. "
-"Secondly, an update to JBoss EJB3 is needed."
+msgid "Currently, two updates are needed. Firstly, a new deployer, <literal>webbeans.deployer</literal> is added. This adds supports for Web Bean archives to JBoss AS, and allows the Web Beans RI to query the EJB3 container and discover which EJBs are installed in your application. Secondly, an update to JBoss EJB3 is needed."
msgstr ""
#. Tag: para
#: ri.xml:74
#, no-c-format
-msgid ""
-"To install the update, you'll need Ant 1.7.0 installed, and the "
-"<literal>ANT_HOME</literal> environment variable set. For example:"
-msgstr ""
+msgid "To install the update, you'll need Ant 1.7.0 installed, and the <literal>ANT_HOME</literal> environment variable set. For example:"
+msgstr "Para instalar a atualização, precisaremos do Ant 1.7.0 instalado, e a variável de ambiente <literal>ANT_HOME</literal> setada. Por exemplo:"
#. Tag: programlisting
#: ri.xml:79
@@ -140,13 +112,13 @@
"$ unzip apache-ant-1.7.0.zip\n"
"$ export ANT_HOME=~/apache-ant-1.7.0"
msgstr ""
+"$ unzip apache-ant-1.7.0.zip\n"
+"$ export ANT_HOME=~/apache-ant-1.7.0"
#. Tag: para
#: ri.xml:81
#, no-c-format
-msgid ""
-"Then, you can install the update. The update script will use Maven to "
-"download the Web Beans and EJB3 automatically."
+msgid "Then, you can install the update. The update script will use Maven to download the Web Beans and EJB3 automatically."
msgstr ""
#. Tag: programlisting
@@ -156,58 +128,56 @@
"$ cd webbeans-$VERSION/jboss-as\n"
"$ ant update"
msgstr ""
+"$ cd webbeans-1.0.0.ALPHA1/jboss-as\n"
+"$ ant update"
#. Tag: para
#: ri.xml:88
#, no-c-format
msgid "Now, you're ready to deploy your first example!"
-msgstr ""
+msgstr "Agora, você está pronto para fazer a publicação do seu primeiro exemplo!"
#. Tag: para
#: ri.xml:93
#, no-c-format
-msgid ""
-"The build scripts for the examples offer a number of targets, these are:"
+msgid "The build scripts for the examples offer a number of targets, these are:"
msgstr ""
#. Tag: para
#: ri.xml:99
#, no-c-format
msgid "<literal>ant restart</literal> - deploy the example in exploded format"
-msgstr ""
+msgstr "<literal>ant restart</literal> - publica o exemplo no formato explodido"
#. Tag: para
#: ri.xml:105
#, no-c-format
-msgid ""
-"<literal>ant explode</literal> - update an exploded example, without "
-"restarting the deployment"
-msgstr ""
+msgid "<literal>ant explode</literal> - update an exploded example, without restarting the deployment"
+msgstr "<literal>ant explode</literal> - atualiza o exemplo explodido, sem reiniciar "
#. Tag: para
#: ri.xml:111
#, no-c-format
-msgid ""
-"<literal>ant deploy</literal> - deploy the example in compressed jar format"
-msgstr ""
+msgid "<literal>ant deploy</literal> - deploy the example in compressed jar format"
+msgstr "<literal>ant deploy</literal> - publica o exemplo no formato jar compactado"
#. Tag: para
#: ri.xml:116
#, no-c-format
msgid "<literal>ant undeploy</literal> - remove the example from the server"
-msgstr ""
+msgstr "<literal>ant undeploy</literal> - remove o exemplo do servidor"
#. Tag: para
#: ri.xml:121
#, no-c-format
msgid "<literal>ant clean</literal> - clean the example"
-msgstr ""
+msgstr "<literal>ant clean</literal> - limpa o exemplo"
#. Tag: para
#: ri.xml:128
#, no-c-format
msgid "To deploy the numberguess example:"
-msgstr ""
+msgstr "Para publicar (deploy) o exemplo numberguess:"
#. Tag: programlisting
#: ri.xml:132
@@ -216,41 +186,37 @@
"$ cd examples/numberguess\n"
"ant deploy"
msgstr ""
+"$ cd examples/numberguess\n"
+"ant deploy"
#. Tag: para
#: ri.xml:134
#, no-c-format
msgid "Start JBoss AS:"
-msgstr ""
+msgstr "Iniciando o JBoss AS:"
#. Tag: programlisting
#: ri.xml:138
#, no-c-format
msgid "$ /Application/jboss-5.0.0.GA/bin/run.sh"
-msgstr ""
+msgstr "$ /Application/jboss-5.0.0.GA/bin/run.sh"
#. Tag: para
#: ri.xml:141
#, no-c-format
msgid "If you use Windows, use the <literal>run.bat</literal>script."
-msgstr ""
+msgstr "Se você usa o Windows, utilize o script <literal>run.bat</literal>."
#. Tag: para
#: ri.xml:146
#, no-c-format
-msgid ""
-"Wait for the application to deploy, and enjoy hours of fun at <ulink url="
-"\"http://localhost:8080/webbeans-numberguess\"></ulink>!"
+msgid "Wait for the application to deploy, and enjoy hours of fun at <ulink url=\"http://localhost:8080/webbeans-numberguess\"></ulink>!"
msgstr ""
#. Tag: para
#: ri.xml:151
#, no-c-format
-msgid ""
-"The Web Beans RI includes a second simple example that will translate your "
-"text into Latin. The numberguess example is a war example, and uses only "
-"simple beans; the translator example is an ear example, and includes "
-"enterprise beans, packaged in an EJB module. To try it out:"
+msgid "The Web Beans RI includes a second simple example that will translate your text into Latin. The numberguess example is a war example, and uses only simple beans; the translator example is an ear example, and includes enterprise beans, packaged in an EJB module. To try it out:"
msgstr ""
#. Tag: programlisting
@@ -260,47 +226,37 @@
"$ cd examples/translator\n"
"ant deploy"
msgstr ""
+"$ cd examples/translator\n"
+"ant deploy"
#. Tag: para
#: ri.xml:160
#, no-c-format
-msgid ""
-"Wait for the application to deploy, and visit <ulink url=\"http://"
-"localhost:8080/webbeans-translator\"></ulink>!"
+msgid "Wait for the application to deploy, and visit <ulink url=\"http://localhost:8080/webbeans-translator\"></ulink>!"
msgstr ""
#. Tag: title
#: ri.xml:166
#, no-c-format
msgid "The numberguess example"
-msgstr ""
+msgstr "O exemplo numberguess"
#. Tag: para
#: ri.xml:168
#, no-c-format
-msgid ""
-"In the numberguess application you get given 10 attempts to guess a number "
-"between 1 and 100. After each attempt, you will be told whether you are too "
-"high, or too low."
+msgid "In the numberguess application you get given 10 attempts to guess a number between 1 and 100. After each attempt, you will be told whether you are too high, or too low."
msgstr ""
#. Tag: para
#: ri.xml:174
#, no-c-format
-msgid ""
-"The numberguess example is comprised of a number of Web Beans, configuration "
-"files, and Facelet JSF pages, packaged as a war. Let's start with the "
-"configuration files."
+msgid "The numberguess example is comprised of a number of Web Beans, configuration files, and Facelet JSF pages, packaged as a war. Let's start with the configuration files."
msgstr ""
#. Tag: para
#: ri.xml:180
#, no-c-format
-msgid ""
-"All the configuration files for this example are located in <literal>WEB-INF/"
-"</literal>, which is stored in <literal>WebContent</literal> in the source "
-"tree. First, we have <literal>faces-config.xml</literal>, in which we tell "
-"JSF to use Facelets:"
+msgid "All the configuration files for this example are located in <literal>WEB-INF/</literal>, which is stored in <literal>WebContent</literal> in the source tree. First, we have <literal>faces-config.xml</literal>, in which we tell JSF to use Facelets:"
msgstr ""
#. Tag: programlisting
@@ -311,8 +267,7 @@
"<faces-config version=\"1.2\"\n"
" xmlns=\"http://java.sun.com/xml/ns/javaee\"\n"
" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
-" xsi:schemaLocation=\"http://java.sun.com/xml/ns/javaee http://"
-"java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd\">\n"
+" xsi:schemaLocation=\"http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd\">\n"
" \n"
" <application>\n"
" <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>\n"
@@ -320,36 +275,40 @@
"\n"
"</faces-config>]]>"
msgstr ""
+"<![CDATA[<?xml version='1.0' encoding='UTF-8'?>\n"
+"<faces-config version=\"1.2\"\n"
+" xmlns=\"http://java.sun.com/xml/ns/javaee\"\n"
+" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
+" xsi:schemaLocation=\"http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd\">\n"
+" \n"
+" <application>\n"
+" <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>\n"
+" </application>\n"
+"\n"
+"</faces-config>]]>"
#. Tag: para
#: ri.xml:190
#, no-c-format
-msgid ""
-"There is an empty <literal>web-beans.xml</literal> file, which marks this "
-"application as a Web Beans application."
+msgid "There is an empty <literal>web-beans.xml</literal> file, which marks this application as a Web Beans application."
msgstr ""
#. Tag: para
#: ri.xml:195
#, no-c-format
msgid "Finally there is <literal>web.xml</literal>:"
-msgstr ""
+msgstr "Finalmente há <literal>web.xml</literal>:"
#. Tag: section
#: ri.xml:197
#, no-c-format
msgid ""
-"<programlistingco> <areaspec> <area id=\"faces.servlet\" coords=\"12\"/> "
-"<area id=\"faces.servlet.mapping\" coords=\"18\"/> <area id=\"faces.default."
-"suffix\" coords=\"23\"/> <area id=\"session.timeout\" coords=\"28\"/> <area "
-"id=\"webbeans.listener\" coords=\"32\"/> </areaspec> <programlisting><![CDATA"
-"[<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+"<programlistingco> <areaspec> <area id=\"faces.servlet\" coords=\"12\"/> <area id=\"faces.servlet.mapping\" coords=\"18\"/> <area id=\"faces.default.suffix\" coords=\"23\"/> <area id=\"session.timeout\" coords=\"28\"/> <area id=\"webbeans.listener\" coords=\"32\"/> </areaspec> <programlisting><![CDATA[<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"\n"
"<web-app version=\"2.5\"\n"
" xmlns=\"http://java.sun.com/xml/ns/javaee\"\n"
" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
-" xsi:schemaLocation=\"http://java.sun.com/xml/ns/javaee http://java.sun."
-"com/xml/ns/javaee/web-app_2_5.xsd\">\n"
+" xsi:schemaLocation=\"http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd\">\n"
" \n"
" <display-name>Web Beans Numbergues example</display-name>\n"
"\n"
@@ -375,23 +334,7 @@
" <session-timeout>10</session-timeout>\n"
" </session-config>\n"
"\n"
-"</web-app>]]></programlisting> <calloutlist> <callout arearefs=\"faces."
-"servlet\"> <para> Enable and load the JSF servlet </para> </callout> "
-"<callout arearefs=\"faces.servlet.mapping\"> <para> Configure requests to "
-"<literal>.jsf</literal> pages to be handled by JSF </para> </callout> "
-"<callout arearefs=\"faces.default.suffix\"> <para> Tell JSF that we will be "
-"giving our source files (facelets) an extension of <literal>.jsf</literal> </"
-"para> </callout> <callout arearefs=\"session.timeout\"> <para> Configure a "
-"session timeout of 10 minutes </para> </callout> </calloutlist> </"
-"programlistingco> <note> <para> Whilst this demo is a JSF demo, you can use "
-"the Web Beans RI with any Servlet based web framework. </para> </note> "
-"<para> Let's take a look at the Facelet view: </para> <programlistingco> "
-"<areaspec> <area id=\"template\" coords=\"8\"/> <area id=\"messages\" coords="
-"\"12\"/> <area id=\"instructions\" coords=\"19\"/> <area id=\"guess\" coords="
-"\"25\"/> <area id=\"validator\" coords=\"30\"/> <area id=\"submit\" coords="
-"\"33\"/> </areaspec> <programlisting><![CDATA[<!DOCTYPE html PUBLIC \"-//"
-"W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/"
-"xhtml1-transitional.dtd\">\n"
+"</web-app>]]></programlisting> <calloutlist> <callout arearefs=\"faces.servlet\"> <para> Enable and load the JSF servlet </para> </callout> <callout arearefs=\"faces.servlet.mapping\"> <para> Configure requests to <literal>.jsf</literal> pages to be handled by JSF </para> </callout> <callout arearefs=\"faces.default.suffix\"> <para> Tell JSF that we will be giving our source files (facelets) an extension of <literal>.jsf</literal> </para> </callout> <callout arearefs=\"session.timeout\"> <para> Configure a session timeout of 10 minutes </para> </callout> </calloutlist> </programlistingco> <note> <para> Whilst this demo is a JSF demo, you can use the Web Beans RI with any Servlet based web framework. </para> </note> <para> Let's take a look at the Facelet view: </para> <programlistingco> <areaspec> <area id=\"template\" coords=\"8\"/> <area id=\"messages\" coords=\"12\"/> <area id=\"instructions\" coords=\"19\"/> <area id=\"guess\" coords=\"25\"/> <area id=\"validator\" coo!
rds=\"30\"/> <area id=\"submit\" coords=\"33\"/> </areaspec> <programlisting><![CDATA[<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n"
"<html xmlns=\"http://www.w3.org/1999/xhtml\"\n"
" xmlns:ui=\"http://java.sun.com/jsf/facelets\"\n"
" xmlns:h=\"http://java.sun.com/jsf/html\"\n"
@@ -404,15 +347,12 @@
" <h:form id=\"NumberGuessMain\">\n"
" <div style=\"color: red\">\n"
" <h:messages id=\"messages\" globalOnly=\"false\"/>\n"
-" <h:outputText id=\"Higher\" value=\"Higher!\" rendered=\"#{game."
-"number gt game.guess and game.guess ne 0}\"/>\n"
-" <h:outputText id=\"Lower\" value=\"Lower!\" rendered=\"#{game."
-"number lt game.guess and game.guess ne 0}\"/>\n"
+" <h:outputText id=\"Higher\" value=\"Higher!\" rendered=\"#{game.number gt game.guess and game.guess ne 0}\"/>\n"
+" <h:outputText id=\"Lower\" value=\"Lower!\" rendered=\"#{game.number lt game.guess and game.guess ne 0}\"/>\n"
" </div>\n"
" \n"
" <div>\n"
-" I'm thinking of a number between #{game.smallest} and #{game."
-"biggest}.\n"
+" I'm thinking of a number between #{game.smallest} and #{game.biggest}.\n"
" You have #{game.remainingGuesses} guesses.\n"
" </div>\n"
" \n"
@@ -432,38 +372,93 @@
" disabled=\"#{game.number eq game.guess}\"/>\n"
" </div>\n"
" <div>\n"
-" <h:commandButton id=\"RestartButton\" value=\"Reset\" action=\"#"
-"{game.reset}\" immediate=\"true\" />\n"
+" <h:commandButton id=\"RestartButton\" value=\"Reset\" action=\"#{game.reset}\" immediate=\"true\" />\n"
" </div>\n"
" </h:form>\n"
" </ui:define>\n"
" </ui:composition>\n"
-"</html>]]></programlisting> <calloutlist> <callout arearefs=\"template\"> "
-"<para> Facelets is a templating language for JSF, here we are wrapping our "
-"page in a template which defines the header. </para> </callout> <callout "
-"arearefs=\"messages\"> <para> There are a number of messages which can be "
-"sent to the user, \"Higher!\", \"Lower!\" and \"Correct!\" </para> </"
-"callout> <callout arearefs=\"instructions\"> <para> As the user guesses, the "
-"range of numbers they can guess gets smaller - this sentance changes to make "
-"sure they know what range to guess in. </para> </callout> <callout arearefs="
-"\"guess\"> <para> This input field is bound to a Web Bean, using the value "
-"expression. </para> </callout> <callout arearefs=\"validator\"> <para> A "
-"range validator is used to make sure the user doesn't accidentally input a "
-"number outside of the range in which they can guess - if the validator "
-"wasn't here, the user might use up a guess on an out of range number. </"
-"para> </callout> <callout arearefs=\"submit\"> <para> And, of course, there "
-"must be a way for the user to send their guess to the server. Here we bind "
-"to an action method on the Web Bean. </para> </callout> </calloutlist> </"
-"programlistingco>"
+"</html>]]></programlisting> <calloutlist> <callout arearefs=\"template\"> <para> Facelets is a templating language for JSF, here we are wrapping our page in a template which defines the header. </para> </callout> <callout arearefs=\"messages\"> <para> There are a number of messages which can be sent to the user, \"Higher!\", \"Lower!\" and \"Correct!\" </para> </callout> <callout arearefs=\"instructions\"> <para> As the user guesses, the range of numbers they can guess gets smaller - this sentance changes to make sure they know what range to guess in. </para> </callout> <callout arearefs=\"guess\"> <para> This input field is bound to a Web Bean, using the value expression. </para> </callout> <callout arearefs=\"validator\"> <para> A range validator is used to make sure the user doesn't accidentally input a number outside of the range in which they can guess - if the validator wasn't here, the user might use up a guess on an out of range number. </para> </callout> <callout !
arearefs=\"submit\"> <para> And, of course, there must be a way for the user to send their guess to the server. Here we bind to an action method on the Web Bean. </para> </callout> </calloutlist> </programlistingco>"
msgstr ""
+"<programlistingco> <areaspec> <area id=\"faces.servlet\" coords=\"12\"/> <area id=\"faces.servlet.mapping\" coords=\"18\"/> <area id=\"faces.default.suffix\" coords=\"23\"/> <area id=\"session.timeout\" coords=\"28\"/> <area id=\"webbeans.listener\" coords=\"32\"/> </areaspec> <programlisting><![CDATA[<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+"\n"
+"<web-app version=\"2.5\"\n"
+" xmlns=\"http://java.sun.com/xml/ns/javaee\"\n"
+" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
+" xsi:schemaLocation=\"http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd\">\n"
+" \n"
+" <display-name>Web Beans Numbergues example</display-name>\n"
+"\n"
+" <!-- JSF -->\n"
+"\n"
+" <servlet>\n"
+" <servlet-name>Faces Servlet</servlet-name>\n"
+" <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>\n"
+" <load-on-startup>1</load-on-startup>\n"
+" </servlet>\n"
+"\n"
+" <servlet-mapping>\n"
+" <servlet-name>Faces Servlet</servlet-name>\n"
+" <url-pattern>*.jsf</url-pattern>\n"
+" </servlet-mapping>\n"
+" \n"
+" <context-param>\n"
+" <param-name>javax.faces.DEFAULT_SUFFIX</param-name>\n"
+" <param-value>.xhtml</param-value>\n"
+" </context-param>\n"
+"\n"
+" <session-config>\n"
+" <session-timeout>10</session-timeout>\n"
+" </session-config>\n"
+"\n"
+"</web-app>]]></programlisting> <calloutlist> <callout arearefs=\"faces.servlet\"> <para> Enable and load the JSF servlet </para> </callout> <callout arearefs=\"faces.servlet.mapping\"> <para> Configure requests to <literal>.jsf</literal> pages to be handled by JSF </para> </callout> <callout arearefs=\"faces.default.suffix\"> <para> Tell JSF that we will be giving our source files (facelets) an extension of <literal>.jsf</literal> </para> </callout> <callout arearefs=\"session.timeout\"> <para> Configure a session timeout of 10 minutes </para> </callout> </calloutlist> </programlistingco> <note> <para> Whilst this demo is a JSF demo, you can use the Web Beans RI with any Servlet based web framework. </para> </note> <para> Let's take a look at the Facelet view: </para> <programlistingco> <areaspec> <area id=\"template\" coords=\"8\"/> <area id=\"messages\" coords=\"12\"/> <area id=\"instructions\" coords=\"19\"/> <area id=\"guess\" coords=\"25\"/> <area id=\"validator\" coo!
rds=\"30\"/> <area id=\"submit\" coords=\"33\"/> </areaspec> <programlisting><![CDATA[<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n"
+"<html xmlns=\"http://www.w3.org/1999/xhtml\"\n"
+" xmlns:ui=\"http://java.sun.com/jsf/facelets\"\n"
+" xmlns:h=\"http://java.sun.com/jsf/html\"\n"
+" xmlns:f=\"http://java.sun.com/jsf/core\"\n"
+" xmlns:s=\"http://jboss.com/products/seam/taglib\">\n"
+"\n"
+" <ui:composition template=\"template.xhtml\">\n"
+" <ui:define name=\"content\">\n"
+" <h1>Guess a number...</h1>\n"
+" <h:form id=\"NumberGuessMain\">\n"
+" <div style=\"color: red\">\n"
+" <h:messages id=\"messages\" globalOnly=\"false\"/>\n"
+" <h:outputText id=\"Higher\" value=\"Higher!\" rendered=\"#{game.number gt game.guess and game.guess ne 0}\"/>\n"
+" <h:outputText id=\"Lower\" value=\"Lower!\" rendered=\"#{game.number lt game.guess and game.guess ne 0}\"/>\n"
+" </div>\n"
+" \n"
+" <div>\n"
+" I'm thinking of a number between #{game.smallest} and #{game.biggest}.\n"
+" You have #{game.remainingGuesses} guesses.\n"
+" </div>\n"
+" \n"
+" <div>\n"
+" Your guess: \n"
+" <h:inputText id=\"inputGuess\" \n"
+" value=\"#{game.guess}\" \n"
+" required=\"true\" \n"
+" size=\"3\" \n"
+" disabled=\"#{game.number eq game.guess}\">\n"
+" <f:validateLongRange maximum=\"#{game.biggest}\" \n"
+" minimum=\"#{game.smallest}\"/>\n"
+" </h:inputText>\n"
+" <h:commandButton id=\"GuessButton\" \n"
+" value=\"Guess\" \n"
+" action=\"#{game.check}\" \n"
+" disabled=\"#{game.number eq game.guess}\"/>\n"
+" </div>\n"
+" <div>\n"
+" <h:commandButton id=\"RestartButton\" value=\"Reset\" action=\"#{game.reset}\" immediate=\"true\" />\n"
+" </div>\n"
+" </h:form>\n"
+" </ui:define>\n"
+" </ui:composition>\n"
+"</html>]]></programlisting> <calloutlist> <callout arearefs=\"template\"> <para> Facelets is a templating language for JSF, here we are wrapping our page in a template which defines the header. </para> </callout> <callout arearefs=\"messages\"> <para> There are a number of messages which can be sent to the user, \"Higher!\", \"Lower!\" and \"Correct!\" </para> </callout> <callout arearefs=\"instructions\"> <para> As the user guesses, the range of numbers they can guess gets smaller - this sentance changes to make sure they know what range to guess in. </para> </callout> <callout arearefs=\"guess\"> <para> This input field is bound to a Web Bean, using the value expression. </para> </callout> <callout arearefs=\"validator\"> <para> A range validator is used to make sure the user doesn't accidentally input a number outside of the range in which they can guess - if the validator wasn't here, the user might use up a guess on an out of range number. </para> </callout> <callout !
arearefs=\"submit\"> <para> And, of course, there must be a way for the user to send their guess to the server. Here we bind to an action method on the Web Bean. </para> </callout> </calloutlist> </programlistingco>"
#. Tag: para
#: ri.xml:299
#, no-c-format
-msgid ""
-"The example exists of 4 classes, the first two of which are binding types. "
-"First, there is the <literal>@Random</literal> binding type, used for "
-"injecting a random number:"
+msgid "The example exists of 4 classes, the first two of which are binding types. First, there is the <literal>@Random</literal> binding type, used for injecting a random number:"
msgstr ""
#. Tag: programlisting
@@ -476,13 +471,16 @@
"@BindingType\n"
"public @interface Random {}]]>"
msgstr ""
+"<![CDATA[@Target( { TYPE, METHOD, PARAMETER, FIELD })\n"
+"@Retention(RUNTIME)\n"
+"@Documented\n"
+"@BindingType\n"
+"public @interface Random {}]]>"
#. Tag: para
#: ri.xml:307
#, no-c-format
-msgid ""
-"There is also the <literal>@MaxNumber</literal> binding type, used for "
-"injecting the maximum number that can be injected:"
+msgid "There is also the <literal>@MaxNumber</literal> binding type, used for injecting the maximum number that can be injected:"
msgstr ""
#. Tag: programlisting
@@ -496,14 +494,17 @@
"public @interface MaxNumber {}\n"
"]]>"
msgstr ""
+"<![CDATA[@Target( { TYPE, METHOD, PARAMETER, FIELD })\n"
+"@Retention(RUNTIME)\n"
+"@Documented\n"
+"@BindingType\n"
+"public @interface MaxNumber {}\n"
+"]]>"
#. Tag: para
#: ri.xml:314
#, no-c-format
-msgid ""
-"The <literal>Generator</literal> class is responsible for creating the "
-"random number, via a producer method. It also exposes the maximum possible "
-"number via a producer method:"
+msgid "The <literal>Generator</literal> class is responsible for creating the random number, via a producer method. It also exposes the maximum possible number via a producer method:"
msgstr ""
#. Tag: programlisting
@@ -513,8 +514,7 @@
"<![CDATA[@ApplicationScoped\n"
"public class Generator {\n"
" \n"
-" private java.util.Random random = new java.util.Random( System."
-"currentTimeMillis() );\n"
+" private java.util.Random random = new java.util.Random( System.currentTimeMillis() );\n"
" \n"
" private int maxNumber = 100;\n"
" \n"
@@ -534,32 +534,45 @@
"\n"
"}]]>"
msgstr ""
+"<![CDATA[@ApplicationScoped\n"
+"public class Generator {\n"
+" \n"
+" private java.util.Random random = new java.util.Random( System.currentTimeMillis() );\n"
+" \n"
+" private int maxNumber = 100;\n"
+" \n"
+" java.util.Random getRandom()\n"
+" {\n"
+" return random;\n"
+" }\n"
+" \n"
+" @Produces @Random int next() { \n"
+" return getRandom().nextInt(maxNumber); \n"
+" }\n"
+" \n"
+" @Produces @MaxNumber int getMaxNumber()\n"
+" {\n"
+" return maxNumber;\n"
+" }\n"
+"\n"
+"}]]>"
#. Tag: para
#: ri.xml:322
#, no-c-format
-msgid ""
-"You'll notice that the <literal>Generator</literal> is application scoped; "
-"therefore we don't get a different random each time."
+msgid "You'll notice that the <literal>Generator</literal> is application scoped; therefore we don't get a different random each time."
msgstr ""
#. Tag: para
#: ri.xml:327
#, no-c-format
-msgid ""
-"The final Web Bean in the application is the session scoped <literal>Game</"
-"literal>."
+msgid "The final Web Bean in the application is the session scoped <literal>Game</literal>."
msgstr ""
#. Tag: para
#: ri.xml:332
#, no-c-format
-msgid ""
-"You'll note that we've used the <literal>@Named</literal> annotation, so "
-"that we can use the bean through EL in the JSF page. Finally, we've used "
-"constructor injection to initialize the game with a random number. And of "
-"course, we need to tell the player when they've won, so we give feedback "
-"with a <literal>FacesMessage</literal>."
+msgid "You'll note that we've used the <literal>@Named</literal> annotation, so that we can use the bean through EL in the JSF page. Finally, we've used constructor injection to initialize the game with a random number. And of course, we need to tell the player when they've won, so we give feedback with a <literal>FacesMessage</literal>."
msgstr ""
#. Tag: programlisting
@@ -644,8 +657,7 @@
" }\n"
" if (guess == number)\n"
" {\n"
-" FacesContext.getCurrentInstance().addMessage(null, new FacesMessage"
-"(\"Correct!\"));\n"
+" FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(\"Correct!\"));\n"
" }\n"
" remainingGuesses--;\n"
" return null;\n"
@@ -657,50 +669,134 @@
" this.smallest = 0;\n"
" this.guess = 0;\n"
" this.remainingGuesses = 10;\n"
-" this.number = manager.getInstanceByType(Integer.class, new "
-"AnnotationLiteral<Random>(){});\n"
+" this.number = manager.getInstanceByType(Integer.class, new AnnotationLiteral<Random>(){});\n"
" }\n"
" \n"
"}]]>"
msgstr ""
+"<![CDATA[package org.jboss.webbeans.examples.numberguess;\n"
+"\n"
+"\n"
+"import javax.annotation.PostConstruct;\n"
+"import javax.faces.application.FacesMessage;\n"
+"import javax.faces.context.FacesContext;\n"
+"import javax.webbeans.AnnotationLiteral;\n"
+"import javax.webbeans.Current;\n"
+"import javax.webbeans.Initializer;\n"
+"import javax.webbeans.Named;\n"
+"import javax.webbeans.SessionScoped;\n"
+"import javax.webbeans.manager.Manager;\n"
+"\n"
+"@Named\n"
+"@SessionScoped\n"
+"public class Game\n"
+"{\n"
+" private int number;\n"
+" \n"
+" private int guess;\n"
+" private int smallest;\n"
+" private int biggest;\n"
+" private int remainingGuesses;\n"
+" \n"
+" @Current Manager manager;\n"
+" \n"
+" public Game()\n"
+" {\n"
+" }\n"
+" \n"
+" @Initializer\n"
+" Game(@MaxNumber int maxNumber)\n"
+" { \n"
+" this.biggest = maxNumber;\n"
+" }\n"
+"\n"
+" public int getNumber()\n"
+" {\n"
+" return number;\n"
+" }\n"
+" \n"
+" public int getGuess()\n"
+" {\n"
+" return guess;\n"
+" }\n"
+" \n"
+" public void setGuess(int guess)\n"
+" {\n"
+" this.guess = guess;\n"
+" }\n"
+" \n"
+" public int getSmallest()\n"
+" {\n"
+" return smallest;\n"
+" }\n"
+" \n"
+" public int getBiggest()\n"
+" {\n"
+" return biggest;\n"
+" }\n"
+" \n"
+" public int getRemainingGuesses()\n"
+" {\n"
+" return remainingGuesses;\n"
+" }\n"
+" \n"
+" public String check()\n"
+" {\n"
+" if (guess>number)\n"
+" {\n"
+" biggest = guess - 1;\n"
+" }\n"
+" if (guess<number)\n"
+" {\n"
+" smallest = guess + 1;\n"
+" }\n"
+" if (guess == number)\n"
+" {\n"
+" FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(\"Correct!\"));\n"
+" }\n"
+" remainingGuesses--;\n"
+" return null;\n"
+" }\n"
+" \n"
+" @PostConstruct\n"
+" public void reset()\n"
+" {\n"
+" this.smallest = 0;\n"
+" this.guess = 0;\n"
+" this.remainingGuesses = 10;\n"
+" this.number = manager.getInstanceByType(Integer.class, new AnnotationLiteral<Random>(){});\n"
+" }\n"
+" \n"
+"}]]>"
#. Tag: title
#: ri.xml:344
#, no-c-format
msgid "The translator example"
-msgstr ""
+msgstr "O exemplo translator"
#. Tag: para
#: ri.xml:346
#, no-c-format
-msgid ""
-"The translator example will take any sentences you enter, and translate them "
-"to Latin."
+msgid "The translator example will take any sentences you enter, and translate them to Latin."
msgstr ""
#. Tag: para
#: ri.xml:351
#, no-c-format
-msgid ""
-"The translator example is built as an ear, and contains EJBs. As a result, "
-"it's structure is more complex than the numberguess example."
+msgid "The translator example is built as an ear, and contains EJBs. As a result, it's structure is more complex than the numberguess example."
msgstr ""
#. Tag: para
#: ri.xml:357
#, no-c-format
-msgid ""
-"EJB 3.1 and Jave EE 6 allow you to package EJBs in a war, which will make "
-"this structure much simpler!"
+msgid "EJB 3.1 and Jave EE 6 allow you to package EJBs in a war, which will make this structure much simpler!"
msgstr ""
#. Tag: para
#: ri.xml:363
#, no-c-format
-msgid ""
-"First, let's take a look at the ear aggregator, which is located in "
-"<literal>webbeans-translator-ear</literal> module. Maven automatically "
-"generates the <literal>application.xml</literal> for us:"
+msgid "First, let's take a look at the ear aggregator, which is located in <literal>webbeans-translator-ear</literal> module. Maven automatically generates the <literal>application.xml</literal> for us:"
msgstr ""
#. Tag: programlisting
@@ -721,22 +817,30 @@
" </configuration>\n"
"</plugin>]]>"
msgstr ""
+"<![CDATA[<plugin>\n"
+" <groupId>org.apache.maven.plugins</groupId>\n"
+" <artifactId>maven-ear-plugin</artifactId>\n"
+" <configuration>\n"
+" <modules>\n"
+" <webModule>\n"
+" <groupId>org.jboss.webbeans.examples.translator</groupId>\n"
+" <artifactId>webbeans-translator-war</artifactId>\n"
+" <contextRoot>/webbeans-translator</contextRoot>\n"
+" </webModule>\n"
+" </modules>\n"
+" </configuration>\n"
+"</plugin>]]>"
#. Tag: para
#: ri.xml:371
#, no-c-format
-msgid ""
-"Here we set the context path, which gives us a nice url (<ulink url=\"http://"
-"localhost:8080/webbeans-translator\">http://localhost:8080/webbeans-"
-"translator</ulink>)."
+msgid "Here we set the context path, which gives us a nice url (<ulink url=\"http://localhost:8080/webbeans-translator\">http://localhost:8080/webbeans-translator</ulink>)."
msgstr ""
#. Tag: para
#: ri.xml:377
#, no-c-format
-msgid ""
-"If you aren't using Maven to generate these files, you would need "
-"<literal>META-INF/application.xml</literal>:"
+msgid "If you aren't using Maven to generate these files, you would need <literal>META-INF/application.xml</literal>:"
msgstr ""
#. Tag: programlisting
@@ -746,12 +850,10 @@
"<![CDATA[<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<application xmlns=\"http://java.sun.com/xml/ns/javaee\" \n"
" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
-" xsi:schemaLocation=\"http://java.sun.com/xml/ns/javaee http://"
-"java.sun.com/xml/ns/javaee/application_5.xsd\"\n"
+" xsi:schemaLocation=\"http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd\"\n"
" version=\"5\">\n"
" <display-name>webbeans-translator-ear</display-name>\n"
-" <description>Ear Example for the reference implementation of JSR 299: Web "
-"Beans</description>\n"
+" <description>Ear Example for the reference implementation of JSR 299: Web Beans</description>\n"
" \n"
" <module>\n"
" <web>\n"
@@ -764,23 +866,35 @@
" </module>\n"
"</application>]]>"
msgstr ""
+"<![CDATA[<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+"<application xmlns=\"http://java.sun.com/xml/ns/javaee\" \n"
+" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
+" xsi:schemaLocation=\"http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd\"\n"
+" version=\"5\">\n"
+" <display-name>webbeans-translator-ear</display-name>\n"
+" <description>Ear Example for the reference implementation of JSR 299: Web Beans</description>\n"
+" \n"
+" <module>\n"
+" <web>\n"
+" <web-uri>webbeans-translator.war</web-uri>\n"
+" <context-root>/webbeans-translator</context-root>\n"
+" </web>\n"
+" </module>\n"
+" <module>\n"
+" <ejb>webbeans-translator.jar</ejb>\n"
+" </module>\n"
+"</application>]]>"
#. Tag: para
#: ri.xml:385
#, no-c-format
-msgid ""
-"Next, lets look at the war. Just as in the numberguess example, we have a "
-"<literal>faces-config.xml</literal> (to enabled Facelets) and a <literal>web."
-"xml</literal> (to enable JSF) in <literal>WebContent/WEB-INF</literal>."
+msgid "Next, lets look at the war. Just as in the numberguess example, we have a <literal>faces-config.xml</literal> (to enabled Facelets) and a <literal>web.xml</literal> (to enable JSF) in <literal>WebContent/WEB-INF</literal>."
msgstr ""
#. Tag: para
#: ri.xml:392
#, no-c-format
-msgid ""
-"More intersting is the facelet used to translate text. Just as in the "
-"numberguess example we have a template, which surrounds the form (ommitted "
-"here for brevity):"
+msgid "More intersting is the facelet used to translate text. Just as in the numberguess example we have a template, which surrounds the form (ommitted here for brevity):"
msgstr ""
#. Tag: programlisting
@@ -800,8 +914,7 @@
" </tr>\n"
" <tr>\n"
" <td>\n"
-" <h:inputTextarea id=\"text\" value=\"#{translator.text}\" "
-"required=\"true\" rows=\"5\" cols=\"80\" />\n"
+" <h:inputTextarea id=\"text\" value=\"#{translator.text}\" required=\"true\" rows=\"5\" cols=\"80\" />\n"
" </td>\n"
" <td>\n"
" <h:outputText value=\"#{translator.translatedText}\" />\n"
@@ -809,50 +922,59 @@
" </tr>\n"
" </table>\n"
" <div>\n"
-" <h:commandButton id=\"button\" value=\"Translate\" action=\"#"
-"{translator.translate}\"/>\n"
+" <h:commandButton id=\"button\" value=\"Translate\" action=\"#{translator.translate}\"/>\n"
" </div>\n"
" \n"
"</h:form>]]>"
msgstr ""
+"<![CDATA[<h:form id=\"NumberGuessMain\">\n"
+" \n"
+" <table>\n"
+" <tr align=\"center\" style=\"font-weight: bold\" >\n"
+" <td>\n"
+" Your text\n"
+" </td>\n"
+" <td>\n"
+" Translation\n"
+" </td>\n"
+" </tr>\n"
+" <tr>\n"
+" <td>\n"
+" <h:inputTextarea id=\"text\" value=\"#{translator.text}\" required=\"true\" rows=\"5\" cols=\"80\" />\n"
+" </td>\n"
+" <td>\n"
+" <h:outputText value=\"#{translator.translatedText}\" />\n"
+" </td>\n"
+" </tr>\n"
+" </table>\n"
+" <div>\n"
+" <h:commandButton id=\"button\" value=\"Translate\" action=\"#{translator.translate}\"/>\n"
+" </div>\n"
+" \n"
+"</h:form>]]>"
#. Tag: para
#: ri.xml:400
#, no-c-format
-msgid ""
-"The user can enter some text in the lefthand textarea, and hit the translate "
-"button to see the result to the right."
+msgid "The user can enter some text in the lefthand textarea, and hit the translate button to see the result to the right."
msgstr ""
#. Tag: para
#: ri.xml:405
#, no-c-format
-msgid ""
-"Finally, let's look at the ejb module, <literal>webbeans-translator-ejb</"
-"literal>. In <literal>src/main/resources/META-INF</literal> there is just an "
-"empty <literal>web-beans.xml</literal>, used to mark the archive as "
-"containing Web Beans."
+msgid "Finally, let's look at the ejb module, <literal>webbeans-translator-ejb</literal>. In <literal>src/main/resources/META-INF</literal> there is just an empty <literal>web-beans.xml</literal>, used to mark the archive as containing Web Beans."
msgstr ""
#. Tag: para
#: ri.xml:413
#, no-c-format
-msgid ""
-"We've saved the most interesting bit to last, the code! The project has two "
-"simple beans, <literal>SentenceParser</literal> and <literal>TextTranslator</"
-"literal> and two enterprise beans, <literal>TranslatorControllerBean</"
-"literal> and <literal>SentenceTranslator</literal>. You should be getting "
-"quite familiar with what a Web Bean looks like by now, so we'll just "
-"highlight the most interesting bits here."
+msgid "We've saved the most interesting bit to last, the code! The project has two simple beans, <literal>SentenceParser</literal> and <literal>TextTranslator</literal> and two enterprise beans, <literal>TranslatorControllerBean</literal> and <literal>SentenceTranslator</literal>. You should be getting quite familiar with what a Web Bean looks like by now, so we'll just highlight the most interesting bits here."
msgstr ""
#. Tag: para
#: ri.xml:423
#, no-c-format
-msgid ""
-"Both <literal>SentenceParser</literal> and <literal>TextTranslator</literal> "
-"are dependent beans, and <literal>TextTranslator</literal> uses constructor "
-"initialization:"
+msgid "Both <literal>SentenceParser</literal> and <literal>TextTranslator</literal> are dependent beans, and <literal>TextTranslator</literal> uses constructor initialization:"
msgstr ""
#. Tag: programlisting
@@ -864,29 +986,47 @@
" private Translator sentenceTranslator; \n"
" \n"
" @Initializer\n"
-" TextTranslator(SentenceParser sentenceParser, Translator "
-"sentenceTranslator) \n"
+" TextTranslator(SentenceParser sentenceParser, Translator sentenceTranslator) \n"
" { \n"
" this.sentenceParser = sentenceParser; \n"
" this.sentenceTranslator = sentenceTranslator;]]>"
msgstr ""
+"<![CDATA[<h:form id=\"NumberGuessMain\">\n"
+" \n"
+" <table>\n"
+" <tr align=\"center\" style=\"font-weight: bold\" >\n"
+" <td>\n"
+" Your text\n"
+" </td>\n"
+" <td>\n"
+" Translation\n"
+" </td>\n"
+" </tr>\n"
+" <tr>\n"
+" <td>\n"
+" <h:inputTextarea id=\"text\" value=\"#{translator.text}\" required=\"true\" rows=\"5\" cols=\"80\" />\n"
+" </td>\n"
+" <td>\n"
+" <h:outputText value=\"#{translator.translatedText}\" />\n"
+" </td>\n"
+" </tr>\n"
+" </table>\n"
+" <div>\n"
+" <h:commandButton id=\"button\" value=\"Translate\" action=\"#{translator.translate}\"/>\n"
+" </div>\n"
+" \n"
+"</h:form>]]>"
#. Tag: para
#: ri.xml:431
#, no-c-format
-msgid ""
-"<literal>TextTranslator</literal> is a stateless bean (with a local business "
-"interface), where the magic happens - of course, we couldn't develop a full "
-"translator, but we gave it a good go!"
+msgid "<literal>TextTranslator</literal> is a stateless bean (with a local business interface), where the magic happens - of course, we couldn't develop a full translator, but we gave it a good go!"
msgstr ""
#. Tag: para
#: ri.xml:437
#, no-c-format
-msgid ""
-"Finally, there is UI orientated controller, that collects the text from the "
-"user, and dispatches it to the translator. This is a request scoped, named, "
-"stateful session bean, which injects the translator."
+msgid "Finally, there is UI orientated controller, that collects the text from the user, and dispatches it to the translator. This is a request scoped, named, stateful session bean, which injects the translator."
msgstr ""
#. Tag: programlisting
@@ -901,6 +1041,13 @@
" \n"
" @Current TextTranslator translator;]]>"
msgstr ""
+"<![CDATA[@Stateful\n"
+"@RequestScoped\n"
+"@Named(\"translator\")\n"
+"public class TranslatorControllerBean implements TranslatorController\n"
+"{\n"
+" \n"
+" @Current TextTranslator translator;]]>"
#. Tag: para
#: ri.xml:445
@@ -924,29 +1071,27 @@
" \n"
" }]]>"
msgstr ""
+"<![CDATA[ @Remove\n"
+" public void remove()\n"
+" {\n"
+" \n"
+" }]]>"
#. Tag: para
#: ri.xml:455
#, no-c-format
-msgid ""
-"The Web Beans manager will call the remove method for you when the bean is "
-"destroyed; in this case at the end of the request."
+msgid "The Web Beans manager will call the remove method for you when the bean is destroyed; in this case at the end of the request."
msgstr ""
#. Tag: para
#: ri.xml:461
#, no-c-format
-msgid ""
-"That concludes our short tour of the Web Beans RI examples. For more on the "
-"RI, or to help out, please visit <ulink url=\"http://www.seamframework.org/"
-"WebBeans/Development\">http://www.seamframework.org/WebBeans/Development</"
-"ulink>."
+msgid "That concludes our short tour of the Web Beans RI examples. For more on the RI, or to help out, please visit <ulink url=\"http://www.seamframework.org/WebBeans/Development\">http://www.seamframework.org/WebBeans/Development</ulink>."
msgstr ""
#. Tag: para
#: ri.xml:467
#, no-c-format
-msgid ""
-"We need help in all areas - bug fixing, writing new features, writing "
-"examples and translating this reference guide."
+msgid "We need help in all areas - bug fixing, writing new features, writing examples and translating this reference guide."
msgstr ""
+
Modified: doc/trunk/reference/pt-BR/scopescontexts.po
===================================================================
--- doc/trunk/reference/pt-BR/scopescontexts.po 2009-02-28 14:04:13 UTC (rev 1744)
+++ doc/trunk/reference/pt-BR/scopescontexts.po 2009-03-01 00:42:05 UTC (rev 1745)
@@ -6,8 +6,8 @@
"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-06 11:30+0000\n"
-"PO-Revision-Date: 2009-01-06 11:30+0000\n"
-"Last-Translator: Automatically generated\n"
+"PO-Revision-Date: 2009-02-28 15:09-0300\n"
+"Last-Translator: João Paulo Viragine <joao.viragine(a)redhat.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -17,62 +17,48 @@
#: scopescontexts.xml:4
#, no-c-format
msgid "Scopes and contexts"
-msgstr ""
+msgstr "Escopos e contextos"
#. Tag: para
#: scopescontexts.xml:6
#, no-c-format
-msgid ""
-"So far, we've seen a few examples of <emphasis>scope type annotations</"
-"emphasis>. The scope of a Web Bean determines the lifecycle of instances of "
-"the Web Bean. The scope also determines which clients refer to which "
-"instances of the Web Bean. According to the Web Beans specification, a scope "
-"determines:"
-msgstr ""
+msgid "So far, we've seen a few examples of <emphasis>scope type annotations</emphasis>. The scope of a Web Bean determines the lifecycle of instances of the Web Bean. The scope also determines which clients refer to which instances of the Web Bean. According to the Web Beans specification, a scope determines:"
+msgstr " "
#. Tag: para
#: scopescontexts.xml:14
#, no-c-format
msgid "When a new instance of any Web Bean with that scope is created"
-msgstr ""
+msgstr "Quando uma nova instância de qualquer Web Bean com esse escopo é criada"
#. Tag: para
#: scopescontexts.xml:17
#, no-c-format
msgid "When an existing instance of any Web Bean with that scope is destroyed"
-msgstr ""
+msgstr "Quando uma instância de qualquer Web Bean com esse escopo é destruído"
#. Tag: para
#: scopescontexts.xml:20
#, no-c-format
-msgid ""
-"Which injected references refer to any instance of a Web Bean with that scope"
+msgid "Which injected references refer to any instance of a Web Bean with that scope"
msgstr ""
#. Tag: para
#: scopescontexts.xml:25
#, no-c-format
-msgid ""
-"For example, if we have a session scoped Web Bean, <literal>CurrentUser</"
-"literal>, all Web Beans that are called in the context of the same "
-"<literal>HttpSession</literal> will see the same instance of "
-"<literal>CurrentUser</literal>. This instance will be automatically created "
-"the first time a <literal>CurrentUser</literal> is needed in that session, "
-"and automatically destroyed when the session ends."
+msgid "For example, if we have a session scoped Web Bean, <literal>CurrentUser</literal>, all Web Beans that are called in the context of the same <literal>HttpSession</literal> will see the same instance of <literal>CurrentUser</literal>. This instance will be automatically created the first time a <literal>CurrentUser</literal> is needed in that session, and automatically destroyed when the session ends."
msgstr ""
#. Tag: title
#: scopescontexts.xml:32
#, no-c-format
msgid "Scope types"
-msgstr ""
+msgstr "Tipos de escopo"
#. Tag: para
#: scopescontexts.xml:34
#, no-c-format
-msgid ""
-"Web Beans features an <emphasis>extensible context model</emphasis>. It is "
-"possible to define new scopes by creating a new scope type annotation:"
+msgid "Web Beans features an <emphasis>extensible context model</emphasis>. It is possible to define new scopes by creating a new scope type annotation:"
msgstr ""
#. Tag: programlisting
@@ -84,23 +70,21 @@
"@ScopeType\n"
"public @interface ClusterScoped {}]]>"
msgstr ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"@Target({TYPE, METHOD})\n"
+"@ScopeType\n"
+"public @interface ClusterScoped {}]]>"
#. Tag: para
#: scopescontexts.xml:39
#, no-c-format
-msgid ""
-"Of course, that's the easy part of the job. For this scope type to be "
-"useful, we will also need to define a <literal>Context</literal> object that "
-"implements the scope! Implementing a <literal>Context</literal> is usually a "
-"very technical task, intended for framework development only."
+msgid "Of course, that's the easy part of the job. For this scope type to be useful, we will also need to define a <literal>Context</literal> object that implements the scope! Implementing a <literal>Context</literal> is usually a very technical task, intended for framework development only."
msgstr ""
#. Tag: para
#: scopescontexts.xml:44
#, no-c-format
-msgid ""
-"We can apply a scope type annotation to a Web Bean implementation class to "
-"specify the scope of the Web Bean:"
+msgid "We can apply a scope type annotation to a Web Bean implementation class to specify the scope of the Web Bean:"
msgstr ""
#. Tag: programlisting
@@ -110,6 +94,8 @@
"<![CDATA[@ClusterScoped\n"
"public class SecondLevelCache { ... }]]>"
msgstr ""
+"<![CDATA[@ClusterScoped\n"
+"public class SecondLevelCache { ... }]]>"
#. Tag: para
#: scopescontexts.xml:58
@@ -121,69 +107,67 @@
#: scopescontexts.xml:63
#, no-c-format
msgid "Built-in scopes"
-msgstr ""
+msgstr "Escopos pré-definidos"
#. Tag: para
#: scopescontexts.xml:65
#, no-c-format
msgid "Web Beans defines four built-in scopes:"
-msgstr ""
+msgstr "A Web Beans pré-define quatro tipo de escopos:"
#. Tag: literal
#: scopescontexts.xml:69
#, no-c-format
msgid "@RequestScoped"
-msgstr ""
+msgstr "@RequestScoped"
#. Tag: literal
#: scopescontexts.xml:72
#, no-c-format
msgid "@SessionScoped"
-msgstr ""
+msgstr "@SessionScoped"
#. Tag: literal
#: scopescontexts.xml:75
#, no-c-format
msgid "@ApplicationScoped"
-msgstr ""
+msgstr "@ApplicationScoped"
#. Tag: literal
#: scopescontexts.xml:78
#, no-c-format
msgid "@ConversationScoped"
-msgstr ""
+msgstr "@ConversationScoped"
#. Tag: para
#: scopescontexts.xml:82
#, no-c-format
msgid "For a web application that uses Web Beans:"
-msgstr ""
+msgstr "Para uma aplicação web que utiliza Web Beans:"
#. Tag: para
#: scopescontexts.xml:86
#, no-c-format
-msgid ""
-"any servlet request has access to active request, session and application "
-"scopes, and, additionally"
-msgstr ""
+msgid "any servlet request has access to active request, session and application scopes, and, additionally"
+msgstr "qualquer requisição servlet tem acesso aos escopos de requisição, sessão e aplicação ativos, e, adicionalmente"
#. Tag: para
#: scopescontexts.xml:90
#, no-c-format
msgid "any JSF request has access to an active conversation scope."
-msgstr ""
+msgstr "qualquer requisição JSF tem acesso ao escopo de conversação ativo."
#. Tag: para
#: scopescontexts.xml:94
#, no-c-format
msgid "The request and application scopes are also active:"
-msgstr ""
+msgstr "Os escopos de request e aplicação também estão disponíveis:"
#. Tag: para
#: scopescontexts.xml:98
#, no-c-format
msgid "during invocations of EJB remote methods,"
-msgstr ""
+msgstr "durante invocações de métodos remotos de EJB,"
#. Tag: para
#: scopescontexts.xml:101
@@ -201,114 +185,84 @@
#: scopescontexts.xml:107
#, no-c-format
msgid "during web service invocations."
-msgstr ""
+msgstr "durante a invocação de um web service"
#. Tag: para
#: scopescontexts.xml:111
#, no-c-format
-msgid ""
-"If the application tries to invoke a Web Bean with a scope that does not "
-"have an active context, a <literal>ContextNotActiveException</literal> is "
-"thrown by the Web Bean manager at runtime."
+msgid "If the application tries to invoke a Web Bean with a scope that does not have an active context, a <literal>ContextNotActiveException</literal> is thrown by the Web Bean manager at runtime."
msgstr ""
#. Tag: para
#: scopescontexts.xml:115
#, no-c-format
-msgid ""
-"Three of the four built-in scopes should be extremely familiar to every Java "
-"EE developer, so let's not waste time discussing them here. One of the "
-"scopes, however, is new."
+msgid "Three of the four built-in scopes should be extremely familiar to every Java EE developer, so let's not waste time discussing them here. One of the scopes, however, is new."
msgstr ""
#. Tag: title
#: scopescontexts.xml:122
#, no-c-format
msgid "The conversation scope"
-msgstr ""
+msgstr "O escopo de conversação"
#. Tag: para
#: scopescontexts.xml:124
#, no-c-format
-msgid ""
-"The Web Beans conversation scope is a bit like the traditional session scope "
-"in that it holds state associated with a user of the system, and spans "
-"multiple requests to the server. However, unlike the session scope, the "
-"conversation scope:"
+msgid "The Web Beans conversation scope is a bit like the traditional session scope in that it holds state associated with a user of the system, and spans multiple requests to the server. However, unlike the session scope, the conversation scope:"
msgstr ""
#. Tag: para
#: scopescontexts.xml:130
#, no-c-format
msgid "is demarcated explicitly by the application, and"
-msgstr ""
+msgstr "é demarcado explicitamente pela aplicação, e"
#. Tag: para
#: scopescontexts.xml:133
#, no-c-format
-msgid ""
-"holds state associated with a particular web browser tab in a JSF "
-"application."
+msgid "holds state associated with a particular web browser tab in a JSF application."
msgstr ""
#. Tag: para
#: scopescontexts.xml:138
#, no-c-format
-msgid ""
-"A conversation represents a task, a unit of work from the point of view of "
-"the user. The conversation context holds state associated with what the user "
-"is currently working on. If the user is doing multiple things at the same "
-"time, there are multiple conversations."
+msgid "A conversation represents a task, a unit of work from the point of view of the user. The conversation context holds state associated with what the user is currently working on. If the user is doing multiple things at the same time, there are multiple conversations."
msgstr ""
#. Tag: para
#: scopescontexts.xml:143
#, no-c-format
-msgid ""
-"The conversation context is active during any JSF request. However, most "
-"conversations are destroyed at the end of the request. If a conversation "
-"should hold state across multiple requests, it must be explicitly promoted "
-"to a <emphasis>long-running conversation</emphasis>."
+msgid "The conversation context is active during any JSF request. However, most conversations are destroyed at the end of the request. If a conversation should hold state across multiple requests, it must be explicitly promoted to a <emphasis>long-running conversation</emphasis>."
msgstr ""
#. Tag: title
#: scopescontexts.xml:149
#, no-c-format
msgid "Conversation demarcation"
-msgstr ""
+msgstr "Demarcação de contexto"
#. Tag: para
#: scopescontexts.xml:151
#, no-c-format
-msgid ""
-"Web Beans provides a built-in Web Bean for controlling the lifecyle of "
-"conversations in a JSF application. This Web Bean may be obtained by "
-"injection:"
+msgid "Web Beans provides a built-in Web Bean for controlling the lifecyle of conversations in a JSF application. This Web Bean may be obtained by injection:"
msgstr ""
#. Tag: programlisting
#: scopescontexts.xml:154
#, no-c-format
msgid "@Current Conversation conversation;"
-msgstr ""
+msgstr "@Current Conversation conversation;"
#. Tag: para
#: scopescontexts.xml:156
#, no-c-format
-msgid ""
-"To promote the conversation associated with the current request to a long-"
-"running conversation, call the <literal>begin()</literal> method from "
-"application code. To schedule the current long-running conversation context "
-"for destruction at the end of the current request, call <literal>end()</"
-"literal>."
+msgid "To promote the conversation associated with the current request to a long-running conversation, call the <literal>begin()</literal> method from application code. To schedule the current long-running conversation context for destruction at the end of the current request, call <literal>end()</literal>."
msgstr ""
#. Tag: para
#: scopescontexts.xml:161
#, no-c-format
-msgid ""
-"In the following example, a conversation-scoped Web Bean controls the "
-"conversation with which it is associated:"
+msgid "In the following example, a conversation-scoped Web Bean controls the conversation with which it is associated:"
msgstr ""
#. Tag: programlisting
@@ -350,37 +304,25 @@
#. Tag: para
#: scopescontexts.xml:166
#, no-c-format
-msgid ""
-"This Web Bean is able to control its own lifecycle through use of the "
-"<literal>Conversation</literal> API. But some other Web Beans have a "
-"lifecycle which depends completely upon another object."
+msgid "This Web Bean is able to control its own lifecycle through use of the <literal>Conversation</literal> API. But some other Web Beans have a lifecycle which depends completely upon another object."
msgstr ""
#. Tag: title
#: scopescontexts.xml:173
#, no-c-format
msgid "Conversation propagation"
-msgstr ""
+msgstr "Propagação de conversação"
#. Tag: para
#: scopescontexts.xml:175
#, no-c-format
-msgid ""
-"The conversation context automatically propagates with any JSF faces request "
-"(JSF form submission). It does not automatically propagate with non-faces "
-"requests, for example, navigation via a link."
+msgid "The conversation context automatically propagates with any JSF faces request (JSF form submission). It does not automatically propagate with non-faces requests, for example, navigation via a link."
msgstr ""
#. Tag: para
#: scopescontexts.xml:179
#, no-c-format
-msgid ""
-"We can force the conversation to propagate with a non-faces request by "
-"including the unique identifier of the conversation as a request parameter. "
-"The Web Beans specification reserves the request parameter named "
-"<literal>cid</literal> for this use. The unique identifier of the "
-"conversation may be obtained from the <literal>Conversation</literal> "
-"object, which has the Web Beans name <literal>conversation</literal>."
+msgid "We can force the conversation to propagate with a non-faces request by including the unique identifier of the conversation as a request parameter. The Web Beans specification reserves the request parameter named <literal>cid</literal> for this use. The unique identifier of the conversation may be obtained from the <literal>Conversation</literal> object, which has the Web Beans name <literal>conversation</literal>."
msgstr ""
#. Tag: para
@@ -392,20 +334,13 @@
#. Tag: programlisting
#: scopescontexts.xml:188
#, no-c-format
-msgid ""
-"<![CDATA[<a href=\"/addProduct.jsp?cid=#{conversation.id}\">Add Product</a>]]"
-">"
-msgstr ""
+msgid "<![CDATA[<a href=\"/addProduct.jsp?cid=#{conversation.id}\">Add Product</a>]]>"
+msgstr "<![CDATA[<a href=\"/addProduct.jsp?cid=#{conversation.id}\">Add Product</a>]]>"
#. Tag: para
#: scopescontexts.xml:190
#, no-c-format
-msgid ""
-"The Web Bean manager is also required to propagate conversations across any "
-"redirect, even if the conversation is not marked long-running. This makes it "
-"very easy to implement the common POST-then-redirect pattern, without resort "
-"to fragile constructs such as a \"flash\" object. In this case, the Web Bean "
-"manager automatically adds a request parameter to the redirect URL."
+msgid "The Web Bean manager is also required to propagate conversations across any redirect, even if the conversation is not marked long-running. This makes it very easy to implement the common POST-then-redirect pattern, without resort to fragile constructs such as a \"flash\" object. In this case, the Web Bean manager automatically adds a request parameter to the redirect URL."
msgstr ""
#. Tag: title
@@ -417,28 +352,20 @@
#. Tag: para
#: scopescontexts.xml:202
#, no-c-format
-msgid ""
-"The Web Bean manager is permitted to destroy a conversation and all state "
-"held in its context at any time in order to preserve resources. A Web Bean "
-"manager implementation will normally do this on the basis of some kind of "
-"timeout — though this is not required by the Web Beans specification. The "
-"timeout is the period of inactivity before the conversation is destroyed."
+msgid "The Web Bean manager is permitted to destroy a conversation and all state held in its context at any time in order to preserve resources. A Web Bean manager implementation will normally do this on the basis of some kind of timeout — though this is not required by the Web Beans specification. The timeout is the period of inactivity before the conversation is destroyed."
msgstr ""
#. Tag: para
#: scopescontexts.xml:208
#, no-c-format
-msgid ""
-"The <literal>Conversation</literal> object provides a method to set the "
-"timeout. This is a hint to the Web Bean manager, which is free to ignore the "
-"setting."
+msgid "The <literal>Conversation</literal> object provides a method to set the timeout. This is a hint to the Web Bean manager, which is free to ignore the setting."
msgstr ""
#. Tag: programlisting
#: scopescontexts.xml:212
#, no-c-format
msgid "conversation.setTimeout(timeoutInMillis);"
-msgstr ""
+msgstr "conversation.setTimeout(timeoutInMillis);"
#. Tag: title
#: scopescontexts.xml:219
@@ -449,90 +376,67 @@
#. Tag: para
#: scopescontexts.xml:221
#, no-c-format
-msgid ""
-"In addition to the four built-in scopes, Web Beans features the so-called "
-"<emphasis>dependent pseudo-scope</emphasis>. This is the default scope for a "
-"Web Bean which does not explicitly declare a scope type."
+msgid "In addition to the four built-in scopes, Web Beans features the so-called <emphasis>dependent pseudo-scope</emphasis>. This is the default scope for a Web Bean which does not explicitly declare a scope type."
msgstr ""
#. Tag: para
#: scopescontexts.xml:225
#, no-c-format
-msgid ""
-"For example, this Web Bean has the scope type <literal>@Dependent</literal>:"
+msgid "For example, this Web Bean has the scope type <literal>@Dependent</literal>:"
msgstr ""
#. Tag: programlisting
#: scopescontexts.xml:227
#, no-c-format
msgid "<![CDATA[public class Calculator { ... }]]>"
-msgstr ""
+msgstr "<![CDATA[public class Calculator { ... }]]>"
#. Tag: para
#: scopescontexts.xml:229
#, no-c-format
-msgid ""
-"When an injection point of a Web Bean resolves to a dependent Web Bean, a "
-"new instance of the dependent Web Bean is created every time the first Web "
-"Bean is instantiated. Instances of dependent Web Beans are never shared "
-"between different Web Beans or different injection points. They are "
-"<emphasis>dependent objects</emphasis> of some other Web Bean instance."
+msgid "When an injection point of a Web Bean resolves to a dependent Web Bean, a new instance of the dependent Web Bean is created every time the first Web Bean is instantiated. Instances of dependent Web Beans are never shared between different Web Beans or different injection points. They are <emphasis>dependent objects</emphasis> of some other Web Bean instance."
msgstr ""
#. Tag: para
#: scopescontexts.xml:235
#, no-c-format
-msgid ""
-"Dependent Web Bean instances are destroyed when the instance they depend "
-"upon is destroyed."
+msgid "Dependent Web Bean instances are destroyed when the instance they depend upon is destroyed."
msgstr ""
#. Tag: para
#: scopescontexts.xml:243
#, no-c-format
-msgid ""
-"Web Beans makes it easy to obtain a dependent instance of a Java class or "
-"EJB bean, even if the class or EJB bean is already declared as a Web Bean "
-"with some other scope type."
+msgid "Web Beans makes it easy to obtain a dependent instance of a Java class or EJB bean, even if the class or EJB bean is already declared as a Web Bean with some other scope type."
msgstr ""
#. Tag: title
#: scopescontexts.xml:248
#, no-c-format
msgid "The <literal>@New</literal> annotation"
-msgstr ""
+msgstr "A anotação <literal>@New</literal> "
#. Tag: para
#: scopescontexts.xml:250
#, no-c-format
-msgid ""
-"The built-in <literal>@New</literal> binding annotation allows "
-"<emphasis>implicit</emphasis> definition of a dependent Web Bean at an "
-"injection point. Suppose we declare the following injected field:"
+msgid "The built-in <literal>@New</literal> binding annotation allows <emphasis>implicit</emphasis> definition of a dependent Web Bean at an injection point. Suppose we declare the following injected field:"
msgstr ""
#. Tag: programlisting
#: scopescontexts.xml:254
#, no-c-format
msgid "<![CDATA[@New Calculator calculator;]]>"
-msgstr ""
+msgstr "<![CDATA[@New Calculator calculator;]]>"
#. Tag: para
#: scopescontexts.xml:256
#, no-c-format
-msgid ""
-"Then a Web Bean with scope <literal>@Dependent</literal>, binding type "
-"<literal>@New</literal>, API type <literal>Calculator</literal>, "
-"implementation class <literal>Calculator</literal> and deployment type "
-"<literal>@Standard</literal> is implicitly defined."
+msgid "Then a Web Bean with scope <literal>@Dependent</literal>, binding type <literal>@New</literal>, API type <literal>Calculator</literal>, implementation class <literal>Calculator</literal> and deployment type <literal>@Standard</literal> is implicitly defined."
msgstr ""
#. Tag: para
#: scopescontexts.xml:261
#, no-c-format
-msgid ""
-"This is true even if <literal>Calculator</literal> is <emphasis>already</"
-"emphasis> declared with a different scope type, for example:"
+msgid "This is true even if <literal>Calculator</literal> is <emphasis>already</emphasis> declared with a different scope type, for example:"
msgstr ""
#. Tag: programlisting
@@ -542,13 +446,13 @@
"<![CDATA[@ConversationScoped\n"
"public class Calculator { ... }]]>"
msgstr ""
+"<![CDATA[@ConversationScoped\n"
+"public class Calculator { ... }]]>"
#. Tag: para
#: scopescontexts.xml:266
#, no-c-format
-msgid ""
-"So the following injected attributes each get a different instance of "
-"<literal>Calculator</literal>:"
+msgid "So the following injected attributes each get a different instance of <literal>Calculator</literal>:"
msgstr ""
#. Tag: programlisting
@@ -562,21 +466,22 @@
"\n"
"}]]>"
msgstr ""
+"<![CDATA[public class PaymentCalc {\n"
+"\n"
+" @Current Calculator calculator;\n"
+" @New Calculator newCalculator;\n"
+"\n"
+"}]]>"
#. Tag: para
#: scopescontexts.xml:271
#, no-c-format
-msgid ""
-"The <literal>calculator</literal> field has a conversation-scoped instance "
-"of <literal>Calculator</literal> injected. The <literal>newCalculator</"
-"literal> field has a new instance of <literal>Calculator</literal> injected, "
-"with a lifecycle that is bound to the owning <literal>PaymentCalc</literal>."
+msgid "The <literal>calculator</literal> field has a conversation-scoped instance of <literal>Calculator</literal> injected. The <literal>newCalculator</literal> field has a new instance of <literal>Calculator</literal> injected, with a lifecycle that is bound to the owning <literal>PaymentCalc</literal>."
msgstr ""
#. Tag: para
#: scopescontexts.xml:276
#, no-c-format
-msgid ""
-"This feature is particularly useful with producer methods, as we'll see in "
-"the next chapter."
-msgstr ""
+msgid "This feature is particularly useful with producer methods, as we'll see in the next chapter."
+msgstr "Essa funcionalidade é particularmente útil em métodos produtores, como poderemos verificar no próximo capítulo. "
+
Modified: doc/trunk/reference/pt-BR/specialization.po
===================================================================
--- doc/trunk/reference/pt-BR/specialization.po 2009-02-28 14:04:13 UTC (rev 1744)
+++ doc/trunk/reference/pt-BR/specialization.po 2009-03-01 00:42:05 UTC (rev 1745)
@@ -6,8 +6,8 @@
"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-06 11:30+0000\n"
-"PO-Revision-Date: 2009-01-06 11:30+0000\n"
-"Last-Translator: Automatically generated\n"
+"PO-Revision-Date: 2009-02-28 15:10-0300\n"
+"Last-Translator: João Paulo Viragine <joao.viragine(a)redhat.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -17,16 +17,12 @@
#: specialization.xml:4
#, no-c-format
msgid "Specialization"
-msgstr ""
+msgstr "Especialização"
#. Tag: para
#: specialization.xml:6
#, no-c-format
-msgid ""
-"We've already seen how the Web Beans dependency injection model lets us "
-"<emphasis>override</emphasis> the implementation of an API at deployment "
-"time. For example, the following enterprise Web Bean provides an "
-"implementation of the API <literal>PaymentProcessor</literal> in production:"
+msgid "We've already seen how the Web Beans dependency injection model lets us <emphasis>override</emphasis> the implementation of an API at deployment time. For example, the following enterprise Web Bean provides an implementation of the API <literal>PaymentProcessor</literal> in production:"
msgstr ""
#. Tag: programlisting
@@ -39,13 +35,16 @@
" ...\n"
"}"
msgstr ""
+"@CreditCard @Stateless\n"
+"public class CreditCardPaymentProcessor \n"
+" implements PaymentProcessor {\n"
+" ...\n"
+"}"
#. Tag: para
#: specialization.xml:13
#, no-c-format
-msgid ""
-"But in our staging environment, we override that implementation of "
-"<literal>PaymentProcessor</literal> with a different Web Bean:"
+msgid "But in our staging environment, we override that implementation of <literal>PaymentProcessor</literal> with a different Web Bean:"
msgstr ""
#. Tag: programlisting
@@ -58,102 +57,82 @@
" ...\n"
"}"
msgstr ""
+"@CreditCard @Stateless @Staging\n"
+"public class StagingCreditCardPaymentProcessor \n"
+" implements PaymentProcessor {\n"
+" ...\n"
+"}"
#. Tag: para
#: specialization.xml:18
#, no-c-format
-msgid ""
-"What we've tried to do with <literal>StagingCreditCardPaymentProcessor</"
-"literal> is to completely replace <literal>AsyncPaymentProcessor</literal> "
-"in a particular deployment of the system. In that deployment, the deployment "
-"type <literal>@Staging</literal> would have a higher priority than the "
-"default deployment type <literal>@Production</literal>, and therefore "
-"clients with the following injection point:"
+msgid "What we've tried to do with <literal>StagingCreditCardPaymentProcessor</literal> is to completely replace <literal>AsyncPaymentProcessor</literal> in a particular deployment of the system. In that deployment, the deployment type <literal>@Staging</literal> would have a higher priority than the default deployment type <literal>@Production</literal>, and therefore clients with the following injection point:"
msgstr ""
#. Tag: programlisting
#: specialization.xml:24
#, no-c-format
msgid "@CreditCard PaymentProcessor ccpp"
-msgstr ""
+msgstr "@CreditCard PaymentProcessor ccpp"
#. Tag: para
#: specialization.xml:26
#, no-c-format
-msgid ""
-"Would receive an instance of <literal>StagingCreditCardPaymentProcessor</"
-"literal>."
-msgstr ""
+msgid "Would receive an instance of <literal>StagingCreditCardPaymentProcessor</literal>."
+msgstr "Pode receber uma instância de <literal>StagingCreditCardPaymentProcessor</literal>."
#. Tag: para
#: specialization.xml:28
#, no-c-format
msgid "Unfortunately, there are several traps we can easily fall into:"
-msgstr ""
+msgstr "Infelizmente, existem várias armadilhas que podemos facilmente cair:"
#. Tag: para
#: specialization.xml:32
#, no-c-format
-msgid ""
-"the higher-priority Web Bean may not implement all the API types of the Web "
-"Bean that it attempts to override,"
+msgid "the higher-priority Web Bean may not implement all the API types of the Web Bean that it attempts to override,"
msgstr ""
#. Tag: para
#: specialization.xml:36
#, no-c-format
-msgid ""
-"the higher-priority Web Bean may not declare all the binding types of the "
-"Web Bean that it attempts to override,"
+msgid "the higher-priority Web Bean may not declare all the binding types of the Web Bean that it attempts to override,"
msgstr ""
#. Tag: para
#: specialization.xml:40
#, no-c-format
-msgid ""
-"the higher-priority Web Bean might not have the same name as the Web Bean "
-"that it attempts to override, or"
+msgid "the higher-priority Web Bean might not have the same name as the Web Bean that it attempts to override, or"
msgstr ""
#. Tag: para
#: specialization.xml:44
#, no-c-format
-msgid ""
-"the Web Bean that it attempts to override might declare a producer method, "
-"disposal method or observer method."
+msgid "the Web Bean that it attempts to override might declare a producer method, disposal method or observer method."
msgstr ""
#. Tag: para
#: specialization.xml:49
#, no-c-format
-msgid ""
-"In each of these cases, the Web Bean that we tried to override could still "
-"be called at runtime. Therefore, overriding is somewhat prone to developer "
-"error."
+msgid "In each of these cases, the Web Bean that we tried to override could still be called at runtime. Therefore, overriding is somewhat prone to developer error."
msgstr ""
#. Tag: para
#: specialization.xml:52
#, no-c-format
-msgid ""
-"Web Beans provides a special feature, called <emphasis>specialization</"
-"emphasis>, that helps the developer avoid these traps. Specialization looks "
-"a little esoteric at first, but it's easy to use in practice, and you'll "
-"really appreciate the extra security it provides."
+msgid "Web Beans provides a special feature, called <emphasis>specialization</emphasis>, that helps the developer avoid these traps. Specialization looks a little esoteric at first, but it's easy to use in practice, and you'll really appreciate the extra security it provides."
msgstr ""
#. Tag: title
#: specialization.xml:58
#, no-c-format
msgid "Using specialization"
-msgstr ""
+msgstr "Utilizando a especialização"
#. Tag: para
#: specialization.xml:60
#, no-c-format
-msgid ""
-"Specialization is a feature that is specific to simple and enterprise Web "
-"Beans. To make use of specialization, the higher-priority Web Bean must:"
+msgid "Specialization is a feature that is specific to simple and enterprise Web Beans. To make use of specialization, the higher-priority Web Bean must:"
msgstr ""
#. Tag: para
@@ -165,17 +144,14 @@
#. Tag: para
#: specialization.xml:68
#, no-c-format
-msgid ""
-"be a simple Web Bean if the Web Bean it overrides is a simple Web Bean or an "
-"enterprise Web Bean if the Web Bean it overrides is an enterprise Web Bean, "
-"and"
+msgid "be a simple Web Bean if the Web Bean it overrides is a simple Web Bean or an enterprise Web Bean if the Web Bean it overrides is an enterprise Web Bean, and"
msgstr ""
#. Tag: para
#: specialization.xml:73
#, no-c-format
msgid "be annotated <literal>@Specializes</literal>."
-msgstr ""
+msgstr "será anotada <literal>@Specializes</literal>."
#. Tag: programlisting
#: specialization.xml:77
@@ -187,105 +163,87 @@
" ...\n"
"}"
msgstr ""
+"@Stateless @Staging @Specializes\n"
+"public class StagingCreditCardPaymentProcessor \n"
+" extends CreditCardPaymentProcessor {\n"
+" ...\n"
+"}"
#. Tag: para
#: specialization.xml:79
#, no-c-format
-msgid ""
-"We say that the higher-priority Web Bean <emphasis>specializes</emphasis> "
-"its superclass."
+msgid "We say that the higher-priority Web Bean <emphasis>specializes</emphasis> its superclass."
msgstr ""
#. Tag: title
#: specialization.xml:85
#, no-c-format
msgid "Advantages of specialization"
-msgstr ""
+msgstr "Vantagens da especialização"
#. Tag: para
#: specialization.xml:87
#, no-c-format
msgid "When specialization is used:"
-msgstr ""
+msgstr "Quando a especialização é utilizada:"
#. Tag: para
#: specialization.xml:91
#, no-c-format
-msgid ""
-"the binding types of the superclass are automatically inherited by the Web "
-"Bean annotated <literal>@Specializes</literal>, and"
+msgid "the binding types of the superclass are automatically inherited by the Web Bean annotated <literal>@Specializes</literal>, and"
msgstr ""
#. Tag: para
#: specialization.xml:95
#, no-c-format
-msgid ""
-"the Web Bean name of the superclass is automatically inherited by the Web "
-"Bean annotated <literal>@Specializes</literal>, and"
+msgid "the Web Bean name of the superclass is automatically inherited by the Web Bean annotated <literal>@Specializes</literal>, and"
msgstr ""
#. Tag: para
#: specialization.xml:99
#, no-c-format
-msgid ""
-"producer methods, disposal methods and observer methods declared by the "
-"superclass are called upon an instance of the Web Bean annotated "
-"<literal>@Specializes</literal>."
+msgid "producer methods, disposal methods and observer methods declared by the superclass are called upon an instance of the Web Bean annotated <literal>@Specializes</literal>."
msgstr ""
#. Tag: para
#: specialization.xml:105
#, no-c-format
-msgid ""
-"In our example, the binding type <literal>@CreditCard</literal> of "
-"<literal>CreditCardPaymentProcessor</literal> is inherited by "
-"<literal>StagingCreditCardPaymentProcessor</literal>."
-msgstr ""
+msgid "In our example, the binding type <literal>@CreditCard</literal> of <literal>CreditCardPaymentProcessor</literal> is inherited by <literal>StagingCreditCardPaymentProcessor</literal>."
+msgstr "Em nosso exemplo, o tipo de ligação (binding type) <literal>@CreditCard</literal> do <literal>CreditCardPaymentProcessor</literal> é herdado por <literal>StagingCreditCardPaymentProcessor</literal>."
#. Tag: para
#: specialization.xml:109
#, no-c-format
msgid "Furthermore, the Web Bean manager will validate that:"
-msgstr ""
+msgstr "Além disso, o gerenciador do Web Bean irá validar que:"
#. Tag: para
#: specialization.xml:113
#, no-c-format
-msgid ""
-"all API types of the superclass are API types of the Web Bean annotated "
-"<literal>@Specializes</literal> (all local interfaces of the superclass "
-"enterprise bean are also local interfaces of the subclass),"
+msgid "all API types of the superclass are API types of the Web Bean annotated <literal>@Specializes</literal> (all local interfaces of the superclass enterprise bean are also local interfaces of the subclass),"
msgstr ""
#. Tag: para
#: specialization.xml:119
#, no-c-format
-msgid ""
-"the deployment type of the Web Bean annotated <literal>@Specializes</"
-"literal> has a higher precedence than the deployment type of the superclass, "
-"and"
+msgid "the deployment type of the Web Bean annotated <literal>@Specializes</literal> has a higher precedence than the deployment type of the superclass, and"
msgstr ""
#. Tag: para
#: specialization.xml:124
#, no-c-format
-msgid ""
-"there is no other enabled Web Bean that also specializes the superclass."
+msgid "there is no other enabled Web Bean that also specializes the superclass."
msgstr ""
#. Tag: para
#: specialization.xml:129
#, no-c-format
-msgid ""
-"If any of these conditions are violated, the Web Bean manager throws an "
-"exception at initialization time."
+msgid "If any of these conditions are violated, the Web Bean manager throws an exception at initialization time."
msgstr ""
#. Tag: para
#: specialization.xml:132
#, no-c-format
-msgid ""
-"Therefore, we can be certain that the superclass will <emphasis>never</"
-"emphasis> be called in any deployment of the system where the Web Bean "
-"annotated <literal>@Specializes</literal> is deployed and enabled."
+msgid "Therefore, we can be certain that the superclass will <emphasis>never</emphasis> be called in any deployment of the system where the Web Bean annotated <literal>@Specializes</literal> is deployed and enabled."
msgstr ""
+
Modified: doc/trunk/reference/pt-BR/stereotypes.po
===================================================================
--- doc/trunk/reference/pt-BR/stereotypes.po 2009-02-28 14:04:13 UTC (rev 1744)
+++ doc/trunk/reference/pt-BR/stereotypes.po 2009-03-01 00:42:05 UTC (rev 1745)
@@ -6,8 +6,8 @@
"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-06 11:30+0000\n"
-"PO-Revision-Date: 2009-01-06 11:30+0000\n"
-"Last-Translator: Automatically generated\n"
+"PO-Revision-Date: 2009-02-28 15:05-0300\n"
+"Last-Translator: João Paulo Viragine <joao.viragine(a)redhat.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -17,81 +17,73 @@
#: stereotypes.xml:4
#, no-c-format
msgid "Stereotypes"
-msgstr ""
+msgstr "Steriotipos"
#. Tag: para
#: stereotypes.xml:6
#, no-c-format
msgid "According to the Web Beans specification:"
-msgstr ""
+msgstr "De acordo com a especificação Web Beans:"
#. Tag: para
#: stereotypes.xml:10
#, no-c-format
-msgid ""
-"In many systems, use of architectural patterns produces a set of recurring "
-"Web Bean roles. A stereotype allows a framework developer to identify such a "
-"role and declare some common metadata for Web Beans with that role in a "
-"central place."
-msgstr ""
+msgid "In many systems, use of architectural patterns produces a set of recurring Web Bean roles. A stereotype allows a framework developer to identify such a role and declare some common metadata for Web Beans with that role in a central place."
+msgstr "Em muitos sistemas, a utilização de padrões arquiteturais produz um conjunto de recorrentes papéis Web Bean. Um estereótipo permite que um desenvolvedor de framwework identificar esse papel e declarar alguns metadados comums para Web Beans com esse papel em um local centralizado."
#. Tag: para
#: stereotypes.xml:14
#, no-c-format
msgid "A stereotype encapsulates any combination of:"
-msgstr ""
+msgstr "Um estereótipo encapsula qualquer combinação de:"
#. Tag: para
#: stereotypes.xml:18
#, no-c-format
msgid "a default deployment type,"
-msgstr ""
+msgstr "um tipo padrão de implantação (deployment type), "
#. Tag: para
#: stereotypes.xml:21
#, no-c-format
msgid "a default scope type,"
-msgstr ""
+msgstr "um tipo de scopo padrão,"
#. Tag: para
#: stereotypes.xml:24
#, no-c-format
msgid "a restriction upon the Web Bean scope,"
-msgstr ""
+msgstr "uma restrição ao escopo do Web Bean,"
#. Tag: para
#: stereotypes.xml:27
#, no-c-format
msgid "a requirement that the Web Bean implement or extend a certain type, and"
-msgstr ""
+msgstr "uma exigência de que o Web Bean implemente ou estenda um certo tipo, e"
#. Tag: para
#: stereotypes.xml:30
#, no-c-format
msgid "a set of interceptor binding annotations."
-msgstr ""
+msgstr "um conjunto de anotações para ligação de interceptadores "
#. Tag: para
#: stereotypes.xml:34
#, no-c-format
-msgid ""
-"A stereotype may also specify that all Web Beans with the stereotype have "
-"defaulted Web Bean names."
-msgstr ""
+msgid "A stereotype may also specify that all Web Beans with the stereotype have defaulted Web Bean names."
+msgstr "Um estereótipo também pode especificar que todos os Web Beans com o estereótipo têm um nome de Web Bean padrão."
#. Tag: para
#: stereotypes.xml:37
#, no-c-format
msgid "A Web Bean may declare zero, one or multiple stereotypes."
-msgstr ""
+msgstr "Um Web Bean pode declarar zero, um ou vários estereótipos."
#. Tag: para
#: stereotypes.xml:41
#, no-c-format
-msgid ""
-"A stereotype is a Java annotation type. This stereotype identifies action "
-"classes in some MVC framework:"
-msgstr ""
+msgid "A stereotype is a Java annotation type. This stereotype identifies action classes in some MVC framework:"
+msgstr "Um estereótipo é um tipo de anotação Java. Este estereótipo identifica as classes de ação em algum frameworks MVC:"
#. Tag: programlisting
#: stereotypes.xml:44
@@ -102,12 +94,16 @@
"@Stereotype\n"
"public @interface Action {}]]>"
msgstr ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"@Target(TYPE)\n"
+"@Stereotype\n"
+"public @interface Action {}]]>"
#. Tag: para
#: stereotypes.xml:46
#, no-c-format
msgid "We use the stereotype by applying the annotation to a Web Bean."
-msgstr ""
+msgstr "Nós utilizamos o esteriótipo aplicando a anotoção ao Web Bean."
#. Tag: programlisting
#: stereotypes.xml:48
@@ -116,23 +112,20 @@
"<![CDATA[@Action \n"
"public class LoginAction { ... }]]>"
msgstr ""
+"<![CDATA[@Action \n"
+"public class LoginAction { ... }]]>"
#. Tag: title
#: stereotypes.xml:51
#, no-c-format
msgid "Default scope and deployment type for a stereotype"
-msgstr ""
+msgstr "Scopo padrão e "
#. Tag: para
#: stereotypes.xml:53
#, no-c-format
-msgid ""
-"A stereotype may specify a default scope and/or default deployment type for "
-"Web Beans with that stereotype. For example, if the deployment type "
-"<literal>@WebTier</literal> identifies Web Beans that should only be "
-"deployed when the system executes as a web application, we might specify the "
-"following defaults for action classes:"
-msgstr ""
+msgid "A stereotype may specify a default scope and/or default deployment type for Web Beans with that stereotype. For example, if the deployment type <literal>@WebTier</literal> identifies Web Beans that should only be deployed when the system executes as a web application, we might specify the following defaults for action classes:"
+msgstr "Um estereotipo pode especificar um escopo padrão e/ou um tipo padrão de implantação (deployment type) para Web Beans com esse estereótipo. Por exemplo, se o tipo de implantação (deployment type) <literal>@WebTier</literal> identifica Web Beans que só deverão ser implantados quando o sistema executa como uma aplicação web, podemos especificar os seguintes padrões de classes de ação :"
#. Tag: programlisting
#: stereotypes.xml:59
@@ -145,14 +138,18 @@
"@Stereotype\n"
"public @interface Action {}]]>"
msgstr ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"@Target(TYPE)\n"
+"@RequestScoped\n"
+"@WebTier\n"
+"@Stereotype\n"
+"public @interface Action {}]]>"
#. Tag: para
#: stereotypes.xml:61
#, no-c-format
-msgid ""
-"Of course, a particular action may still override these defaults if "
-"necessary:"
-msgstr ""
+msgid "Of course, a particular action may still override these defaults if necessary:"
+msgstr "Evidentemente, uma determinada ação pode ainda substituir esses padrões, se necessário:"
#. Tag: programlisting
#: stereotypes.xml:64
@@ -161,28 +158,26 @@
"<![CDATA[@Dependent @Mock @Action \n"
"public class MockLoginAction { ... }]]>"
msgstr ""
+"<![CDATA[@Dependent @Mock @Action \n"
+"public class MockLoginAction { ... }]]>"
#. Tag: para
#: stereotypes.xml:66
#, no-c-format
-msgid ""
-"If we want to force all actions to a particular scope, we can do that too."
-msgstr ""
+msgid "If we want to force all actions to a particular scope, we can do that too."
+msgstr "Se nós quisermos forçar todas as ações para um escopo particular, nós podemos fazer isso também."
#. Tag: title
#: stereotypes.xml:72
#, no-c-format
msgid "Restricting scope and type with a stereotype"
-msgstr ""
+msgstr "Restringindo escopo e tipo com um esteriótipo"
#. Tag: para
#: stereotypes.xml:74
#, no-c-format
-msgid ""
-"Suppose that we wish to prevent actions from declaring certain scopes. Web "
-"Beans lets us explicitly specify the set of allowed scopes for Web Beans "
-"with a certain stereotype. For example:"
-msgstr ""
+msgid "Suppose that we wish to prevent actions from declaring certain scopes. Web Beans lets us explicitly specify the set of allowed scopes for Web Beans with a certain stereotype. For example:"
+msgstr "Suponha que queremos impedir as ações de declarar certos escopos. Web Beans permite-nos indicar explicitamente o conjunto de escopos permitidos para Web Beans com um certo estereótipo. Por exemplo:"
#. Tag: programlisting
#: stereotypes.xml:78
@@ -195,23 +190,24 @@
"@Stereotype(supportedScopes=RequestScoped.class)\n"
"public @interface Action {}]]>"
msgstr ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"@Target(TYPE)\n"
+"@RequestScoped\n"
+"@WebTier\n"
+"@Stereotype(supportedScopes=RequestScoped.class)\n"
+"public @interface Action {}]]>"
#. Tag: para
#: stereotypes.xml:80
#, no-c-format
-msgid ""
-"If a particular action class attempts to specify a scope other than the Web "
-"Beans request scope, an exception will be thrown by the Web Bean manager at "
-"initialization time."
-msgstr ""
+msgid "If a particular action class attempts to specify a scope other than the Web Beans request scope, an exception will be thrown by the Web Bean manager at initialization time."
+msgstr "Se uma determinada classe de ação tenta especificar um escopo diferente do escopo de requisição (request scope) do Web Beans, uma exceção será lançada pelo gereneciador do Web Bean em tempo de inicialização."
#. Tag: para
#: stereotypes.xml:84
#, no-c-format
-msgid ""
-"We can also force all Web Bean with a certain stereotype to implement an "
-"interface or extend a class:"
-msgstr ""
+msgid "We can also force all Web Bean with a certain stereotype to implement an interface or extend a class:"
+msgstr "Nós também podemos forçar todos os Web Bean com um certo estereótipo implementar uma interface ou estender uma classe:"
#. Tag: programlisting
#: stereotypes.xml:87
@@ -224,29 +220,30 @@
"@Stereotype(requiredTypes=AbstractAction.class)\n"
"public @interface Action {}]]>"
msgstr ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"@Target(TYPE)\n"
+"@RequestScoped\n"
+"@WebTier\n"
+"@Stereotype(requiredTypes=AbstractAction.class)\n"
+"public @interface Action {}]]>"
#. Tag: para
#: stereotypes.xml:89
#, no-c-format
-msgid ""
-"If a particular action class does not extend the class "
-"<literal>AbstractAction</literal>, an exception will be thrown by the Web "
-"Bean manager at initialization time."
-msgstr ""
+msgid "If a particular action class does not extend the class <literal>AbstractAction</literal>, an exception will be thrown by the Web Bean manager at initialization time."
+msgstr "Se uma determinada classe de ação não estende a classe <literal>AbstractAction</literal>, uma exceção será lançada pelo gerenciador do Web Bean em tempo de inicialização."
#. Tag: title
#: stereotypes.xml:96
#, no-c-format
msgid "Interceptor bindings for stereotypes"
-msgstr ""
+msgstr "Interceptor bindings de estereótipos"
#. Tag: para
#: stereotypes.xml:98
#, no-c-format
-msgid ""
-"A stereotype may specify a set of interceptor bindings to be inherited by "
-"all Web Beans with that stereotype."
-msgstr ""
+msgid "A stereotype may specify a set of interceptor bindings to be inherited by all Web Beans with that stereotype."
+msgstr "Um esteriótipo pode especificar um conjunto de interceptadores de ligação (interceptor bindings) a ser herdado por todos os Web Beans com esse estereótipo."
#. Tag: programlisting
#: stereotypes.xml:101
@@ -261,30 +258,32 @@
"@Stereotype\n"
"public @interface Action {}]]>"
msgstr ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"@Target(TYPE)\n"
+"@RequestScoped\n"
+"@Transactional(requiresNew=true)\n"
+"@Secure\n"
+"@WebTier\n"
+"@Stereotype\n"
+"public @interface Action {}]]>"
#. Tag: para
#: stereotypes.xml:103
#, no-c-format
-msgid ""
-"This helps us get technical concerns even further away from the business "
-"code!"
-msgstr ""
+msgid "This helps us get technical concerns even further away from the business code!"
+msgstr "Isso nos ajuda a manter as preocupações técnicas (technical concerns) ainda mais longe do código de negócios!"
#. Tag: title
#: stereotypes.xml:109
#, no-c-format
msgid "Name defaulting with stereotypes"
-msgstr ""
+msgstr "Padronização de nomes com estereótipos"
#. Tag: para
#: stereotypes.xml:111
#, no-c-format
-msgid ""
-"Finally, we can specify that all Web Beans with a certain stereotype have a "
-"Web Bean name, defaulted by the Web Bean manager. Actions are often "
-"referenced in JSP pages, so they're a perfect use case for this feature. All "
-"we need to do is add an empty <literal>@Named</literal> annotation:"
-msgstr ""
+msgid "Finally, we can specify that all Web Beans with a certain stereotype have a Web Bean name, defaulted by the Web Bean manager. Actions are often referenced in JSP pages, so they're a perfect use case for this feature. All we need to do is add an empty <literal>@Named</literal> annotation:"
+msgstr "Por último, é possível especificar que todos os Web Beans com um certo estereótipo tem um nome Web Bean, padronizado pelo gerenciador do Web Bean. As ações são muitas vezes referenciadas em páginas JSP, por isso eles são um caso de utilização perfeito deste recurso. Tudo o que precisamos fazer é adicionar uma anotação <literal>@Nome</literal> vazia: "
#. Tag: programlisting
#: stereotypes.xml:116
@@ -300,35 +299,39 @@
"@Stereotype\n"
"public @interface Action {}]]>"
msgstr ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"@Target(TYPE)\n"
+"@RequestScoped\n"
+"@Transactional(requiresNew=true)\n"
+"@Secure\n"
+"@Named\n"
+"@WebTier\n"
+"@Stereotype\n"
+"public @interface Action {}]]>"
#. Tag: para
#: stereotypes.xml:118
#, no-c-format
-msgid ""
-"Now, <literal>LoginAction</literal> will have the name <literal>loginAction</"
-"literal>."
-msgstr ""
+msgid "Now, <literal>LoginAction</literal> will have the name <literal>loginAction</literal>."
+msgstr "Agora, <literal>LoginAction</literal> terá o nome <literal>loginAction</literal>."
#. Tag: title
#: stereotypes.xml:124
#, no-c-format
msgid "Standard stereotypes"
-msgstr ""
+msgstr "Estereótipos padrões"
#. Tag: para
#: stereotypes.xml:126
#, no-c-format
-msgid ""
-"We've already met two standard stereotypes defined by the Web Beans "
-"specification: <literal>@Interceptor</literal> and <literal>@Decorator</"
-"literal>."
-msgstr ""
+msgid "We've already met two standard stereotypes defined by the Web Beans specification: <literal>@Interceptor</literal> and <literal>@Decorator</literal>."
+msgstr "Já conhecemos dois estereótipos padrões definidos pela especificação de Web Beans : <literal>@Interceptor</literal> e <literal>@Decorator</literal>."
#. Tag: para
#: stereotypes.xml:129
#, no-c-format
msgid "Web Beans defines one further standard stereotype:"
-msgstr ""
+msgstr "Web Beans define mais um estereótipo padrão:"
#. Tag: programlisting
#: stereotypes.xml:131
@@ -341,12 +344,16 @@
"@Retention(RUNTIME) \n"
"public @interface Model {} ]]>"
msgstr ""
+"<![CDATA[@Named \n"
+"@RequestScoped \n"
+"@Stereotype \n"
+"@Target({TYPE, METHOD}) \n"
+"@Retention(RUNTIME) \n"
+"public @interface Model {} ]]>"
#. Tag: para
#: stereotypes.xml:133
#, no-c-format
-msgid ""
-"This stereotype is intended for use with JSF. Instead of using JSF managed "
-"beans, just annotate a Web Bean <literal>@Model</literal>, and use it "
-"directly in your JSF page."
-msgstr ""
+msgid "This stereotype is intended for use with JSF. Instead of using JSF managed beans, just annotate a Web Bean <literal>@Model</literal>, and use it directly in your JSF page."
+msgstr "Este estereótipo é destinado para uso com o JSF. Em vez de utilizar JSF managed beans, basta anotar um Web Bean com <literal>@Model</literal>, e utilizá-lo diretamente na sua página JSF."
+
Modified: doc/trunk/reference/pt-BR/xml.po
===================================================================
--- doc/trunk/reference/pt-BR/xml.po 2009-02-28 14:04:13 UTC (rev 1744)
+++ doc/trunk/reference/pt-BR/xml.po 2009-03-01 00:42:05 UTC (rev 1745)
@@ -6,8 +6,8 @@
"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-06 11:30+0000\n"
-"PO-Revision-Date: 2009-01-06 11:30+0000\n"
-"Last-Translator: Automatically generated\n"
+"PO-Revision-Date: 2009-02-28 15:10-0300\n"
+"Last-Translator: João Paulo Viragine <joao.viragine(a)redhat.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -17,105 +17,79 @@
#: xml.xml:4
#, no-c-format
msgid "Defining Web Beans using XML"
-msgstr ""
+msgstr "Definindo Web Beans usando XML"
#. Tag: para
#: xml.xml:6
#, no-c-format
-msgid ""
-"So far, we've seen plenty of examples of Web Beans declared using "
-"annotations. However, there are a couple of occasions when we can't use "
-"annotations to define the Web Bean:"
-msgstr ""
+msgid "So far, we've seen plenty of examples of Web Beans declared using annotations. However, there are a couple of occasions when we can't use annotations to define the Web Bean:"
+msgstr "Até agora, temos visto muitos exemplos de declaração de Web Beans usando anotações. No entanto, há várias situações em que não podemos usar anotações para definir um Web Bean:"
#. Tag: para
#: xml.xml:12
#, no-c-format
msgid "when the implementation class comes from some preexisting library, or"
-msgstr ""
+msgstr "quando a classe de implementação vem de alguma biblioteca preexistente, ou"
#. Tag: para
#: xml.xml:15
#, no-c-format
-msgid ""
-"when there should be multiple Web Beans with the same implementation class."
-msgstr ""
+msgid "when there should be multiple Web Beans with the same implementation class."
+msgstr "quando deveria haver vários Web Beans com a mesma classe de implementação."
#. Tag: para
#: xml.xml:20
#, no-c-format
msgid "In either of these cases, Web Beans gives us two options:"
-msgstr ""
+msgstr "Em qualquer destes casos, We Beans nos dá duas opções:"
#. Tag: para
#: xml.xml:23
#, no-c-format
msgid "write a producer method, or"
-msgstr ""
+msgstr "escrever um método produtor (producer method), ou"
#. Tag: para
#: xml.xml:24
#, no-c-format
msgid "declare the Web Bean using XML."
-msgstr ""
+msgstr "declarar um Web Bean utilizando XML."
#. Tag: para
#: xml.xml:27
#, no-c-format
-msgid ""
-"Many frameworks use XML to provide metadata relating to Java classes. "
-"However, Web Beans uses a very different approach to specifying the names of "
-"Java classes, fields or methods to most other frameworks. Instead of writing "
-"class and member names as the string values of XML elements and attributes, "
-"Web Beans lets you use the class or member name as the name of the XML "
-"element."
-msgstr ""
+msgid "Many frameworks use XML to provide metadata relating to Java classes. However, Web Beans uses a very different approach to specifying the names of Java classes, fields or methods to most other frameworks. Instead of writing class and member names as the string values of XML elements and attributes, Web Beans lets you use the class or member name as the name of the XML element."
+msgstr "Muitos frameworks usam XML para fornecer metadados relativos às classes Java. No entanto, Web Beans utiliza uma abordagem muito diferente para especificar os nomes de classes Java, atributos ou métodos dos outros frameworks. Em vez de escrever os nomes das classes e dos membros como uma String de valores em elementos e atributos XML, Web Beans permite que você use o nome da classe ou membro como o nome do elemento XML."
#. Tag: para
#: xml.xml:33
#, no-c-format
-msgid ""
-"The advantage of this approach is that you can write an XML schema that "
-"prevents spelling errors in your XML document. It's even possible for a tool "
-"to generate the XML schema automatically from the compiled Java code. Or, an "
-"integrated development environment could perform the same validation without "
-"the need for the explicit intermediate generation step."
-msgstr ""
+msgid "The advantage of this approach is that you can write an XML schema that prevents spelling errors in your XML document. It's even possible for a tool to generate the XML schema automatically from the compiled Java code. Or, an integrated development environment could perform the same validation without the need for the explicit intermediate generation step."
+msgstr "A vantagem desta abordagem é que você pode escrever um esquema XML (XML schema) que evita erros ortográficos no seu documento XML. É até mesmo possível para uma ferramenta gerar o esquema XML (XML schema) automaticamente a partir do código Java compilado. Ou, um ambiente integrado de desenvolvimento poderia fazer a mesma validação sem a necessidade explicíta do passo intermediário de geração."
#. Tag: title
#: xml.xml:40
#, no-c-format
msgid "Declaring Web Bean classes"
-msgstr ""
+msgstr "Declarando classes Web Beans"
#. Tag: para
#: xml.xml:42
#, no-c-format
-msgid ""
-"For each Java package, Web Beans defines a corresponding XML namespace. The "
-"namespace is formed by prepending <literal>urn:java:</literal> to the Java "
-"package name. For the package <literal>com.mydomain.myapp</literal>, the XML "
-"namespace is <literal>urn:java:com.mydomain.myapp</literal>."
-msgstr ""
+msgid "For each Java package, Web Beans defines a corresponding XML namespace. The namespace is formed by prepending <literal>urn:java:</literal> to the Java package name. For the package <literal>com.mydomain.myapp</literal>, the XML namespace is <literal>urn:java:com.mydomain.myapp</literal>."
+msgstr "Para cada pacote Java, Web Beans define um namespace XML correspondente. O nome é formado por prepending <literal>urn:java:</literal> para o nome do pacote Java. Para o pacote <literal>com.mydomain.myapp</literal>, o namespace XML é <literal>urn:java:com.mydomain.myapp</literal>."
#. Tag: para
#: xml.xml:47
#, no-c-format
-msgid ""
-"Java types belonging to a package are referred to using an XML element in "
-"the namespace corresponding to the package. The name of the element is the "
-"name of the Java type. Fields and methods of the type are specified by child "
-"elements in the same namespace. If the type is an annotation, members are "
-"specified by attributes of the element."
-msgstr ""
+msgid "Java types belonging to a package are referred to using an XML element in the namespace corresponding to the package. The name of the element is the name of the Java type. Fields and methods of the type are specified by child elements in the same namespace. If the type is an annotation, members are specified by attributes of the element."
+msgstr "Tipos Java pertencentes a um pacote são referenciados à utilizar um elemento XML no namespace correspondente ao pacote. O nome do elemento é o nome do tipo Java. Atributos e métodos do tipo são especificados por elementos filhos do mesmo namespace. Se o tipo é uma anotação, os membros são definidos por atributos do elemento."
#. Tag: para
#: xml.xml:53
#, no-c-format
-msgid ""
-"For example, the element <literal><util:Date/></literal> in the "
-"following XML fragment refers to the class <literal>java.util.Date</literal>:"
-msgstr ""
+msgid "For example, the element <literal><util:Date/></literal> in the following XML fragment refers to the class <literal>java.util.Date</literal>:"
+msgstr "Por exemplo, o elemento <literal><util:Date/></literal> no seguinte fraguimento XML refere-se a classe <literal>java.util.Date</literal>:"
#. Tag: programlisting
#: xml.xml:56
@@ -128,35 +102,36 @@
"\n"
"</WebBeans>]]>"
msgstr ""
+"<![CDATA[<WebBeans xmlns=\"urn:java:javax.webbeans\"\n"
+" xmlns:util=\"urn:java:java.util\">\n"
+"\n"
+" <util:Date/>\n"
+"\n"
+"</WebBeans>]]>"
#. Tag: para
#: xml.xml:58
#, no-c-format
-msgid ""
-"And this is all the code we need to declare that <literal>Date</literal> is "
-"a simple Web Bean! An instance of <literal>Date</literal> may now be "
-"injected by any other Web Bean:"
-msgstr ""
+msgid "And this is all the code we need to declare that <literal>Date</literal> is a simple Web Bean! An instance of <literal>Date</literal> may now be injected by any other Web Bean:"
+msgstr "E esse é todo o código necessário para declarar que <literal>Date</literal> é um simples Web Bean! Uma instancia de <literal>Date</literal> pode agora ser injetada por qualquer outro Web Bean:"
#. Tag: programlisting
#: xml.xml:62
#, no-c-format
msgid "<![CDATA[@Current Date date]]>"
-msgstr ""
+msgstr "<![CDATA[@Current Date date]]>"
#. Tag: title
#: xml.xml:67
#, no-c-format
msgid "Declaring Web Bean metadata"
-msgstr ""
+msgstr "Declarando metadados Web Bean"
#. Tag: para
#: xml.xml:69
#, no-c-format
-msgid ""
-"We can declare the scope, deployment type and interceptor binding types "
-"using direct child elements of the Web Bean declaration:"
-msgstr ""
+msgid "We can declare the scope, deployment type and interceptor binding types using direct child elements of the Web Bean declaration:"
+msgstr "Nós podemos declarar o escopo, tipo de puplicação (deployment type) e tipo de ligação de interceptador (interceptor binding types) com a utilização direta de elementos filhos na declaração do Web Bean:"
#. Tag: programlisting
#: xml.xml:72
@@ -168,12 +143,17 @@
" <myfwk:Secure/>\n"
"</myapp:ShoppingCart>]]>"
msgstr ""
+"<![CDATA[<myapp:ShoppingCart>\n"
+" <SessionScoped/>\n"
+" <myfwk:Transactional requiresNew=\"true\"/>\n"
+" <myfwk:Secure/>\n"
+"</myapp:ShoppingCart>]]>"
#. Tag: para
#: xml.xml:74
#, no-c-format
msgid "We use exactly the same approach to specify names and binding type:"
-msgstr ""
+msgstr "Nós utilizamos exatamente a mesma abordagem para especificar nomes e tipos de ligação:"
#. Tag: programlisting
#: xml.xml:76
@@ -195,14 +175,27 @@
" <Named>systemStartTime</Named>\n"
"</util:Date>]]>"
msgstr ""
+"<![CDATA[<util:Date>\n"
+" <Named>currentTime</Named>\n"
+"</util:Date>\n"
+"\n"
+"<util:Date>\n"
+" <SessionScoped/>\n"
+" <myapp:Login/>\n"
+" <Named>loginTime</Named>\n"
+"</util:Date>\n"
+"\n"
+"<util:Date>\n"
+" <ApplicationScoped/>\n"
+" <myapp:SystemStart/>\n"
+" <Named>systemStartTime</Named>\n"
+"</util:Date>]]>"
#. Tag: para
#: xml.xml:78
#, no-c-format
-msgid ""
-"Where <literal>@Login</literal> and <literal>@SystemStart</literal> are "
-"binding annotations types."
-msgstr ""
+msgid "Where <literal>@Login</literal> and <literal>@SystemStart</literal> are binding annotations types."
+msgstr "Onde <literal>@Login</literal> e <literal>@SystemStart</literal> são anotações do tipo ligação."
#. Tag: programlisting
#: xml.xml:81
@@ -212,12 +205,15 @@
"@Login Date loginTime;\n"
"@SystemStart Date systemStartTime;]]>"
msgstr ""
+"<![CDATA[@Current Date currentTime;\n"
+"@Login Date loginTime;\n"
+"@SystemStart Date systemStartTime;]]>"
#. Tag: para
#: xml.xml:83
#, no-c-format
msgid "As usual, a Web Bean may support multiple binding types:"
-msgstr ""
+msgstr "Como é habitual, um Web Bean pode suportar múltiplos tipos de ligação (binding types):"
#. Tag: programlisting
#: xml.xml:85
@@ -228,14 +224,16 @@
" <myapp:Asynchronous/>\n"
"</myapp:AsynchronousChequePaymentProcessor>]]>"
msgstr ""
+"<![CDATA[<myapp:AsynchronousChequePaymentProcessor>\n"
+" <myapp:PayByCheque/>\n"
+" <myapp:Asynchronous/>\n"
+"</myapp:AsynchronousChequePaymentProcessor>]]>"
#. Tag: para
#: xml.xml:87
#, no-c-format
-msgid ""
-"Interceptors and decorators are just simple Web Beans, so they may be "
-"declared just like any other simple Web Bean:"
-msgstr ""
+msgid "Interceptors and decorators are just simple Web Beans, so they may be declared just like any other simple Web Bean:"
+msgstr "Interceptadores e Decoradores são simplesmente Web Beans, sendo assim, podem ser declarados como qualquer outro Web Bean:"
#. Tag: programlisting
#: xml.xml:90
@@ -246,30 +244,34 @@
" <myfwk:Transactional/>\n"
"</myfwk:TransactionInterceptor>]]>"
msgstr ""
+"<![CDATA[<myfwk:TransactionInterceptor>\n"
+" <Interceptor/>\n"
+" <myfwk:Transactional/>\n"
+"</myfwk:TransactionInterceptor>]]>"
#. Tag: title
#: xml.xml:95
#, no-c-format
msgid "Declaring Web Bean members"
-msgstr ""
+msgstr "Declarando membros Web Bean"
#. Tag: para
#: xml.xml:97
#, no-c-format
msgid "TODO!"
-msgstr ""
+msgstr "TODO!"
#. Tag: title
#: xml.xml:104
#, no-c-format
msgid "Declaring inline Web Beans"
-msgstr ""
+msgstr "Declarando inline Web Beans"
#. Tag: para
#: xml.xml:106
#, no-c-format
msgid "Web Beans lets us define a Web Bean at an injection point. For example:"
-msgstr ""
+msgstr "Web Beans nos permite definir um Web Bean em um ponto de injeção. Por exemplo:"
#. Tag: programlisting
#: xml.xml:108
@@ -286,42 +288,40 @@
" </myapp:admin>\n"
"</myapp:System>]]>"
msgstr ""
+"<![CDATA[<myapp:System>\n"
+" <ApplicationScoped/>\n"
+" <myapp:admin>\n"
+" <myapp:Name>\n"
+" <myapp:firstname>Gavin</myapp:firstname>\n"
+" <myapp:lastname>King</myapp:lastname>\n"
+" <myapp:email>gavin(a)hibernate.org</myapp:email>\n"
+" </myapp:Name>\n"
+" </myapp:admin>\n"
+"</myapp:System>]]>"
#. Tag: para
#: xml.xml:110
#, no-c-format
-msgid ""
-"The <literal><Name></literal> element declares a simple Web Bean of "
-"scope <literal>@Dependent</literal> and class <literal>Name</literal>, with "
-"a set of initial field values. This Web Bean has a special, container-"
-"generated binding and is therefore injectable only to the specific injection "
-"point at which it is declared."
-msgstr ""
+msgid "The <literal><Name></literal> element declares a simple Web Bean of scope <literal>@Dependent</literal> and class <literal>Name</literal>, with a set of initial field values. This Web Bean has a special, container-generated binding and is therefore injectable only to the specific injection point at which it is declared."
+msgstr "O elemnto <literal><Name></literal> declara um Web Bean simples de escopo <literal>@Dependent</literal> e classe <literal>Name</literal>, com um conjunto inicial de valores para os campos. Esse Web Bean possui a special, container-generated binding and is therefore injectable only to the specific injection point at which it is declared."
#. Tag: para
#: xml.xml:116
#, no-c-format
-msgid ""
-"This simple but powerful feature allows the Web Beans XML format to be used "
-"to specify whole graphs of Java objects. It's not quite a full databinding "
-"solution, but it's close!"
-msgstr ""
+msgid "This simple but powerful feature allows the Web Beans XML format to be used to specify whole graphs of Java objects. It's not quite a full databinding solution, but it's close!"
+msgstr "Este simples mas poderoso recurso permite que o formato XML do Web Beans seja utilizado para especificar gráfos completos de objetos Java. Não é uma solução de ligação de dados (databinding) completa, mas está bem próxima!"
#. Tag: title
#: xml.xml:123
#, no-c-format
msgid "Using a schema"
-msgstr ""
+msgstr "Utilizando um esquema"
#. Tag: para
#: xml.xml:125
#, no-c-format
-msgid ""
-"If we want our XML document format to be authored by people who aren't Java "
-"developers, or who don't have access to our code, we need to provide a "
-"schema. There's nothing specific to Web Beans about writing or using the "
-"schema."
-msgstr ""
+msgid "If we want our XML document format to be authored by people who aren't Java developers, or who don't have access to our code, we need to provide a schema. There's nothing specific to Web Beans about writing or using the schema."
+msgstr "Se desejamos que o formato do documento XML seja criado por pessoas que não são desenvolvedores Java, ou por pessoas que não têm acesso ao nosso código, precisamos fornecer um esquema (XML schema). Não há nada específico no Web Beans sobre escrever ou utilizar o esquema."
#. Tag: programlisting
#: xml.xml:130
@@ -330,10 +330,8 @@
"<![CDATA[<WebBeans xmlns=\"urn:java:javax.webbeans\"\n"
" xmlns:myapp=\"urn:java:com.mydomain.myapp\"\n"
" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
-" xsi:schemaLocation=\"urn:java:javax.webbeans http://java.sun.com/"
-"jee/web-beans-1.0.xsd\n"
-" urn:java:com.mydomain.myapp http://mydomain."
-"com/xsd/myapp-1.2.xsd\">\n"
+" xsi:schemaLocation=\"urn:java:javax.webbeans http://java.sun.com/jee/web-beans-1.0.xsd\n"
+" urn:java:com.mydomain.myapp http://mydomain.com/xsd/myapp-1.2.xsd\">\n"
"\n"
" <myapp:System>\n"
" ...\n"
@@ -341,12 +339,21 @@
"\n"
"</WebBeans>]]>"
msgstr ""
+"<![CDATA[<WebBeans xmlns=\"urn:java:javax.webbeans\"\n"
+" xmlns:myapp=\"urn:java:com.mydomain.myapp\"\n"
+" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
+" xsi:schemaLocation=\"urn:java:javax.webbeans http://java.sun.com/jee/web-beans-1.0.xsd\n"
+" urn:java:com.mydomain.myapp http://mydomain.com/xsd/myapp-1.2.xsd\">\n"
+"\n"
+" <myapp:System>\n"
+" ...\n"
+" </myapp:System>\n"
+"\n"
+"</WebBeans>]]>"
#. Tag: para
#: xml.xml:132
#, no-c-format
-msgid ""
-"Writing an XML schema is quite tedious. Therefore, the Web Beans RI project "
-"will provide a tool which automatically generates the XML schema from "
-"compiled Java code."
-msgstr ""
+msgid "Writing an XML schema is quite tedious. Therefore, the Web Beans RI project will provide a tool which automatically generates the XML schema from compiled Java code."
+msgstr "Escrever um esquema XML (XML schema) é um tanto tedioso. Toda via, o projeto Web Beans RI irá fornecer uma ferramenta que automaticamente gera o esquema XML (XML schema) a partir do código da classe Java compilada."
+
15 years, 10 months