[webbeans-commits] Webbeans SVN: r2268 - in tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests: deployment and 2 other directories.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-03-30 03:39:29 -0400 (Mon, 30 Mar 2009)
New Revision: 2268
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/fail/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/fail/Bean_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/fail/BrokenInitializerBean.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/fail/DeploymentFailureTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/fail/ManagerObserver.java
Log:
test for 11.1.a
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/fail/Bean_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/fail/Bean_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/fail/Bean_Broken.java 2009-03-30 07:39:29 UTC (rev 2268)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.deployment.lifecycle.fail;
+
+import javax.inject.Production;
+
+@Production
+class Bean_Broken<T>
+{
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/fail/BrokenInitializerBean.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/fail/BrokenInitializerBean.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/fail/BrokenInitializerBean.java 2009-03-30 07:39:29 UTC (rev 2268)
@@ -0,0 +1,12 @@
+package org.jboss.jsr299.tck.tests.deployment.lifecycle.fail;
+
+import javax.inject.Initializer;
+
+class BrokenInitializerBean
+{
+ @Initializer
+ public <T> void initialize(Bean_Broken<T> farmer)
+ {
+
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/fail/DeploymentFailureTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/fail/DeploymentFailureTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/fail/DeploymentFailureTest.java 2009-03-30 07:39:29 UTC (rev 2268)
@@ -0,0 +1,25 @@
+package org.jboss.jsr299.tck.tests.deployment.lifecycle.fail;
+
+import javax.inject.DefinitionException;
+
+import org.hibernate.tck.annotations.SpecAssertion;
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
+import org.jboss.testharness.impl.packaging.Packaging;
+import org.jboss.testharness.impl.packaging.PackagingType;
+import org.testng.annotations.Test;
+
+@Artifact
+(a)Packaging(PackagingType.EAR)
+(a)ExpectedDeploymentException(DefinitionException.class)
+public class DeploymentFailureTest extends AbstractJSR299Test
+{
+ @Test(groups = "ri-broken")
+ @SpecAssertion(section = "11.1", id = "a")
+ public void testDeploymentFailsBeforeInitialization()
+ {
+ assert false;
+ }
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/fail/ManagerObserver.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/fail/ManagerObserver.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/fail/ManagerObserver.java 2009-03-30 07:39:29 UTC (rev 2268)
@@ -0,0 +1,13 @@
+package org.jboss.jsr299.tck.tests.deployment.lifecycle.fail;
+
+import javax.event.Observes;
+import javax.inject.manager.Initialized;
+import javax.inject.manager.Manager;
+
+class ManagerObserver
+{
+ public void managerInitialized(@Observes @Initialized Manager manager)
+ {
+ throw new IllegalStateException("Deployment should have already failed!");
+ }
+}
15 years, 8 months
[webbeans-commits] Webbeans SVN: r2267 - tck/trunk/impl/src/main/resources.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-03-30 03:19:11 -0400 (Mon, 30 Mar 2009)
New Revision: 2267
Modified:
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
editing, minor
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-03-30 07:11:48 UTC (rev 2266)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-03-30 07:19:11 UTC (rev 2267)
@@ -6101,7 +6101,7 @@
<assertion id="a">
<text>First, the container performs bean discovery and registers |Bean| and |Observer| objects for the discovered beans. The container detects definition errors by validating the bean classes and metadata, throwing a |DeploymentException| and aborting deployment of the application if any definition errors exist, as defined in Section 10.1, "Definition errors".</text>
- <note>Test that beans and observers are registered and definition exceptions occur before @Initialized, and that this puts causes the app deployment to fail</note>
+ <note>Test that beans and observers are registered and definition exceptions occur before @Initialized, and that this causes the app deployment to fail</note>
</assertion>
<assertion id="b">
@@ -6239,15 +6239,15 @@
</assertion>
<assertion id="z">
- <text>Next, the container determines which beans~, interceptors and decorators are enabled,~ according to the rules defined in Section 2.5.6, "Enabled deployment types", Section A.3.7, "Interceptor enablement and ordering" and Section A.5.5, "Decorator enablement and ordering", taking into account any <Deploy>, ~<Interceptors> and <Decorators>~ declarations in the |beans.xml| files.</text>
+ <text>Next, the container determines which beans~, interceptors and decorators are enabled,~ according to the rules defined in Section 2.5.6, "Enabled deployment types", Section A.3.7, "Interceptor enablement and ordering" and Section A.5.5, "Decorator enablement and ordering", taking into account any |<Deploy>|, ~|<Interceptors>| and |<Decorators>|~ declarations in the |beans.xml| files.</text>
</assertion>
<assertion id="aa">
- <text>Next, the container determines which ~beans,~ interceptors ~and decorators~ are enabled, according to the rules defined in Section 2.5.6, "Enabled deployment types", Section A.3.7, "Interceptor enablement and ordering" and Section A.5.5, "Decorator enablement and ordering", taking into account any ~<Deploy>,~ <Interceptors> ~and <Decorators>~ declarations in the |beans.xml| files.</text>
+ <text>Next, the container determines which ~beans,~ interceptors ~and decorators~ are enabled, according to the rules defined in Section 2.5.6, "Enabled deployment types", Section A.3.7, "Interceptor enablement and ordering" and Section A.5.5, "Decorator enablement and ordering", taking into account any ~|<Deploy>|,~ |<Interceptors>| ~and |<Decorators>|~ declarations in the |beans.xml| files.</text>
</assertion>
<assertion id="ab">
- <text>Next, the container determines which ~beans, interceptors and~ decorators are enabled, according to the rules defined in Section 2.5.6, "Enabled deployment types", Section A.3.7, "Interceptor enablement and ordering" and Section A.5.5, "Decorator enablement and ordering", taking into account any ~<Deploy>, <Interceptors> and~ <Decorators> declarations in the |beans.xml| files.</text>
+ <text>Next, the container determines which ~beans, interceptors and~ decorators are enabled, according to the rules defined in Section 2.5.6, "Enabled deployment types", Section A.3.7, "Interceptor enablement and ordering" and Section A.5.5, "Decorator enablement and ordering", taking into account any ~|<Deploy>|, |<Interceptors>| and~ |<Decorators>| declarations in the |beans.xml| files.</text>
</assertion>
<assertion id="ac">
@@ -6283,43 +6283,43 @@
</assertion>
<assertion id="b">
- <text>every bean belonging to a parent activity also belongs to the child activity~, is eligible for injection into other beans belonging to the child activity and may be obtained by dynamic lookup via the child activity~</text>
+ <text>Every bean belonging to a parent activity also belongs to the child activity~, is eligible for injection into other beans belonging to the child activity and may be obtained by dynamic lookup via the child activity~</text>
</assertion>
<assertion id="c">
- <text>every bean belonging to a parent activity ~also belongs to the child activity,~ is eligible for injection into other beans belonging to the child activity~ and may be obtained by dynamic lookup via the child activity~</text>
+ <text>Every bean belonging to a parent activity ~also belongs to the child activity,~ is eligible for injection into other beans belonging to the child activity~ and may be obtained by dynamic lookup via the child activity~</text>
</assertion>
<assertion id="d">
- <text>every bean belonging to a parent activity ~also belongs to the child activity, is eligible for injection into other beans belonging to the child activity and~ may be obtained by dynamic lookup via the child activity</text>
+ <text>Every bean belonging to a parent activity ~also belongs to the child activity, is eligible for injection into other beans belonging to the child activity and~ may be obtained by dynamic lookup via the child activity</text>
</assertion>
<assertion id="e">
- <text>every interceptor ~and decorator~ belonging to a parent activity also belongs to the child activity ~and may be applied to any bean belonging to the child activity~</text>
+ <text>Every interceptor ~and decorator~ belonging to a parent activity also belongs to the child activity ~and may be applied to any bean belonging to the child activity~</text>
</assertion>
<assertion id="f">
- <text>every interceptor ~and decorator~ belonging to a parent activity ~also belongs to the child activity and~ may be applied to any bean belonging to the child activity</text>
+ <text>Every interceptor ~and decorator~ belonging to a parent activity ~also belongs to the child activity and~ may be applied to any bean belonging to the child activity</text>
</assertion>
<assertion id="g">
- <text>every ~interceptor and~ decorator belonging to a parent activity also belongs to the child activity and~ may be applied to any bean belonging to the child activity~</text>
+ <text>Every ~interceptor and~ decorator belonging to a parent activity also belongs to the child activity and~ may be applied to any bean belonging to the child activity~</text>
</assertion>
<assertion id="h">
- <text>every ~interceptor and~ decorator belonging to a parent activity ~also belongs to the child activity and~ may be applied to any bean belonging to the child activity</text>
+ <text>Every ~interceptor and~ decorator belonging to a parent activity ~also belongs to the child activity and~ may be applied to any bean belonging to the child activity</text>
</assertion>
<assertion id="j">
- <text>every observer belonging to a parent activity also belongs to the child activity ~and receives events fired via the child activity~</text>
+ <text>Every observer belonging to a parent activity also belongs to the child activity ~and receives events fired via the child activity~</text>
</assertion>
<assertion id="k">
- <text>every observer belonging to a parent activity ~also belongs to the child activity and~ receives events fired via the child activity</text>
+ <text>Every observer belonging to a parent activity ~also belongs to the child activity and~ receives events fired via the child activity</text>
</assertion>
<assertion id="l">
- <text>every context object belonging to the parent activity also belongs to the child activity</text>
+ <text>Every context object belonging to the parent activity also belongs to the child activity</text>
</assertion>
<assertion id="m">
15 years, 8 months
[webbeans-commits] Webbeans SVN: r2266 - tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/manager.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-03-30 03:11:48 -0400 (Mon, 30 Mar 2009)
New Revision: 2266
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/manager/ManagerTest.java
Log:
tests for 5.7.2.c, 5.7.2.d
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/manager/ManagerTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/manager/ManagerTest.java 2009-03-30 02:45:16 UTC (rev 2265)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/manager/ManagerTest.java 2009-03-30 07:11:48 UTC (rev 2266)
@@ -7,6 +7,7 @@
import javax.inject.manager.Manager;
import org.hibernate.tck.annotations.SpecAssertion;
+import org.hibernate.tck.annotations.SpecAssertions;
import org.jboss.jsr299.tck.AbstractJSR299Test;
import org.jboss.testharness.impl.packaging.Artifact;
import org.testng.annotations.Test;
@@ -43,6 +44,7 @@
assert getCurrentManager().resolveByType(Manager.class).size() > 0;
}
+ @Test
@SpecAssertion(section = "5.7.2", id = "ab")
public void testManagerBeanIsDependentScoped()
{
@@ -50,6 +52,7 @@
assert manager.getScopeType().equals(Dependent.class);
}
+ @Test
@SpecAssertion(section = "5.7.2", id = "ac")
public void testManagerBeanHasStandardDeployment()
{
@@ -57,10 +60,22 @@
assert manager.getDeploymentType().equals(Standard.class);
}
+ @Test
@SpecAssertion(section = "5.7.2", id = "ad")
public void testManagerBeanHasCurrentBinding()
{
Bean<Manager> manager = getCurrentManager().resolveByType(Manager.class).iterator().next();
assert manager.getBindings().iterator().next() instanceof Current;
}
+
+ @Test
+ @SpecAssertions({
+ @SpecAssertion(section = "5.7.2", id = "c"),
+ @SpecAssertion(section = "5.7.2", id = "d")
+ })
+ public void testGetInstanceReturnsContextualInstance()
+ {
+ Bean<FishFarmOffice> bean = getCurrentManager().resolveByType(FishFarmOffice.class).iterator().next();
+ assert getCurrentManager().getInstance(bean) instanceof FishFarmOffice;
+ }
}
15 years, 8 months
[webbeans-commits] Webbeans SVN: r2265 - tck/trunk/impl/src/main/resources.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-03-29 22:45:16 -0400 (Sun, 29 Mar 2009)
New Revision: 2265
Modified:
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
highlighting, minor editing
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-03-30 01:41:00 UTC (rev 2264)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-03-30 02:45:16 UTC (rev 2265)
@@ -6100,22 +6100,22 @@
<section id="11.1" title="Deployment lifecycle">
<assertion id="a">
- <text>First, the container performs bean discovery and registers Bean and Observer objects for the discovered beans. The container detects definition errors by validating the bean classes and metadata, throwing a DeploymentException and aborting deployment of the application if any definition errors exist, as defined in Section 10.1, "Definition errors".</text>
+ <text>First, the container performs bean discovery and registers |Bean| and |Observer| objects for the discovered beans. The container detects definition errors by validating the bean classes and metadata, throwing a |DeploymentException| and aborting deployment of the application if any definition errors exist, as defined in Section 10.1, "Definition errors".</text>
<note>Test that beans and observers are registered and definition exceptions occur before @Initialized, and that this puts causes the app deployment to fail</note>
</assertion>
<assertion id="b">
- <text>Next, the container raises an event of type @Initialized Manager, allowing the application or third-party frameworks to register additional Bean and Observer objects.</text>
+ <text>Next, the container raises an event of type |@Initialized Manager|, allowing the application or third-party frameworks to register additional |Bean| and |Observer| objects.</text>
<note>Test that the @Initialized event is called, and that beans are registered</note>
</assertion>
<assertion id="c">
- <text>Next, the container detects deployment problems by validating bean dependencies and specialization, throwing a DeploymentException and aborting deployment of the application if any deployment problems exist, as defined in Section 10.2, "Deployment problems".</text>
+ <text>Next, the container detects deployment problems by validating bean dependencies and specialization, throwing a |DeploymentException| and aborting deployment of the application if any deployment problems exist, as defined in Section 10.2, "Deployment problems".</text>
<note>Test that validation happens after @Initialized and before @Deployed and that deployment problems cause deployment to fail</note>
</assertion>
<assertion id="d">
- <text>Next, the container raises an event of type @Deployed Manager.</text>
+ <text>Next, the container raises an event of type |@Deployed Manager|.</text>
<note>Test that the @Deployed event is called</note>
</assertion>
@@ -6129,56 +6129,56 @@
<section id="11.2" title="Bean discovery">
<assertion id="a" implied="true">
- <text>When bean discovery occurs, the container considers any beans.xml file in any metadata directory of the application classpath (standalone WAR)</text>
+ <text>When bean discovery occurs, the container considers any |beans.xml| file in any metadata directory of the application classpath (standalone WAR)</text>
</assertion>
<assertion id="b" implied="true">
- <text>When bean discovery occurs, the container considers any beans.xml file in any metadata directory of the application classpath (jar in WEB-INF/lib of standalone WAR)</text>
+ <text>When bean discovery occurs, the container considers any |beans.xml| file in any metadata directory of the application classpath (jar in |WEB-INF/lib| of standalone WAR)</text>
</assertion>
<assertion id="c" implied="true">
- <text>When bean discovery occurs, the container considers any beans.xml file in any metadata directory of the application classpath (WAR in EAR)</text>
+ <text>When bean discovery occurs, the container considers any |beans.xml| file in any metadata directory of the application classpath (WAR in EAR)</text>
</assertion>
<assertion id="d" implied="true">
- <text>When bean discovery occurs, the container considers any beans.xml file in any metadata directory of the application classpath (jar in WEB-INF/lib of WAR in EAR)</text>
+ <text>When bean discovery occurs, the container considers any |beans.xml| file in any metadata directory of the application classpath (jar in |WEB-INF/lib| of WAR in EAR)</text>
</assertion>
<assertion id="e" implied="true">
- <text>When bean discovery occurs, the container considers any beans.xml file in any metadata directory of the application classpath (ejb-jar)</text>
+ <text>When bean discovery occurs, the container considers any |beans.xml| file in any metadata directory of the application classpath (ejb-jar)</text>
</assertion>
<assertion id="f" implied="true">
- <text>When bean discovery occurs, the container considers any beans.xml file in any metadata directory of the application classpath (jar in EAR lib directory)</text>
+ <text>When bean discovery occurs, the container considers any |beans.xml| file in any metadata directory of the application classpath (jar in EAR lib directory)</text>
</assertion>
<assertion id="g">
- <text>When bean discovery occurs, the container considers any ejb-jar.xml file in any metadata directory of the application classpath that also contains a beans.xml file</text>
+ <text>When bean discovery occurs, the container considers any |ejb-jar.xml| file in any metadata directory of the application classpath that also contains a |beans.xml| file</text>
<note>What does this mean?</note>
</assertion>
<assertion id="h" implied="true">
- <text>When bean discovery occurs, the container considers any Java class in any archive or directory in the classpath that has a beans.xml file in the metadata directory (standalone WAR)</text>
+ <text>When bean discovery occurs, the container considers any Java class in any archive or directory in the classpath that has a |beans.xml| file in the metadata directory (standalone WAR)</text>
</assertion>
<assertion id="i" implied="true">
- <text>When bean discovery occurs, the container considers any Java class in any archive or directory in the classpath that has a beans.xml file in the metadata directory (jar in WEB-INF/lib of standalone WAR)</text>
+ <text>When bean discovery occurs, the container considers any Java class in any archive or directory in the classpath that has a |beans.xml| file in the metadata directory (jar in |WEB-INF/lib| of standalone WAR)</text>
</assertion>
<assertion id="j" implied="true">
- <text>When bean discovery occurs, the container considers any Java class in any archive or directory in the classpath that has a beans.xml file in the metadata directory (WAR in EAR)</text>
+ <text>When bean discovery occurs, the container considers any Java class in any archive or directory in the classpath that has a |beans.xml| file in the metadata directory (WAR in EAR)</text>
</assertion>
<assertion id="k" implied="true">
- <text>When bean discovery occurs, the container considers any Java class in any archive or directory in the classpath that has a beans.xml file in the metadata directory (jar in WEB-INF/lib of WAR in EAR)</text>
+ <text>When bean discovery occurs, the container considers any Java class in any archive or directory in the classpath that has a |beans.xml| file in the metadata directory (jar in |WEB-INF/lib| of WAR in EAR)</text>
</assertion>
<assertion id="l" implied="true">
- <text>When bean discovery occurs, the container considers any Java class in any archive or directory in the classpath that has a beans.xml file in the metadata directory (ejb-jar)</text>
+ <text>When bean discovery occurs, the container considers any Java class in any archive or directory in the classpath that has a |beans.xml| file in the metadata directory (ejb-jar)</text>
</assertion>
<assertion id="m" implied="true">
- <text>When bean discovery occurs, the container considers any Java class in any archive or directory in the classpath that has a beans.xml file in the metadata directory (jar in EAR lib dir)</text>
+ <text>When bean discovery occurs, the container considers any Java class in any archive or directory in the classpath that has a |beans.xml| file in the metadata directory (jar in EAR lib dir)</text>
</assertion>
<assertion id="n">
@@ -6224,53 +6224,53 @@
</assertion>
<assertion id="w">
- <text>The container discovers beans~, disposal methods and observer methods~ defined using XML by parsing the beans.xml files according to the rules of Chapter 9, XML based metadata.</text>
+ <text>The container discovers beans~, disposal methods and observer methods~ defined using XML by parsing the |beans.xml| files according to the rules of Chapter 9, XML based metadata.</text>
<note>Check all archive types enumerated above, simple beans, session beans, producer methods and producer fields</note>
</assertion>
<assertion id="x">
- <text>The container discovers ~beans, ~disposal methods ~and observer methods~ defined using XML by parsing the beans.xml files according to the rules of Chapter 9, XML based metadata.</text>
+ <text>The container discovers ~beans, ~disposal methods ~and observer methods~ defined using XML by parsing the |beans.xml| files according to the rules of Chapter 9, XML based metadata.</text>
<note>Check all archive types enumerated above</note>
</assertion>
<assertion id="y">
- <text>The container discovers ~beans, disposal methods and~ observer methods defined using XML by parsing the beans.xml files according to the rules of Chapter 9, XML based metadata.</text>
+ <text>The container discovers ~beans, disposal methods and~ observer methods defined using XML by parsing the |beans.xml| files according to the rules of Chapter 9, XML based metadata.</text>
<note>Check all archive types enumerated above</note>
</assertion>
<assertion id="z">
- <text>Next, the container determines which beans~, interceptors and decorators are enabled,~ according to the rules defined in Section 2.5.6, "Enabled deployment types", Section A.3.7, "Interceptor enablement and ordering" and Section A.5.5, "Decorator enablement and ordering", taking into account any <Deploy>, ~<Interceptors> and <Decorators>~ declarations in the beans.xml files.</text>
+ <text>Next, the container determines which beans~, interceptors and decorators are enabled,~ according to the rules defined in Section 2.5.6, "Enabled deployment types", Section A.3.7, "Interceptor enablement and ordering" and Section A.5.5, "Decorator enablement and ordering", taking into account any <Deploy>, ~<Interceptors> and <Decorators>~ declarations in the |beans.xml| files.</text>
</assertion>
<assertion id="aa">
- <text>Next, the container determines which ~beans,~ interceptors ~and decorators~ are enabled, according to the rules defined in Section 2.5.6, "Enabled deployment types", Section A.3.7, "Interceptor enablement and ordering" and Section A.5.5, "Decorator enablement and ordering", taking into account any ~<Deploy>,~ <Interceptors> ~and <Decorators>~ declarations in the beans.xml files.</text>
+ <text>Next, the container determines which ~beans,~ interceptors ~and decorators~ are enabled, according to the rules defined in Section 2.5.6, "Enabled deployment types", Section A.3.7, "Interceptor enablement and ordering" and Section A.5.5, "Decorator enablement and ordering", taking into account any ~<Deploy>,~ <Interceptors> ~and <Decorators>~ declarations in the |beans.xml| files.</text>
</assertion>
<assertion id="ab">
- <text>Next, the container determines which ~beans, interceptors and~ decorators are enabled, according to the rules defined in Section 2.5.6, "Enabled deployment types", Section A.3.7, "Interceptor enablement and ordering" and Section A.5.5, "Decorator enablement and ordering", taking into account any ~<Deploy>, <Interceptors> and~ <Decorators> declarations in the beans.xml files.</text>
+ <text>Next, the container determines which ~beans, interceptors and~ decorators are enabled, according to the rules defined in Section 2.5.6, "Enabled deployment types", Section A.3.7, "Interceptor enablement and ordering" and Section A.5.5, "Decorator enablement and ordering", taking into account any ~<Deploy>, <Interceptors> and~ <Decorators> declarations in the |beans.xml| files.</text>
</assertion>
<assertion id="ac">
- <text>For each enabled bean that is not an interceptor or decorator, the container creates an instance of Bean, and registers it by calling Manager.addBean()</text>
+ <text>For each enabled bean that is not an interceptor or decorator, the container creates an instance of |Bean|, and registers it by calling |Manager.addBean()|</text>
<note>Check that interceptors aren't registered as beans, decorators aren't registered as beans, that disabled beans aren't registered and that simple beans, session beans, producer methods and producer fields are registered</note>
</assertion>
<assertion id="ad">
- <text>For each enabled interceptor, the container creates an instance of Interceptor and registers it by calling Manager.addInterceptor()</text>
+ <text>For each enabled interceptor, the container creates an instance of |Interceptor| and registers it by calling |Manager.addInterceptor()|</text>
</assertion>
<assertion id="ae">
- <text>For each enabled decorator, the container creates an instance of Decorator and registers it by calling Manager.addDecorator().</text>
+ <text>For each enabled decorator, the container creates an instance of |Decorator| and registers it by calling |Manager.addDecorator()|.</text>
</assertion>
<assertion id="af">
- <text>For each observer method of an enabled bean, the container creates an instance of Observer that implements the rules of Section 7.5.8, "Observer object for an observer method" and registers it by calling Manager.addObserver()</text>
+ <text>For each observer method of an enabled bean, the container creates an instance of |Observer| that implements the rules of Section 7.5.8, "Observer object for an observer method" and registers it by calling |Manager.addObserver()|</text>
</assertion>
</section>
<section id="11.4" title="Providing additional XML based metadata">
<assertion id="a">
- <text>The container parses the XML stream according to the rules of Chapter 9, XML based metadata.This method may be called at any time by the application or third-party framework.</text>
+ <text>The container parses the XML stream according to the rules of Chapter 9, XML based metadata. This method may be called at any time by the application or third-party framework.</text>
<note>Check that the parse method adds beans etc.</note>
</assertion>
</section>
@@ -6278,7 +6278,7 @@
<section id="11.6" title="Activities">
<assertion id="a" testable="false">
- <text>The method createActivity() creates a new child activity of an activity:</text>
+ <text>The method |createActivity()| creates a new child activity of an activity:</text>
<note>A statement of intent</note>
</assertion>
@@ -6323,82 +6323,82 @@
</assertion>
<assertion id="m">
- <text>Beans ~and observers~ may be registered with an activity by calling addBean() ~or addObserver()~ on the Manager object that represents the activity.</text>
+ <text>|Beans| ~and observers~ may be registered with an activity by calling |addBean()| ~or |addObserver()|~ on the |Manager| object that represents the activity.</text>
</assertion>
<assertion id="n">
- <text>~Beans and~ observers may be registered with an activity by calling ~addBean() or~ addObserver() on the Manager object that represents the activity.</text>
+ <text>~|Beans| and~ observers may be registered with an activity by calling ~|addBean()| or~ |addObserver()| on the |Manager| object that represents the activity.</text>
</assertion>
<assertion id="o">
- <text>a bean registered with the child activity is not available for injection into any bean registered with a parent activity</text>
+ <text>A bean registered with the child activity is not available for injection into any bean registered with a parent activity</text>
</assertion>
<assertion id="p">
- <text>a bean registered with a child activity is not available for injection into a ~servlet or~ EJB</text>
+ <text>A bean registered with a child activity is not available for injection into a ~servlet or~ EJB</text>
</assertion>
<assertion id="q">
- <text>a bean registered with a child activity is not available for injection into a servlet ~or EJB~</text>
+ <text>A bean registered with a child activity is not available for injection into a servlet ~or EJB~</text>
</assertion>
<assertion id="r">
- <text>a bean registered with a child activity may not be obtained by dynamic lookup via the parent activity</text>
+ <text>A bean registered with a child activity may not be obtained by dynamic lookup via the parent activity</text>
</assertion>
<assertion id="s">
- <text>an observer registered with the child activity does not receive events fired via a parent activity</text>
+ <text>An observer registered with the child activity does not receive events fired via a parent activity</text>
</assertion>
<assertion id="t">
- <text>If a bean registered with a child activity has the bean type and all bindings of some injection point of some bean registered with a direct ~or indirect~ parent activity, a DeploymentException is throw by the container at deployment time.</text>
+ <text>If a bean registered with a child activity has the bean type and all bindings of some injection point of some bean registered with a direct ~or indirect~ parent activity, a |DeploymentException| is throw by the container at deployment time.</text>
</assertion>
<assertion id="u">
- <text>If a bean registered with a child activity has the bean type and all bindings of some injection point of some bean registered with a~ direct or~ indirect parent activity, a DeploymentException is throw by the container at deployment time.</text>
+ <text>If a bean registered with a child activity has the bean type and all bindings of some injection point of some bean registered with a~ direct or~ indirect parent activity, a |DeploymentException| is throw by the container at deployment time.</text>
</assertion>
<assertion id="v">
- <text>The addInterceptor() ~and addDecorator()~ methods throw UnsupportedOperationException when called on a Manager object that represents a child activity.</text>
+ <text>The |addInterceptor()| ~and |addDecorator()|~ methods throw |UnsupportedOperationException| when called on a |Manager| object that represents a child activity.</text>
</assertion>
<assertion id="w">
- <text>The ~addInterceptor() and~ addDecorator() methods throw UnsupportedOperationException when called on a Manager object that represents a child activity.</text>
+ <text>The ~|addInterceptor()| and~ |addDecorator()| methods throw |UnsupportedOperationException| when called on a |Manager| object that represents a child activity.</text>
</assertion>
</section>
<section id="11.6.1" title="Current Activity">
<assertion id="a">
- <text>An activity may be associated with the current context for a normal scope by calling setCurrent(), passing the normal scope type</text>
+ <text>An activity may be associated with the current context for a normal scope by calling |setCurrent()|, passing the normal scope type</text>
</assertion>
<assertion id="b">
- <text>If the given scope is inactive when setCurrent() is called, a ContextNotActiveException is thrown.</text>
+ <text>If the given scope is inactive when |setCurrent()| is called, a |ContextNotActiveException| is thrown.</text>
</assertion>
<assertion id="c">
- <text>If the given scope type is not a normal scope, an IllegalArgumentException is thrown.</text>
+ <text>If the given scope type is not a normal scope, an |IllegalArgumentException| is thrown.</text>
</assertion>
<assertion id="d">
- <text>All EL evaluations (as defined Section 5.10, "EL name resolution")~, all calls to any injected Manager object or Manager object obtained via JNDI lookup (as defined by Section 5.7, "The Manager object"), all calls to any injected Event object (as defined in Section 7.6, "The Event interface") and all calls to any injected Instance object (as defined by Section 5.8, "Dynamic lookup")~ are processed by the current activity</text>
+ <text>All EL evaluations (as defined Section 5.10, "EL name resolution")~, all calls to any injected |Manager| object or |Manager| object obtained via JNDI lookup (as defined by Section 5.7, "The Manager object"), all calls to any injected |Event| object (as defined in Section 7.6, "The Event interface") and all calls to any injected |Instance| object (as defined by Section 5.8, "Dynamic lookup")~ are processed by the current activity</text>
</assertion>
<assertion id="e">
- <text>~All EL evaluations (as defined Section 5.10, "EL name resolution"),~ all calls to any injected Manager object ~or Manager object obtained via JNDI lookup (as defined by Section 5.7, "The Manager object"), all calls to any injected Event object (as defined in Section 7.6, "The Event interface") and all calls to any injected Instance object (as defined by Section 5.8, "Dynamic lookup")~ are processed by the current activity</text>
+ <text>~All EL evaluations (as defined Section 5.10, "EL name resolution"),~ all calls to any injected |Manager| object ~or |Manager| object obtained via JNDI lookup (as defined by Section 5.7, "The Manager object"), all calls to any injected |Event| object (as defined in Section 7.6, "The Event interface") and all calls to any injected |Instance| object (as defined by Section 5.8, "Dynamic lookup")~ are processed by the current activity</text>
</assertion>
<assertion id="f">
- <text>~All EL evaluations (as defined Section 5.10, "EL name resolution"),~ all calls to any ~injected Manager object or~ Manager object obtained via JNDI lookup~ (as defined by Section 5.7, "The Manager object"), all calls to any injected Event object (as defined in Section 7.6, "The Event interface") and all calls to any injected Instance object (as defined by Section 5.8, "Dynamic lookup")~ are processed by the current activity</text>
+ <text>~All EL evaluations (as defined Section 5.10, "EL name resolution"),~ all calls to any ~injected |Manager| object or~ |Manager| object obtained via JNDI lookup~ (as defined by Section 5.7, "The Manager object"), all calls to any injected |Event| object (as defined in Section 7.6, "The Event interface") and all calls to any injected |Instance| object (as defined by Section 5.8, "Dynamic lookup")~ are processed by the current activity</text>
</assertion>
<assertion id="g">
- <text>~All EL evaluations (as defined Section 5.10, "EL name resolution"), all calls to any injected Manager object or Manager object obtained via JNDI lookup (as defined by Section 5.7, "The Manager object"),~ all calls to any injected Event object (as defined in Section 7.6, "The Event interface") ~and all calls to any injected Instance object (as defined by Section 5.8, "Dynamic lookup")~ are processed by the current activity</text>
+ <text>~All EL evaluations (as defined Section 5.10, "EL name resolution"), all calls to any injected |Manager| object or |Manager| object obtained via JNDI lookup (as defined by Section 5.7, "The Manager object"),~ all calls to any injected |Event| object (as defined in Section 7.6, "The Event interface") ~and all calls to any injected |Instance| object (as defined by Section 5.8, "Dynamic lookup")~ are processed by the current activity</text>
</assertion>
<assertion id="h">
- <text>~All EL evaluations (as defined Section 5.10, "EL name resolution"), all calls to any injected Manager object or Manager object obtained via JNDI lookup (as defined by Section 5.7, "The Manager object"), all calls to any injected Event object (as defined in Section 7.6, "The Event interface") and ~all calls to any injected Instance object (as defined by Section 5.8, "Dynamic lookup") are processed by the current activity</text>
+ <text>~All EL evaluations (as defined Section 5.10, "EL name resolution"), all calls to any injected |Manager| object or |Manager| object obtained via JNDI lookup (as defined by Section 5.7, "The Manager object"), all calls to any injected |Event| object (as defined in Section 7.6, "The Event interface") and ~all calls to any injected |Instance| object (as defined by Section 5.8, "Dynamic lookup") are processed by the current activity</text>
</assertion>
<assertion id="j">
15 years, 8 months
[webbeans-commits] Webbeans SVN: r2264 - doc/trunk/reference/zh-CN.
by webbeans-commits@lists.jboss.org
Author: alartin
Date: 2009-03-29 21:41:00 -0400 (Sun, 29 Mar 2009)
New Revision: 2264
Modified:
doc/trunk/reference/zh-CN/ri.po
Log:
Modified: doc/trunk/reference/zh-CN/ri.po
===================================================================
--- doc/trunk/reference/zh-CN/ri.po 2009-03-30 01:31:29 UTC (rev 2263)
+++ doc/trunk/reference/zh-CN/ri.po 2009-03-30 01:41:00 UTC (rev 2264)
@@ -6,7 +6,7 @@
"Project-Id-Version: master.xml\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-03-28 17:09+0000\n"
-"PO-Revision-Date: 2009-03-27 13:53+0800\n"
+"PO-Revision-Date: 2009-03-30 09:39+0800\n"
"Last-Translator: Sean Wu <alartin(a)gmail.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
@@ -15,48 +15,31 @@
#. Tag: title
#: ri.xml:4
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Web Beans, the Reference Implementation of JSR-299"
msgstr "使用Web Beans的参考实现"
#. Tag: para
#: ri.xml:6
-#, fuzzy, no-c-format
-msgid ""
-"The Web Beans 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 ""
-"Web Bean参考实现由<ulink url=\"http://seamframework.org/WebBeans\">Seam项目</"
-"ulink>开发。你可以从<ulink url=\"http://seamframework.org/Download\">the "
-"downloads page</ulink>下载最新的开发者版本。"
+#, no-c-format
+msgid "The Web Beans 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 "Web Bean参考实现由<ulink url=\"http://seamframework.org/WebBeans\">Seam项目</ulink>开发。你可以从<ulink url=\"http://seamframework.org/Download\">the downloads page</ulink>下载最新的开发者版本。"
#. Tag: para
#: ri.xml:13
-#, fuzzy, no-c-format
-msgid ""
-"Web Beans 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. There are also two variations on the "
-"numberguess example, the tomcat example (suitable for deployment to Tomcat) "
-"and the jsf2 example, which you can use if you are running JSF2. To run the "
-"examples you'll need the following:"
-msgstr ""
-"Web Beans RI自带了两个例子:<literal>webbeans-numberguess</literal> (一个仅包"
-"含一个简单Bean的WAR应用例子)和<literal>webbeans-translator</literal> (一个包"
-"含企业Bean的EAR应用例子)。为了运行例子,你需要:"
+#, no-c-format
+msgid "Web Beans 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. There are also two variations on the numberguess example, the tomcat example (suitable for deployment to Tomcat) and the jsf2 example, which you can use if you are running JSF2. To run the examples you'll need the following:"
+msgstr "Web Beans RI自带了两个例子:<literal>webbeans-numberguess</literal> (一个仅包含一个简单Bean的WAR应用例子)和<literal>webbeans-translator</literal> (一个包含企业Bean的EAR应用例子)。为了运行例子,你需要:"
#. Tag: para
#: ri.xml:25
-#, fuzzy, no-c-format
+#, no-c-format
msgid "the latest release of Web Beans,"
msgstr "最新的Web Bean参考实现版本,"
#. Tag: para
#: ri.xml:28
-#, fuzzy, no-c-format
+#, no-c-format
msgid "JBoss AS 5.0.1.GA, or"
msgstr "JBoss AS 5.0.0.GA, 和"
@@ -64,7 +47,7 @@
#: ri.xml:31
#, no-c-format
msgid "Apache Tomcat 6.0.x, and"
-msgstr ""
+msgstr "Apache Tomcat 6.0.X,和"
#. Tag: para
#: ri.xml:34
@@ -76,22 +59,17 @@
#: ri.xml:39
#, no-c-format
msgid "Using JBoss AS 5"
-msgstr ""
+msgstr "使用JBoss AS 5"
#. Tag: para
#: ri.xml:41
-#, fuzzy, no-c-format
-msgid ""
-"You'll need to download JBoss AS 5.0.1.GA from <ulink url=\"http://www.jboss."
-"org/jbossas/downloads/\">jboss.org</ulink>, and unzip it. For example:"
-msgstr ""
-"当前,Web Beans参考实现只能运行在JBoss AS 5之上。你需要从<ulink url=\"http://"
-"www.jboss.org/jbossas/downloads/\">jboss.org</ulink>下载JBoss AS 5.0.0.GA, 然"
-"后解压。例如:"
+#, no-c-format
+msgid "You'll need to download JBoss AS 5.0.1.GA from <ulink url=\"http://www.jboss.org/jbossas/downloads/\">jboss.org</ulink>, and unzip it. For example:"
+msgstr "当前,Web Beans参考实现只能运行在JBoss AS 5之上。你需要从<ulink url=\"http://www.jboss.org/jbossas/downloads/\">jboss.org</ulink>下载JBoss AS 5.0.0.GA, 然后解压。例如:"
#. Tag: programlisting
#: ri.xml:47
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"<![CDATA[$ cd /Applications\n"
"$ unzip ~/jboss-5.0.1.GA.zip]]>"
@@ -100,18 +78,16 @@
"$ unzip ~/jboss-5.0.0.GA.zip]]>"
#. Tag: para
-#: ri.xml:49 ri.xml:170
-#, fuzzy, no-c-format
-msgid ""
-"Next, download Web Beans from <ulink url=\"http://seamframework.org/Download"
-"\">seamframework.org</ulink>, and unzip it. For example"
-msgstr ""
-"然后从<ulink url=\"http://seamframework.org/WebBeans\">seamframework.org</"
-"ulink>下载Web Beans的参考实现,然后解压。例如:"
+#: ri.xml:49
+#: ri.xml:170
+#, no-c-format
+msgid "Next, download Web Beans from <ulink url=\"http://seamframework.org/Download\">seamframework.org</ulink>, and unzip it. For example"
+msgstr "然后从<ulink url=\"http://seamframework.org/WebBeans\">seamframework.org</ulink>下载Web Beans的参考实现,然后解压。例如:"
#. Tag: programlisting
-#: ri.xml:55 ri.xml:176
-#, fuzzy, no-c-format
+#: ri.xml:55
+#: ri.xml:176
+#, no-c-format
msgid ""
"<![CDATA[$ cd ~/\n"
"$ unzip ~/webbeans-$VERSION.zip]]>"
@@ -122,30 +98,33 @@
#. Tag: para
#: ri.xml:58
#, 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:"
-msgstr ""
-"然后,我们需要告诉Web Beans JBoss的位置。编辑<literal>jboss-as/build."
-"properties</literal>,设置<literal>jboss.home</literal>属性。例如:"
+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 "然后,我们需要告诉Web Beans JBoss的位置。编辑<literal>jboss-as/build.properties</literal>,设置<literal>jboss.home</literal>属性。例如:"
#. Tag: programlisting
#: ri.xml:64
-#, fuzzy, no-c-format
+#, no-c-format
msgid "jboss.home=/Applications/jboss-5.0.1.GA"
msgstr "jboss.home=/Applications/jboss-5.0.0.GA"
#. Tag: para
#: ri.xml:66
-#, fuzzy, no-c-format
-msgid ""
-"To install Web Beans, you'll need Ant 1.7.0 installed, and the "
-"<literal>ANT_HOME</literal> environment variable set. For example:"
-msgstr ""
-"为了安装更新,你需要安装Ant 1.7.0,设置<literal>ANT_HOME</literal>环境变量。"
-"例如:"
+#, no-c-format
+msgid "To install Web Beans, you'll need Ant 1.7.0 installed, and the <literal>ANT_HOME</literal> environment variable set. For example:"
+msgstr "为了安装更新,你需要安装Ant 1.7.0,设置<literal>ANT_HOME</literal>环境变量。例如:"
+#. Tag: para
+#: ri.xml:67
+#, no-c-format
+msgid "Web Beans is bundled with JBoss AS 5.1 and above."
+msgstr "JBoss AS 5.1版本及以上捆绑了Web Bean。"
+
+#. Tag: para
+#: ri.xml:72
+#, no-c-format
+msgid "To install Web Beans, you'll need Ant 1.7.0 installed, and the <literal>ANT_HOME</literal> environment variable set. For example:"
+msgstr "为了安装更新,你需要安装Ant 1.7.0,设置<literal>ANT_HOME</literal>环境变量。例如:"
+
#. Tag: programlisting
#: ri.xml:71
#, no-c-format
@@ -158,15 +137,13 @@
#. Tag: para
#: ri.xml:73
-#, fuzzy, no-c-format
-msgid ""
-"Then, you can install the update. The update script will use Maven to "
-"download Web Beans automatically."
+#, no-c-format
+msgid "Then, you can install the update. The update script will use Maven to download Web Beans automatically."
msgstr "然后,你需要安装更新,更新脚本使用Maven来自动下载Web Beans和EJB3。"
#. Tag: programlisting
#: ri.xml:78
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"$ cd webbeans-$VERSION/jboss-as\n"
"$ ant update"
@@ -182,10 +159,8 @@
#. Tag: para
#: ri.xml:85
-#, fuzzy, no-c-format
-msgid ""
-"The build scripts for the examples offer a number of targets for JBoss AS, "
-"these are:"
+#, no-c-format
+msgid "The build scripts for the examples offer a number of targets for JBoss AS, these are:"
msgstr "例子的构建脚本包含多个目标:"
#. Tag: para
@@ -197,17 +172,13 @@
#. Tag: para
#: ri.xml:97
#, no-c-format
-msgid ""
-"<literal>ant explode</literal> - update an exploded example, without "
-"restarting the deployment"
-msgstr ""
-"<literal>ant explode</literal> - 无需重新部署,更新一个exploded形式部署的例子"
+msgid "<literal>ant explode</literal> - update an exploded example, without restarting the deployment"
+msgstr "<literal>ant explode</literal> - 无需重新部署,更新一个exploded形式部署的例子"
#. Tag: para
#: ri.xml:103
#, no-c-format
-msgid ""
-"<literal>ant deploy</literal> - deploy the example in compressed jar format"
+msgid "<literal>ant deploy</literal> - deploy the example in compressed jar format"
msgstr "<literal>ant deploy</literal> - 以压缩jar包形式部署例子"
#. Tag: para
@@ -246,7 +217,7 @@
#. Tag: programlisting
#: ri.xml:130
-#, fuzzy, no-c-format
+#, no-c-format
msgid "$ /Application/jboss-5.0.0.GA/bin/run.sh"
msgstr "jboss.home=/Applications/jboss-5.0.0.GA"
@@ -257,31 +228,21 @@
msgstr "如果你使用Windows操作系统,则使用<literal>run.bat</literal> 脚本。"
#. Tag: para
-#: ri.xml:138 ri.xml:240
+#: ri.xml:138
+#: ri.xml:240
#, no-c-format
-msgid ""
-"Wait for the application to deploy, and enjoy hours of fun at <ulink url="
-"\"http://localhost:8080/webbeans-numberguess\"></ulink>!"
-msgstr ""
-"等待应用部署完毕,好好体验一下<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 "等待应用部署完毕,好好体验一下<ulink url=\"http://localhost:8080/webbeans-numberguess\"></ulink>!"
#. Tag: para
#: ri.xml:143
-#, fuzzy, no-c-format
-msgid ""
-"Web Beans 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 ""
-"Web Bean参考实现的第二个简单例子能够将你的文本翻译为拉丁文。猜数字例子是一个"
-"WAR应用,仅仅使用了一个简单Beans;翻译器例子是一个EAR应用,包含了打包在EJB模"
-"块中的企业Beans。试一下:"
+#, no-c-format
+msgid "Web Beans 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 "Web Bean参考实现的第二个简单例子能够将你的文本翻译为拉丁文。猜数字例子是一个WAR应用,仅仅使用了一个简单Beans;翻译器例子是一个EAR应用,包含了打包在EJB模块中的企业Beans。试一下:"
#. Tag: programlisting
#: ri.xml:150
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"$ cd examples/translator\n"
"ant deploy"
@@ -292,33 +253,24 @@
#. Tag: para
#: ri.xml:152
#, no-c-format
-msgid ""
-"Wait for the application to deploy, and visit <ulink url=\"http://"
-"localhost:8080/webbeans-translator\"></ulink>!"
-msgstr ""
-"等待应用部署,试一下<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 "等待应用部署,试一下<ulink url=\"http://localhost:8080/webbeans-translator\"></ulink>!"
#. Tag: title
#: ri.xml:160
#, no-c-format
msgid "Using Apache Tomcat 6.0"
-msgstr ""
+msgstr "使用Apache Tomcat 6.0"
#. Tag: para
#: ri.xml:162
-#, fuzzy, no-c-format
-msgid ""
-"You'll need to download Tomcat 6.0.18 or later from <ulink url=\"http://"
-"tomcat.apache.org/download-60.cgi\">tomcat.apache.org</ulink>, and unzip it. "
-"For example:"
-msgstr ""
-"然后从<ulink url=\"http://seamframework.org/WebBeans\">seamframework.org</"
-"ulink>下载Web Beans的参考实现,然后解压。例如:"
+#, no-c-format
+msgid "You'll need to download Tomcat 6.0.18 or later from <ulink url=\"http://tomcat.apache.org/download-60.cgi\">tomcat.apache.org</ulink>, and unzip it. For example:"
+msgstr "然后从<ulink url=\"http://seamframework.org/WebBeans\">seamframework.org</ulink>下载Web Beans的参考实现,然后解压。例如:"
#. Tag: programlisting
#: ri.xml:168
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"<![CDATA[$ cd /Applications\n"
"$ unzip ~/apache-tomcat-6.0.18.zip]]>"
@@ -328,75 +280,61 @@
#. Tag: para
#: ri.xml:178
-#, fuzzy, no-c-format
-msgid ""
-"Next, we need to tell Web Beans where Tomcat is located. Edit <literal>jboss-"
-"as/build.properties</literal> and set the <literal>tomcat.home</literal> "
-"property. For example:"
-msgstr ""
-"然后,我们需要告诉Web Beans JBoss的位置。编辑<literal>jboss-as/build."
-"properties</literal>,设置<literal>jboss.home</literal>属性。例如:"
+#, no-c-format
+msgid "Next, we need to tell Web Beans where Tomcat is located. Edit <literal>jboss-as/build.properties</literal> and set the <literal>tomcat.home</literal> property. For example:"
+msgstr "然后,我们需要告诉Web Beans JBoss的位置。编辑<literal>jboss-as/build.properties</literal>,设置<literal>jboss.home</literal>属性。例如:"
#. Tag: programlisting
#: ri.xml:184
-#, fuzzy, no-c-format
+#, no-c-format
msgid "tomcat.home=/Applications/apache-tomcat-6.0.18"
msgstr "jboss.home=/Applications/jboss-5.0.0.GA"
#. Tag: para
#: ri.xml:187
-#, fuzzy, no-c-format
-msgid ""
-"The build scripts for the examples offer a number of targets for Tomcat, "
-"these are:"
+#, no-c-format
+msgid "The build scripts for the examples offer a number of targets for Tomcat, these are:"
msgstr "例子的构建脚本包含多个目标:"
#. Tag: para
#: ri.xml:193
-#, fuzzy, no-c-format
-msgid ""
-"<literal>ant tomcat.restart</literal> - deploy the example in exploded format"
+#, no-c-format
+msgid "<literal>ant tomcat.restart</literal> - deploy the example in exploded format"
msgstr "<literal>ant restart</literal> - 以exploded形式部署例子"
#. Tag: para
#: ri.xml:199
-#, fuzzy, no-c-format
-msgid ""
-"<literal>ant tomcat.explode</literal> - update an exploded example, without "
-"restarting the deployment"
-msgstr ""
-"<literal>ant explode</literal> - 无需重新部署,更新一个exploded形式部署的例子"
+#, no-c-format
+msgid "<literal>ant tomcat.explode</literal> - update an exploded example, without restarting the deployment"
+msgstr "<literal>ant explode</literal> - 无需重新部署,更新一个exploded形式部署的例子"
#. Tag: para
#: ri.xml:205
-#, fuzzy, no-c-format
-msgid ""
-"<literal>ant tomcat.deploy</literal> - deploy the example in compressed jar "
-"format"
+#, no-c-format
+msgid "<literal>ant tomcat.deploy</literal> - deploy the example in compressed jar format"
msgstr "<literal>ant deploy</literal> - 以压缩jar包形式部署例子"
#. Tag: para
#: ri.xml:210
-#, fuzzy, no-c-format
-msgid ""
-"<literal>ant tomcat.undeploy</literal> - remove the example from the server"
+#, no-c-format
+msgid "<literal>ant tomcat.undeploy</literal> - remove the example from the server"
msgstr "<literal>ant undeploy</literal> - 将例子从服务器中移除"
#. Tag: para
#: ri.xml:215
-#, fuzzy, no-c-format
+#, no-c-format
msgid "<literal>ant tomcat.clean</literal> - clean the example"
msgstr "<literal>ant clean</literal> - 清除例子"
#. Tag: para
#: ri.xml:222
-#, fuzzy, no-c-format
+#, no-c-format
msgid "To deploy the numberguess example for tomcat:"
msgstr "部署猜数字(numberguess)例子:"
#. Tag: programlisting
#: ri.xml:226
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"$ cd examples/tomcat\n"
"ant tomcat.deploy"
@@ -408,17 +346,17 @@
#: ri.xml:228
#, no-c-format
msgid "Start Tomcat:"
-msgstr ""
+msgstr "启动Tomcat:"
#. Tag: programlisting
#: ri.xml:232
-#, fuzzy, no-c-format
+#, no-c-format
msgid "$ /Applications/apache-tomcat-6.0.18/bin/startup.sh"
msgstr "jboss.home=/Applications/jboss-5.0.0.GA"
#. Tag: para
#: ri.xml:235
-#, fuzzy, no-c-format
+#, no-c-format
msgid "If you use Windows, use the <literal>startup.bat</literal>script."
msgstr "如果你使用Windows操作系统,则使用<literal>run.bat</literal> 脚本。"
@@ -426,13 +364,13 @@
#: ri.xml:248
#, no-c-format
msgid "Using GlassFish"
-msgstr ""
+msgstr "使用Glassfish"
#. Tag: para
#: ri.xml:250
#, no-c-format
msgid "TODO"
-msgstr ""
+msgstr "待办"
#. Tag: title
#: ri.xml:254
@@ -443,37 +381,20 @@
#. Tag: para
#: ri.xml:256
#, 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."
-msgstr ""
-"在猜数字应用中,你有十次机会来猜一个1到100之间的数字。每次猜测之后,应用都会"
-"告诉你你猜的数字是高了还是低了。"
+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 "在猜数字应用中,你有十次机会来猜一个1到100之间的数字。每次猜测之后,应用都会告诉你你猜的数字是高了还是低了。"
#. Tag: para
#: ri.xml:262
#, 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."
-msgstr ""
-"猜数字应用由Web Beans,配置文件,Facelete JSF页面组成,打包为一个WAR。我们先"
-"看一下配置文件。"
+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 "猜数字应用由Web Beans,配置文件,Facelete JSF页面组成,打包为一个WAR。我们先看一下配置文件。"
#. Tag: para
#: ri.xml:268
#, 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:"
-msgstr ""
-"猜数字应用的所有的配置文件位于<literal>WEB-INF/</literal>,这个目录位于源码树"
-"的<literal>WebContent</literal>中。首先,我们在faces-config.xml文件中告诉JSF"
-"使用Faceletes:"
+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 "猜数字应用的所有的配置文件位于<literal>WEB-INF/</literal>,这个目录位于源码树的<literal>WebContent</literal>中。首先,我们在faces-config.xml文件中告诉JSF使用Faceletes:"
#. Tag: programlisting
#: ri.xml:276
@@ -483,8 +404,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"
@@ -496,8 +416,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"
@@ -508,12 +427,8 @@
#. Tag: para
#: ri.xml:278
#, no-c-format
-msgid ""
-"There is an empty <literal>web-beans.xml</literal> file, which marks this "
-"application as a Web Beans application."
-msgstr ""
-"这有一个空的<literal>web-beans.xml</literal>文件,标识这个应用是一个Web Beans"
-"应用。"
+msgid "There is an empty <literal>web-beans.xml</literal> file, which marks this application as a Web Beans application."
+msgstr "这有一个空的<literal>web-beans.xml</literal>文件,标识这个应用是一个Web Beans应用。"
#. Tag: para
#: ri.xml:283
@@ -523,19 +438,14 @@
#. Tag: section
#: ri.xml:285
-#, fuzzy, no-c-format
+#, 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"
@@ -561,23 +471,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 "
-"Web Beans 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 Web Beans 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=\"3!
0\"/> <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"
@@ -590,15 +484,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"
@@ -618,41 +509,19 @@
" 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"
+"<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"
@@ -679,31 +548,10 @@
" </session-config>\n"
" \n"
" <listener>\n"
-" <listener-class>org.jboss.webbeans.servlet.WebBeansListener</listener-"
-"class>\n"
+" <listener-class>org.jboss.webbeans.servlet.WebBeansListener</listener-class>\n"
" </listener>\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> <callout arearefs="
-"\"webbeans.listener\"> <para> Configure the Web Beans listener, so that Web "
-"Beans services can be used in the servlet request </para> </callout> </"
-"calloutlist> </programlistingco> <note> <para> The only configuration "
-"required by the Web Beans RI in <literal>web.xml</literal> is to add the Web "
-"Beans listener. </para> <para> Whilst this demo is a JSF demo, you can use "
-"the Web Beans RI with any Servlet based web framework; just configure the "
-"Web Beans listener. </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="
-"\"29\"/> <area id=\"submit\" coords=\"32\"/> </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> <callout arearefs=\"webbeans.listener\"> <para> Configure the Web Beans listener, so that Web Beans services can be used in the servlet request </para> </callout> </calloutlist> </programlistingco> <note> <para> The only configuration required by the Web Beans RI in <literal>web.xml</literal> is to add the Web Beans listener. </para> <para> Whilst this demo is a JSF demo, you can use the Web Beans RI with any Servlet based!
web framework; just configure the Web Beans listener. </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=\"29\"/> <area id=\"submit\" coords=\"32\"/> </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"
@@ -716,15 +564,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}\"/>\n"
-" <h:outputText id=\"Lower\" value=\"Lower!\" rendered=\"#{game."
-"number lt game.guess}\"/>\n"
+" <h:outputText id=\"Higher\" value=\"Higher!\" rendered=\"#{game.number gt game.guess}\"/>\n"
+" <h:outputText id=\"Lower\" value=\"Lower!\" rendered=\"#{game.number lt game.guess}\"/>\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"
@@ -745,34 +590,13 @@
" </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>"
#. Tag: para
#: ri.xml:387
#, 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:"
-msgstr ""
-"这个例子包括4个类,前面两个是绑定类型。首先,这有一个<literal>@Random</"
-"literal>绑定类型,用来注入一个随机数:"
+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 "这个例子包括4个类,前面两个是绑定类型。首先,这有一个<literal>@Random</literal>绑定类型,用来注入一个随机数:"
#. Tag: programlisting
#: ri.xml:393
@@ -793,9 +617,7 @@
#. Tag: para
#: ri.xml:395
#, 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 "这还有一个<literal>@MaxNumber</literal>绑定类型,用来注入一个最大值:"
#. Tag: programlisting
@@ -819,13 +641,8 @@
#. Tag: para
#: ri.xml:402
#, 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:"
-msgstr ""
-"<literal>Generator</literal>类通过一个生产者(producer)方法创建一个随机数。它"
-"也通过一个生产者方法暴露可能的最大值:"
+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 "<literal>Generator</literal>类通过一个生产者(producer)方法创建一个随机数。它也通过一个生产者方法暴露可能的最大值:"
#. Tag: programlisting
#: ri.xml:408
@@ -834,8 +651,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"
@@ -858,8 +674,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"
@@ -882,35 +697,20 @@
#. Tag: para
#: ri.xml:410
#, 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."
-msgstr ""
-"你会注意到<literal>Generator</literal>是应用范围的;因此我们不会每次都得到一"
-"个不同的随机对象。"
+msgid "You'll notice that the <literal>Generator</literal> is application scoped; therefore we don't get a different random each time."
+msgstr "你会注意到<literal>Generator</literal>是应用范围的;因此我们不会每次都得到一个不同的随机对象。"
#. Tag: para
#: ri.xml:415
#, 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 "最终的应用中的Web Bean是会话范围的 <literal>Game</literal> 。"
#. Tag: para
#: ri.xml:420
-#, fuzzy, 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>."
-msgstr ""
-"你也许注意到我们使用了 <literal>@Named</literal>注释,以便我们能够通过EL(表"
-"达式语言)在JSF页面中使用Bean。最后,我们通过构造器注入来初始化猜数字游戏并给"
-"它设一个随机数。当然,在玩家猜对数字后,我们需要告诉玩家他赢了,所以我们通过"
-"<literal>FacesMessage</literal>反馈给玩家一条信息。"
+#, 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>."
+msgstr "你也许注意到我们使用了 <literal>@Named</literal>注释,以便我们能够通过EL(表达式语言)在JSF页面中使用Bean。最后,我们通过构造器注入来初始化猜数字游戏并给它设一个随机数。当然,在玩家猜对数字后,我们需要告诉玩家他赢了,所以我们通过<literal>FacesMessage</literal>反馈给玩家一条信息。"
#. Tag: programlisting
#: ri.xml:428
@@ -994,8 +794,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"
@@ -1007,8 +806,7 @@
" 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"
"}]]>"
@@ -1091,8 +889,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"
@@ -1104,54 +901,46 @@
" 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"
"}]]>"
#. Tag: title
#: ri.xml:431
-#, fuzzy, no-c-format
+#, no-c-format
msgid "The numberguess example for Tomcat"
msgstr "猜数字例子"
#. Tag: para
#: ri.xml:433
#, no-c-format
-msgid ""
-"The numberguess for Tomcat differs in a couple of ways. Firstly, Web Beans "
-"should be deployed as a Web Application library in <literal>WEB-INF/lib</"
-"literal>. For your convenience we provide a single jar suitable for running "
-"Web Beans on Tomcat <literal>webbeans-tomcat.jar</literal>."
-msgstr ""
+msgid "The numberguess for Tomcat differs in a couple of ways. Firstly, Web Beans should be deployed as a Web Application library in <literal>WEB-INF/lib</literal>. For your convenience we provide a single jar suitable for running Web Beans on Tomcat <literal>webbeans-tomcat.jar</literal>."
+msgstr "在Tomcat中部署猜数字应用有很多地方不同。首先,WebBean应该作为一个Web应用库文件,部署在<literal>WEB-INF/lib</literal>目录中。为方便起见,我们提供了一个单一的jar库 <literal>webbeans-tomcat.jar</literal>,能够让我们在Tomcat中运行Web Bean。"
#. Tag: para
#: ri.xml:442
#, no-c-format
-msgid ""
-"Of course, you must also include JSF and EL, as well common annotations "
-"(<literal>jsr250-api.jar</literal>) which a JEE server includes by default."
-msgstr ""
+msgid "Of course, you must also include JSF and EL, as well common annotations (<literal>jsr250-api.jar</literal>) which a JEE server includes by default."
+msgstr "当然,你必须也要包含JSF和EL, 以及通用的注释(<literal>jsr250-api.jar</literal>),这些都是一个Java EE服务器默认应该包含的。 "
#. Tag: para
#: ri.xml:449
#, no-c-format
-msgid ""
-"Secondly, we need to explicitly specify the Tomcat servlet listener (used to "
-"boot Web Beans, and control it's interaction with requests) in <literal>web."
-"xml</literal>:"
-msgstr ""
+msgid "Secondly, we need to explicitly specify the Tomcat servlet listener (used to boot Web Beans, and control it's interaction with requests) in <literal>web.xml</literal>:"
+msgstr "第二,我们需要在<literal>web.xml</literal>中显式地指定Tomcat的Servlet监听器(用来启动Web Bean,并且控制其与请求的交互):"
#. Tag: programlisting
#: ri.xml:455
#, no-c-format
msgid ""
"<![CDATA[<listener>\n"
-" <listener-class>org.jboss.webbeans.environment.tomcat.Listener</listener-"
-"class>\n"
+" <listener-class>org.jboss.webbeans.environment.tomcat.Listener</listener-class>\n"
"</listener>]]>"
msgstr ""
+"<![CDATA[<listener>\n"
+" <listener-class>org.jboss.webbeans.environment.tomcat.Listener</listener-class>\n"
+"</listener>]]>"
#. Tag: title
#: ri.xml:461
@@ -1162,44 +951,30 @@
#. Tag: para
#: ri.xml:463
#, 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:468
-#, fuzzy, 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."
-msgstr ""
-"翻译器例子是一个EAR应用,包含EJBs和企业Beans。因此,它的结构比猜数字例子复"
-"杂。"
+#, 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."
+msgstr "翻译器例子是一个EAR应用,包含EJBs和企业Beans。因此,它的结构比猜数字例子复杂。"
#. Tag: para
#: ri.xml:474
#, 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 "EJB3.1和Java EE 6允许你在WAR包中打包EJBs, 这将让这个结构更加简单!"
#. Tag: para
#: ri.xml:480
-#, fuzzy, 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:"
-msgstr ""
-"首先,让我们看一下EAR聚合器,它位于<literal>webbeans-translator-ear</literal>"
-"模块下。Maven将为我们自动生成<literal>application.xml</literal>和"
-"<literal>jboss-app.xml</literal>文件:"
+#, 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:"
+msgstr "首先,让我们看一下EAR聚合器,它位于<literal>webbeans-translator-ear</literal>模块下。Maven将为我们自动生成<literal>application.xml</literal>和<literal>jboss-app.xml</literal>文件:"
#. Tag: programlisting
#: ri.xml:486
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"<![CDATA[<plugin>\n"
" <groupId>org.apache.maven.plugins</groupId>\n"
@@ -1227,33 +1002,22 @@
" </webModule>\n"
" </modules>\n"
" <jboss>\n"
-" <loader-repository>webbeans.jboss.org:loader=webbeans-translator</"
-"loader-repository>\n"
+" <loader-repository>webbeans.jboss.org:loader=webbeans-translator</loader-repository>\n"
" </jboss>\n"
" </configuration>\n"
"</plugin>]]>"
#. Tag: para
#: ri.xml:488
-#, fuzzy, 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>)."
-msgstr ""
-"我们需要在这里做些事情-首先我们需要设置上下文路径为一个不错的URL(<ulink url="
-"\"http://localhost:8080/webbeans-translator\">http://localhost:8080/webbeans-"
-"translator</ulink>),我们还需要将JBoss AS的类加载器隔离配置激活。"
+#, 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>)."
+msgstr "我们需要在这里做些事情-首先我们需要设置上下文路径为一个不错的URL(<ulink url=\"http://localhost:8080/webbeans-translator\">http://localhost:8080/webbeans-translator</ulink>),我们还需要将JBoss AS的类加载器隔离配置激活。"
#. Tag: para
#: ri.xml:494
-#, fuzzy, no-c-format
-msgid ""
-"If you aren't using Maven to generate these files, you would need "
-"<literal>META-INF/application.xml</literal>:"
-msgstr ""
-"如果你不使用Maven来生成这些文件,你将需要<literal>META-INF/jboss-app.xml</"
-"literal>:"
+#, no-c-format
+msgid "If you aren't using Maven to generate these files, you would need <literal>META-INF/application.xml</literal>:"
+msgstr "如果你不使用Maven来生成这些文件,你将需要<literal>META-INF/jboss-app.xml</literal>:"
#. Tag: programlisting
#: ri.xml:499
@@ -1262,12 +1026,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"
@@ -1283,12 +1045,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"
@@ -1303,26 +1063,15 @@
#. Tag: para
#: ri.xml:502
-#, fuzzy, 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 enable Facelets) and a <literal>web."
-"xml</literal> (to enable JSF) in <literal>WebContent/WEB-INF</literal>."
-msgstr ""
-"然后,我们看一下WAR包。在猜数字例子中,我们需要<literal>faces-config.xml</"
-"literal>(配置Facelets)和一个位于<literal>WebContent/WEB-INF</literal>下的"
-"<literal>web.xml</literal>(配置JSF并将Web Beans服务加入Servlet容器中)。"
+#, 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 enable Facelets) and a <literal>web.xml</literal> (to enable JSF) in <literal>WebContent/WEB-INF</literal>."
+msgstr "然后,我们看一下WAR包。在猜数字例子中,我们需要<literal>faces-config.xml</literal>(配置Facelets)和一个位于<literal>WebContent/WEB-INF</literal>下的<literal>web.xml</literal>(配置JSF并将Web Beans服务加入Servlet容器中)。"
#. Tag: para
#: ri.xml:509
#, 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):"
-msgstr ""
-"更有意思的是用来翻译文本的facelet。在猜数字应用中我们有一个模板,这个模板套着"
-"表单(省略了表单):"
+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 "更有意思的是用来翻译文本的facelet。在猜数字应用中我们有一个模板,这个模板套着表单(省略了表单):"
#. Tag: programlisting
#: ri.xml:515
@@ -1341,8 +1090,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"
@@ -1350,8 +1098,7 @@
" </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>]]>"
@@ -1369,8 +1116,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"
@@ -1378,8 +1124,7 @@
" </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>]]>"
@@ -1387,54 +1132,26 @@
#. Tag: para
#: ri.xml:517
#, 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:522
-#, fuzzy, 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."
-msgstr ""
-"最后,我们看一下EJB模块,<literal>webbeans-translator-ejb</literal>。在"
-"<literal>src/main/resources/META-INF</literal>下有两个配置文件,一个是空的"
-"<literal>web-beans.xml</literal>,用来标识这个档案包包含Web Beans,一个是"
-"<literal>ejb-jar.xml</literal>。Web Beans为所有的EJB提供注入和初始化服务,使"
-"用<literal>ejb-jar.xml</literal>文件来配置。你将在使用Web Beans的EJB项目中需"
-"要这些配置:"
+#, 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."
+msgstr "最后,我们看一下EJB模块,<literal>webbeans-translator-ejb</literal>。在<literal>src/main/resources/META-INF</literal>下有两个配置文件,一个是空的<literal>web-beans.xml</literal>,用来标识这个档案包包含Web Beans,一个是<literal>ejb-jar.xml</literal>。Web Beans为所有的EJB提供注入和初始化服务,使用<literal>ejb-jar.xml</literal>文件来配置。你将在使用Web Beans的EJB项目中需要这些配置:"
#. Tag: para
#: ri.xml:530
-#, fuzzy, 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."
-msgstr ""
-"我们将最有意思的部分放在最后,那就是代码!这个例子有两个简单Beans, "
-"<literal>SentanceParser</literal>和<literal>TextTranslator</literal>,还有两"
-"个企业Beans,<literal>TanslatorControllerBean</literal>和"
-"<literal>SentenceTranslator</literal>。现在你应该对Web Beans有点熟悉了,我们"
-"在这里着重最有意思的部分。"
+#, 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."
+msgstr "我们将最有意思的部分放在最后,那就是代码!这个例子有两个简单Beans, <literal>SentanceParser</literal>和<literal>TextTranslator</literal>,还有两个企业Beans,<literal>TanslatorControllerBean</literal>和<literal>SentenceTranslator</literal>。现在你应该对Web Beans有点熟悉了,我们在这里着重最有意思的部分。"
#. Tag: para
#: ri.xml:540
-#, fuzzy, no-c-format
-msgid ""
-"Both <literal>SentenceParser</literal> and <literal>TextTranslator</literal> "
-"are dependent beans, and <literal>TextTranslator</literal> uses constructor "
-"initialization:"
-msgstr ""
-"<literal>SentanceParser</literal>和<literal>TextTranslator</literal>是相互依"
-"赖的Beans,<literal>TextTranslator</literal>使用构造器初始化:"
+#, no-c-format
+msgid "Both <literal>SentenceParser</literal> and <literal>TextTranslator</literal> are dependent beans, and <literal>TextTranslator</literal> uses constructor initialization:"
+msgstr "<literal>SentanceParser</literal>和<literal>TextTranslator</literal>是相互依赖的Beans,<literal>TextTranslator</literal>使用构造器初始化:"
#. Tag: programlisting
#: ri.xml:546
@@ -1445,8 +1162,7 @@
" 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;]]>"
@@ -1456,8 +1172,7 @@
" 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;]]>"
@@ -1465,25 +1180,14 @@
#. Tag: para
#: ri.xml:548
#, 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!"
-msgstr ""
-"<literal>TextTranslator</literal>是一个无状态Bean(拥有一个本地业务接口),这"
-"里是魔术展现的地方-当然,我们不会开发一个完整的翻译器,但我们可以开发一个不错"
-"的小玩意!"
+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 "<literal>TextTranslator</literal>是一个无状态Bean(拥有一个本地业务接口),这里是魔术展现的地方-当然,我们不会开发一个完整的翻译器,但我们可以开发一个不错的小玩意!"
#. Tag: para
#: ri.xml:554
#, 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."
-msgstr ""
-"最后,这里又要一个面向UI的控制器,从用户输入处搜集文本,转发给翻译器。这个控"
-"制器是请求范围的,具名的,有状态的会话Bean,它可以将翻译器注入进来。"
+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 "最后,这里又要一个面向UI的控制器,从用户输入处搜集文本,转发给翻译器。这个控制器是请求范围的,具名的,有状态的会话Bean,它可以将翻译器注入进来。"
#. Tag: programlisting
#: ri.xml:560
@@ -1536,34 +1240,20 @@
#. Tag: para
#: ri.xml:572
#, 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."
-msgstr ""
-"Web Beans管理器在这个bean销毁的时候调用remove方法;在这个例子中是请求结束的时"
-"候。"
+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 "Web Beans管理器在这个bean销毁的时候调用remove方法;在这个例子中是请求结束的时候。"
#. Tag: para
#: ri.xml:578
-#, fuzzy, no-c-format
-msgid ""
-"That concludes our short tour of the Web Beans examples. For more on Web "
-"Beans , or to help out, please visit <ulink url=\"http://www.seamframework."
-"org/WebBeans/Development\">http://www.seamframework.org/WebBeans/"
-"Development</ulink>."
-msgstr ""
-"Web Beans参考实现的例子到此结束。想要获得关于参考实现更多的知识或者帮助,请访"
-"问<ulink url=\"http://www.seamframework.org/WebBeans/Development\">http://"
-"www.seamframework.org/WebBeans/Development</ulink>。"
+#, no-c-format
+msgid "That concludes our short tour of the Web Beans examples. For more on Web Beans , or to help out, please visit <ulink url=\"http://www.seamframework.org/WebBeans/Development\">http://www.seamframework.org/WebBeans/Development</ulink>."
+msgstr "Web Beans参考实现的例子到此结束。想要获得关于参考实现更多的知识或者帮助,请访问<ulink url=\"http://www.seamframework.org/WebBeans/Development\">http://www.seamframework.org/WebBeans/Development</ulink>。"
#. Tag: para
#: ri.xml:584
#, no-c-format
-msgid ""
-"We need help in all areas - bug fixing, writing new features, writing "
-"examples and translating this reference guide."
-msgstr ""
-"我们在各个方面都需要帮助-bug修复,新特性开发,例子开发和参考指南的翻译等等。"
+msgid "We need help in all areas - bug fixing, writing new features, writing examples and translating this reference guide."
+msgstr "我们在各个方面都需要帮助-bug修复,新特性开发,例子开发和参考指南的翻译等等。"
#, fuzzy
#~ msgid ""
@@ -1576,10 +1266,8 @@
#~ "deployer</literal>。这个部署器提供JBoss AS对Web Bean档案包的支持,能够让"
#~ "Web Beans参考实现查询EJB3容器,发现应用中安装的EJB。第二,需要更新JBoss "
#~ "EJB3。"
-
#~ msgid "Web Beans is bundled with JBoss AS 5.1 and above."
#~ msgstr "JBoss AS 5.1版本及以上捆绑了Web Bean。"
-
#~ 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 "
@@ -1587,7 +1275,6 @@
#~ msgstr ""
#~ "因为Web Beans是新的软件,你需要更新JBoss AS来运行Web Beans的参考实现。"
#~ "JBoss AS未来的版本将包括这些更新,这些步骤将不再是必须的。"
-
#~ msgid ""
#~ "The final Web Bean in the application is the session scoped "
#~ "<literal>Game</literal>. By making <literal>Game</literal> session "
@@ -1597,7 +1284,6 @@
#~ "最后,应用的Web Bean是会话范围的 <literal>Game</literal>。通过将 "
#~ "<literal>Game</literal>的范围设为会话范围,你可以为每个浏览器会话启动一个"
#~ "猜数字游戏。你可以简单地添加一个复位按钮-对于读者来说是一个很好的练习 :)"
-
#~ msgid ""
#~ "<![CDATA[@Named\n"
#~ "@SessionScoped\n"
@@ -1676,7 +1362,6 @@
#~ " }\n"
#~ " \n"
#~ "}]]>"
-
#~ msgid ""
#~ "<![CDATA[<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
#~ "<!DOCTYPE jboss-app\n"
@@ -1695,10 +1380,8 @@
#~ " <loader-repository>webbeans.jboss.org:loader=webbeans-translator</"
#~ "loader-repository>\n"
#~ "</jboss-app>]]>"
-
#~ msgid "and <literal>META-INF/application.xml</literal>:"
#~ msgstr "和 <literal>META-INF/application.xml</literal>:"
-
#~ msgid ""
#~ "<![CDATA[<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
#~ "<ejb-jar xmlns=\"http://java.sun.com/xml/ns/javaee\" \n"
@@ -1747,3 +1430,4 @@
#~ " </assembly-descriptor>\n"
#~ " \n"
#~ "</ejb-jar>]]>"
+
15 years, 8 months
[webbeans-commits] Webbeans SVN: r2263 - in tck/trunk/impl/src/main: resources and 1 other directory.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-03-29 21:31:29 -0400 (Sun, 29 Mar 2009)
New Revision: 2263
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/deployment/enterprise/Woof.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/deployment/enterprise/WoofBinding.java
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/deployment/enterprise/BorderCollie.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/deployment/enterprise/EnterpriseDeploymentTypeDefinitionTest.java
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
fixed test
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/deployment/enterprise/BorderCollie.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/deployment/enterprise/BorderCollie.java 2009-03-30 01:22:04 UTC (rev 2262)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/deployment/enterprise/BorderCollie.java 2009-03-30 01:31:29 UTC (rev 2263)
@@ -2,6 +2,7 @@
import javax.ejb.Stateless;
+@Woof
@Stateless
public class BorderCollie extends Dog implements BorderCollieLocal
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/deployment/enterprise/EnterpriseDeploymentTypeDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/deployment/enterprise/EnterpriseDeploymentTypeDefinitionTest.java 2009-03-30 01:22:04 UTC (rev 2262)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/deployment/enterprise/EnterpriseDeploymentTypeDefinitionTest.java 2009-03-30 01:31:29 UTC (rev 2263)
@@ -19,8 +19,8 @@
@SpecAssertion(section = "4.1", id = "cb")
public void testDeploymentTypeDeclaredInheritedIsInherited() throws Exception
{
- assert getCurrentManager().resolveByType(BorderCollieLocal.class).size() == 1;
- assert getCurrentManager().resolveByType(BorderCollieLocal.class).iterator().next().getDeploymentType().equals(AnotherDeploymentType.class);
+ assert getCurrentManager().resolveByType(BorderCollieLocal.class, new WoofBinding()).size() == 1;
+ assert getCurrentManager().resolveByType(BorderCollieLocal.class, new WoofBinding()).iterator().next().getDeploymentType().equals(AnotherDeploymentType.class);
}
@Test(groups = { "deploymentType" })
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/deployment/enterprise/Woof.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/deployment/enterprise/Woof.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/deployment/enterprise/Woof.java 2009-03-30 01:31:29 UTC (rev 2263)
@@ -0,0 +1,22 @@
+package org.jboss.jsr299.tck.tests.definition.deployment.enterprise;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.BindingType;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+public @interface Woof
+{
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/deployment/enterprise/WoofBinding.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/deployment/enterprise/WoofBinding.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/deployment/enterprise/WoofBinding.java 2009-03-30 01:31:29 UTC (rev 2263)
@@ -0,0 +1,8 @@
+package org.jboss.jsr299.tck.tests.definition.deployment.enterprise;
+
+import javax.inject.AnnotationLiteral;
+
+public class WoofBinding extends AnnotationLiteral<Woof> implements Woof
+{
+
+}
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-03-30 01:22:04 UTC (rev 2262)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-03-30 01:31:29 UTC (rev 2263)
@@ -2937,7 +2937,7 @@
</section>
<section id="5.7.1" title="Resolving dependencies">
- <assertion id="a">
+ <assertion id="a" testable="false">
<text>Implementations of Bean maintain a reference to an instance of |Manager|</text>
</assertion>
15 years, 8 months
[webbeans-commits] Webbeans SVN: r2262 - doc/trunk/reference/zh-CN.
by webbeans-commits@lists.jboss.org
Author: alartin
Date: 2009-03-29 21:22:04 -0400 (Sun, 29 Mar 2009)
New Revision: 2262
Modified:
doc/trunk/reference/zh-CN/scopescontexts.po
Log:
Modified: doc/trunk/reference/zh-CN/scopescontexts.po
===================================================================
--- doc/trunk/reference/zh-CN/scopescontexts.po 2009-03-30 01:21:32 UTC (rev 2261)
+++ doc/trunk/reference/zh-CN/scopescontexts.po 2009-03-30 01:22:04 UTC (rev 2262)
@@ -6,7 +6,7 @@
"Project-Id-Version: master.xml\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-02-07 18:51+0000\n"
-"PO-Revision-Date: 2009-02-04 15:24+0800\n"
+"PO-Revision-Date: 2009-03-30 09:18+0800\n"
"Last-Translator: Sean Wu <alartin(a)gmail.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
@@ -22,16 +22,8 @@
#. 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 ""
-"目前为止,我们已经看到了几个 <emphasis>范围类型注释</emphasis>的例子。Web "
-"Bean的范围决定了Web Bean实例的生命周期。范围还决定了哪个客户端引用了哪个Web "
-"Bean实例。根据Web Beans规范,一个范围决定:"
+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 "目前为止,我们已经看到了几个 <emphasis>范围类型注释</emphasis>的例子。Web Bean的范围决定了Web Bean实例的生命周期。范围还决定了哪个客户端引用了哪个Web Bean实例。根据Web Beans规范,一个范围决定:"
#. Tag: para
#: scopescontexts.xml:14
@@ -48,25 +40,14 @@
#. 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 "注入的引用指向该范围的Web Bean的哪个实例"
#. 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."
-msgstr ""
-"例如,如果我们有一个会话范围的Web Bean:<literal>CurrentUser</literal>。那么"
-"在同一个<literal>HttpSession</literal>的上下文中调用的所有的Web Bean都将看到"
-"同一个<literal>CurrentUser</literal>实例。这个实例在会话第一次需要"
-"<literal>CurrentUser</literal>时被自动创建,在会话结束时被自动销毁。"
+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 "例如,如果我们有一个会话范围的Web Bean:<literal>CurrentUser</literal>。那么在同一个<literal>HttpSession</literal>的上下文中调用的所有的Web Bean都将看到同一个<literal>CurrentUser</literal>实例。这个实例在会话第一次需要<literal>CurrentUser</literal>时被自动创建,在会话结束时被自动销毁。"
#. Tag: title
#: scopescontexts.xml:32
@@ -77,12 +58,8 @@
#. 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:"
-msgstr ""
-"Web Bean有一个特性是<emphasis>可扩展的上下文模型</emphasis>。我们可以创建一个"
-"新的范围类型注释来定一个新的范围:"
+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 "Web Bean有一个特性是<emphasis>可扩展的上下文模型</emphasis>。我们可以创建一个新的范围类型注释来定一个新的范围:"
#. Tag: programlisting
#: scopescontexts.xml:37
@@ -101,22 +78,13 @@
#. 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."
-msgstr ""
-"当然,这是这项工作最简单的部分。为了让这个范围类型可以使用,我们还需要定义一"
-"个<literal>Context(上下文)</literal>对象来实现这个范围!实现上下文通常是一"
-"个非常具备挑战的技术任务,这常常只能由开发编程框架的专家完成。"
+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 "当然,这是这项工作最简单的部分。为了让这个范围类型可以使用,我们还需要定义一个<literal>Context(上下文)</literal>对象来实现这个范围!实现上下文通常是一个非常具备挑战的技术任务,这常常只能由开发编程框架的专家完成。"
#. 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 "我们可以在Web Bean实现类中应用范围类型注释来指定Web Bean的范围:"
#. Tag: programlisting
@@ -180,9 +148,7 @@
#. Tag: para
#: scopescontexts.xml:86
#, no-c-format
-msgid ""
-"any servlet request has access to active request, session and application "
-"scopes, and, additionally"
+msgid "any servlet request has access to active request, session and application scopes, and, additionally"
msgstr "任何Servlet请求可以访问激活的请求,会话和应用范围,并且"
#. Tag: para
@@ -224,24 +190,14 @@
#. 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."
-msgstr ""
-"如果应用试图调用一个Web Bean,而对应的范围上下文没有处于激活状态时,Web Bean"
-"管理器在运行时将抛出一个<literal>ContextNotActiveException</literal>异常。"
+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 "如果应用试图调用一个Web Bean,而对应的范围上下文没有处于激活状态时,Web Bean管理器在运行时将抛出一个<literal>ContextNotActiveException</literal>异常。"
#. 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."
-msgstr ""
-"这四个内置范围的其中三个对于每个Java EE程序员来说都非常熟悉,所以让我们别浪费"
-"时间来讨论他们。不过有一个范围是新的。"
+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 "这四个内置范围的其中三个对于每个Java EE程序员来说都非常熟悉,所以让我们别浪费时间来讨论他们。不过有一个范围是新的。"
#. Tag: title
#: scopescontexts.xml:122
@@ -252,15 +208,8 @@
#. 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:"
-msgstr ""
-"Web Beans的对话(Conversation)范围有点类似与传统的会话范围(Session),传统的会"
-"话范围常常用来存储和系统用户相关的状态,并且能够跨越多个请求。然而,对话范围"
-"还有很多地方和会话范围不一样:"
+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 "Web Beans的对话(Conversation)范围有点类似与传统的会话范围(Session),传统的会话范围常常用来存储和系统用户相关的状态,并且能够跨越多个请求。然而,对话范围还有很多地方和会话范围不一样:"
#. Tag: para
#: scopescontexts.xml:130
@@ -271,35 +220,20 @@
#. 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 "在一个JSF应用中持有与一个特定的Web浏览标签页关联的状态。"
#. 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."
-msgstr ""
-"从用户角度出发,一个对话代表一个任务,或者一个工作单元。用户当前工作相关的状"
-"态由对话上下文维护。如果用户同时处理多个事情,就会有多个对话与之对应。"
+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>."
-msgstr ""
-"一个对话上下文在任何JSF请求中都是激活的。但是,大部分对话都在请求结束的时候被"
-"销毁了。如果一个对话需要跨越多个请求来维护状态的话,它必须显式地升级为"
-"<emphasis>长时对话</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 "一个对话上下文在任何JSF请求中都是激活的。但是,大部分对话都在请求结束的时候被销毁了。如果一个对话需要跨越多个请求来维护状态的话,它必须显式地升级为<emphasis>长时对话</emphasis>。"
#. Tag: title
#: scopescontexts.xml:149
@@ -310,13 +244,8 @@
#. 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:"
-msgstr ""
-"Web Beans提供了一个内置的Web Bean来在控制一个JSF应用中对话的生命周期。这个"
-"Web Bean可以通过注入来获得:"
+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 "Web Beans提供了一个内置的Web Bean来在控制一个JSF应用中对话的生命周期。这个Web Bean可以通过注入来获得:"
#. Tag: programlisting
#: scopescontexts.xml:154
@@ -327,23 +256,13 @@
#. 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>."
-msgstr ""
-"将当前请求关联的对话升级为长时对话的方法是从应用代码中调用 <literal>begin()</"
-"literal>方法。将当前长时对话上下文在当前请求结束时销毁的方法是调用"
-"<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 "将当前请求关联的对话升级为长时对话的方法是从应用代码中调用 <literal>begin()</literal>方法。将当前长时对话上下文在当前请求结束时销毁的方法是调用<literal>end()</literal>方法。"
#. 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 "在下面的例子中,一个对话范围的Web Bean控制和它关联的对话:"
#. Tag: programlisting
@@ -415,13 +334,8 @@
#. 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."
-msgstr ""
-"Web Bean可以通过<literal>Conversation</literal>接口控制自己的生命周期。但是其"
-"他一些Web Bean的生命周期完全依赖与其他对象。"
+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 "Web Bean可以通过<literal>Conversation</literal>接口控制自己的生命周期。但是其他一些Web Bean的生命周期完全依赖与其他对象。"
#. Tag: title
#: scopescontexts.xml:173
@@ -432,29 +346,14 @@
#. 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."
-msgstr ""
-"对话上下文在任何JSF faces请求中自动传播(JSF表单提交)。在非faces请求中,对话"
-"上下文将不会自动传播,例如通过一个链接来导航。"
+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 "对话上下文在任何JSF faces请求中自动传播(JSF表单提交)。在非faces请求中,对话上下文将不会自动传播,例如通过一个链接来导航。"
#. 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>."
-msgstr ""
-"我们可以强迫在非faces请求中传播对话,方法是在请求参数中包含一个对话的唯一标识"
-"符即可。Web Beans规范为此保留了一个请求参数关键字<literal>cid</literal>。对话"
-"的唯一标识符可以通过<literal>Conversation</literal>对象获得,它拥有Web Beans"
-"的名字<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 "我们可以强迫在非faces请求中传播对话,方法是在请求参数中包含一个对话的唯一标识符即可。Web Beans规范为此保留了一个请求参数关键字<literal>cid</literal>。对话的唯一标识符可以通过<literal>Conversation</literal>对象获得,它拥有Web Beans的名字<literal>conversation</literal>。"
#. Tag: para
#: scopescontexts.xml:186
@@ -465,27 +364,14 @@
#. Tag: programlisting
#: scopescontexts.xml:188
#, no-c-format
-msgid ""
-"<![CDATA[<a href=\"/addProduct.jsp?cid=#{conversation.id}\">Add Product</a>]]"
-">"
-msgstr ""
-"<![CDATA[<a href=\"/addProduct.jsp?cid=#{conversation.id}\">Add Product</a>]]"
-">"
+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."
-msgstr ""
-"Web Bean管理器也需要能够跨越任何重定向来传播对话,甚至这个对话没有被升级为长"
-"时对话。这样我们就能很容易实现常用的POST-then-redirect模式,而不需要构建一个"
-"脆弱的 \"闪存\"对象。在这个例子中,Web Bean管理器自动向重定向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 "Web Bean管理器也需要能够跨越任何重定向来传播对话,甚至这个对话没有被升级为长时对话。这样我们就能很容易实现常用的POST-then-redirect模式,而不需要构建一个脆弱的 \"闪存\"对象。在这个例子中,Web Bean管理器自动向重定向URL中添加一个请求参数。"
#. Tag: title
#: scopescontexts.xml:200
@@ -495,29 +381,15 @@
#. Tag: para
#: scopescontexts.xml:202
-#, fuzzy, 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."
-msgstr ""
-"Web Bean管理器可以在任何时候销毁一个对话及其上下文中维护的所有状态,这样的设"
-"计可以降低资源的消耗。一个Web Bean管理器的实现将根据超时—设置自动的完成"
-"上述任务,虽然这个特性在Web Bean规范中没有要求。超时指的是对话被销毁前的非激"
-"活时间。"
+#, 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."
+msgstr "Web Bean管理器可以在任何时候销毁一个对话及其上下文中维护的所有状态,这样的设计可以降低资源的消耗。一个Web Bean管理器的实现将根据超时—设置自动的完成上述任务,虽然这个特性在Web Bean规范中没有要求。超时指的是对话被销毁前的非激活时间。"
#. 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."
-msgstr ""
-"<literal>Conversation</literal>对象提供一个方法来设置超时。这个方法可以让Web "
-"Bean管理器忽略原来的配置。"
+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 "<literal>Conversation</literal>对象提供一个方法来设置超时。这个方法可以让Web Bean管理器忽略原来的配置。"
#. Tag: programlisting
#: scopescontexts.xml:212
@@ -534,19 +406,13 @@
#. 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."
-msgstr ""
-"除了内置的四个范围,Web Beans还提供了一个<emphasis>依赖的伪范围</emphasis>。"
-"这个范围是没有显式设置范围类型的Web Bean的默认范围。"
+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 "除了内置的四个范围,Web Beans还提供了一个<emphasis>依赖的伪范围</emphasis>。这个范围是没有显式设置范围类型的Web Bean的默认范围。"
#. 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 "例如,这个Web Bean有一个范围类型<literal>@Dependent</literal>:"
#. Tag: programlisting
@@ -558,36 +424,20 @@
#. 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."
-msgstr ""
-"当一个注入点被解析为一个依赖的Web Bean之后,每当第一个Web Bean被初始化时,都"
-"会创建一个依赖的Web Bean实例。不同的Web Beans或者不同的注入点的依赖的Web "
-"Beans的实例都不会被共享。它们是其它Web Bean实例的<emphasis>依赖的对象</"
-"emphasis>。"
+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 "当一个注入点被解析为一个依赖的Web Bean之后,每当第一个Web Bean被初始化时,都会创建一个依赖的Web Bean实例。不同的Web Beans或者不同的注入点的依赖的Web Beans的实例都不会被共享。它们是其它Web Bean实例的<emphasis>依赖的对象</emphasis>。"
#. 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 "依赖的Web Bean实例在它们所依赖对象实例销毁的时候被销毁。"
#. 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."
-msgstr ""
-"Web Bean能够让我们轻松获得一个Java类或者EJB Bean的依赖实例,甚至这个类或者"
-"EJB Bean已经被声明为一个其他范围的Web Bean也没问题。"
+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 "Web Bean能够让我们轻松获得一个Java类或者EJB Bean的依赖实例,甚至这个类或者EJB Bean已经被声明为一个其他范围的Web Bean也没问题。"
#. Tag: title
#: scopescontexts.xml:248
@@ -598,13 +448,8 @@
#. 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:"
-msgstr ""
-"内置的<literal>@New</literal>绑定注释允许在注入点<emphasis>隐式</emphasis>地"
-"定义一个依赖的Web Bean。假设我们需要声明下面的注入域:"
+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 "内置的<literal>@New</literal>绑定注释允许在注入点<emphasis>隐式</emphasis>地定义一个依赖的Web Bean。假设我们需要声明下面的注入域:"
#. Tag: programlisting
#: scopescontexts.xml:254
@@ -615,25 +460,14 @@
#. 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."
-msgstr ""
-"这个Web Bean被隐式地定义为范围为<literal>@Dependent</literal>,绑定类型为"
-"<literal>@New</literal>,API类型为<literal>Calculator</literal>,实现了"
-"<literal>Calculator</literal>类,部署类型为<literal>@Standard</literal>。"
+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 "这个Web Bean被隐式地定义为范围为<literal>@Dependent</literal>,绑定类型为<literal>@New</literal>,API类型为<literal>Calculator</literal>,实现了<literal>Calculator</literal>类,部署类型为<literal>@Standard</literal>。"
#. 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:"
-msgstr ""
-"甚至在<literal>Calculator</literal><emphasis>已经</emphasis>通过不同的范围类"
-"型声明过的情况下也是如此。例如:"
+msgid "This is true even if <literal>Calculator</literal> is <emphasis>already</emphasis> declared with a different scope type, for example:"
+msgstr "甚至在<literal>Calculator</literal><emphasis>已经</emphasis>通过不同的范围类型声明过的情况下也是如此。例如:"
#. Tag: programlisting
#: scopescontexts.xml:264
@@ -648,11 +482,8 @@
#. Tag: para
#: scopescontexts.xml:266
#, no-c-format
-msgid ""
-"So the following injected attributes each get a different instance of "
-"<literal>Calculator</literal>:"
-msgstr ""
-"所以下面注入的属性,每个都获得一个不同的 <literal>Calculator</literal>实例:"
+msgid "So the following injected attributes each get a different instance of <literal>Calculator</literal>:"
+msgstr "所以下面注入的属性,每个都获得一个不同的 <literal>Calculator</literal>实例:"
#. Tag: programlisting
#: scopescontexts.xml:269
@@ -675,21 +506,12 @@
#. 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>."
-msgstr ""
-"<literal>calculator</literal>域有一个对话范围的<literal>Calculator</literal>"
-"实例注入。<literal>newCalculator</literal>域有一个新的<literal>Calculator</"
-"literal>实例注入,这个实例的生命周期绑定在其拥有者<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 "<literal>calculator</literal>域有一个对话范围的<literal>Calculator</literal>实例注入。<literal>newCalculator</literal>域有一个新的<literal>Calculator</literal>实例注入,这个实例的生命周期绑定在其拥有者<literal>PaymentCalc</literal>类上。"
#. 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."
+msgid "This feature is particularly useful with producer methods, as we'll see in the next chapter."
msgstr "这个特性对于生产者方法来说特别有用,我们将在下一章看到。"
+
15 years, 8 months
[webbeans-commits] Webbeans SVN: r2261 - doc/trunk/reference/zh-CN.
by webbeans-commits@lists.jboss.org
Author: alartin
Date: 2009-03-29 21:21:32 -0400 (Sun, 29 Mar 2009)
New Revision: 2261
Modified:
doc/trunk/reference/zh-CN/intro.po
Log:
Modified: doc/trunk/reference/zh-CN/intro.po
===================================================================
--- doc/trunk/reference/zh-CN/intro.po 2009-03-30 00:39:23 UTC (rev 2260)
+++ doc/trunk/reference/zh-CN/intro.po 2009-03-30 01:21:32 UTC (rev 2261)
@@ -6,7 +6,7 @@
"Project-Id-Version: master.xml\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-02-07 18:51+0000\n"
-"PO-Revision-Date: 2009-03-13 14:09+0800\n"
+"PO-Revision-Date: 2009-03-30 09:14+0800\n"
"Last-Translator: Sean Wu <alartin(a)gmail.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
@@ -33,7 +33,7 @@
#. Tag: para
#: intro.xml:15
-#, fuzzy, no-c-format
+#, 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."
msgstr "除非特殊情况,每个具有一个非参构造器的Java类都可以是一个Web Bean。这包括了每个JavaBean, 并且每个EJB3的会话Bean都是一个Web Bean。当然,你每天已经写过的JavaBean和EJB无法使用Web Beans规范定义的新服务,但是你能够通过Web Beans的XML配置将这些组件配置为Web Bean,然后将其注入到其他Web Bean中。你甚至可以不用修改已有代码就可以为其添加拦截器和装饰器。"
@@ -193,7 +193,7 @@
#. Tag: para
#: intro.xml:68
-#, fuzzy, no-c-format
+#, 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>."
msgstr "在系统初始化的时候,Web Bean管理器必须验证只存在一个Web Bean能够满足每个注入点。在我们的例子中,如果没有<literal>Translator</literal>实现—如果<literal>SentenceTranslator</literal> EJB没有被部署—Web Bean管理器将会抛出一个<literal>UnsatisfiedDependencyException</literal>异常。如果多于一个<literal>Translator</literal>实现,Web Bean管理器将会抛出一个<literal>AmbiguousDependencyException</literal>异常。"
@@ -277,7 +277,7 @@
#. Tag: para
#: intro.xml:145
-#, fuzzy, no-c-format
+#, 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 "需要注意的是并非所有的Web Bean的客户端都是Web Bean。其他对象诸如Servlet或者消息驱动Bean#151;天生不可注入的, 具备上下文的对象—也可以通过注入获得Web Bean的引用。"
@@ -583,7 +583,7 @@
#. Tag: para
#: intro.xml:289
-#, fuzzy, no-c-format
+#, 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 "在这种情况下,Web Bean的名字默认为<literal>shoppingCart</literal>—非完整的类名,首字母改为小写"
@@ -707,7 +707,7 @@
#. Tag: para
#: intro.xml:360
-#, fuzzy, no-c-format
+#, 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."
msgstr "规范指出所有EJB3类型的会话Bean或者单例Bean都是<emphasis>企业级</emphasis>Web Bean。消息驱动Bean不是Web Beans—因为它们不能被注入到其他对象中#151;但是它们可以使用大部分Web Bean的功能,包括依赖注入和拦截器。"
15 years, 8 months
[webbeans-commits] Webbeans SVN: r2260 - in ri/trunk: impl/src/main/java/org/jboss/webbeans/bean/standard and 3 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-03-29 20:39:23 -0400 (Sun, 29 Mar 2009)
New Revision: 2260
Added:
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/NamedProducer.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/NamedProducerTest.java
Removed:
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/ejb/
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractProducerBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ProducerFieldBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ProducerMethodBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/RIBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/standard/AbstractStandardBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/MethodSignatureImpl.java
Log:
WBRI-212
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractBean.java 2009-03-30 00:05:55 UTC (rev 2259)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractBean.java 2009-03-30 00:39:23 UTC (rev 2260)
@@ -532,29 +532,5 @@
return getAnnotatedItem().isAnnotationPresent(Specializes.class);
}
- @Override
- // TODO Fix this!!!
- public boolean equals(Object other)
- {
- if (other instanceof AbstractBean)
- {
- AbstractBean<?, ?> that = (AbstractBean<?, ?>) other;
- boolean equal = this.getTypes().equals(that.getTypes()) && this.getBindings().equals(that.getBindings());
- return equal;
- }
- else
- {
- return false;
- }
- }
- @Override
- public int hashCode()
- {
- int result = 17;
- result = 31 * result + getTypes().hashCode();
- result = 31 * result + getBindings().hashCode();
- return result;
- }
-
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java 2009-03-30 00:05:55 UTC (rev 2259)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java 2009-03-30 00:39:23 UTC (rev 2260)
@@ -66,6 +66,8 @@
// The initializer methods
private Set<MethodInjectionPoint<?>> initializerMethods;
private Set<String> dependencies;
+
+ private final String id;
/**
* Constructor
@@ -77,6 +79,7 @@
{
super(manager);
this.annotatedItem = type;
+ this.id = createId(getClass().getSimpleName() + "-" + type.getName());
}
/**
@@ -344,19 +347,11 @@
{
return Production.class;
}
-
+
@Override
- public boolean equals(Object other)
+ public String getId()
{
- if (other instanceof AbstractClassBean)
- {
- AbstractClassBean<?> that = (AbstractClassBean<?>) other;
- return super.equals(other) && that.getType().equals(this.getType());
- }
- else
- {
- return false;
- }
+ return id;
}
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractProducerBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractProducerBean.java 2009-03-30 00:05:55 UTC (rev 2259)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractProducerBean.java 2009-03-30 00:39:23 UTC (rev 2260)
@@ -381,18 +381,4 @@
return buffer.toString();
}
- @Override
- public boolean equals(Object other)
- {
- if (other instanceof AbstractProducerBean)
- {
- AbstractProducerBean<?, ?> that = (AbstractProducerBean<?, ?>) other;
- return super.equals(other) && this.getAnnotatedItem().getDeclaringClass().equals(that.getAnnotatedItem().getDeclaringClass());
- }
- else
- {
- return false;
- }
- }
-
}
\ No newline at end of file
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ProducerFieldBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ProducerFieldBean.java 2009-03-30 00:05:55 UTC (rev 2259)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ProducerFieldBean.java 2009-03-30 00:39:23 UTC (rev 2260)
@@ -37,6 +37,7 @@
{
// The underlying field
private AnnotatedField<T> field;
+ private final String id;
/**
* Creates a producer field Web Bean
@@ -65,6 +66,7 @@
initType();
initTypes();
initBindings();
+ this.id = createId("ProducerField-" + declaringBean.getType().getName() + "-"+ field.getName());
}
@Override
@@ -140,5 +142,11 @@
{
return false;
}
+
+ @Override
+ public String getId()
+ {
+ return id;
+ }
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ProducerMethodBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ProducerMethodBean.java 2009-03-30 00:05:55 UTC (rev 2259)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ProducerMethodBean.java 2009-03-30 00:39:23 UTC (rev 2260)
@@ -51,6 +51,8 @@
private AnnotatedMethod<?> disposalMethod;
private ProducerMethodBean<?> specializedBean;
+
+ private final String id;
/**
* Creates a producer method Web Bean
@@ -75,6 +77,7 @@
initType();
initTypes();
initBindings();
+ this.id = createId("ProducerField-" + declaringBean.getType().getName() + "-"+ method.getSignature().toString());
}
protected T produceInstance(CreationalContext<T> creationalContext)
@@ -254,4 +257,10 @@
this.specializedBean = environment.getProducerMethod(superClassMethod);
}
+ @Override
+ public String getId()
+ {
+ return id;
+ }
+
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/RIBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/RIBean.java 2009-03-30 00:05:55 UTC (rev 2259)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/RIBean.java 2009-03-30 00:39:23 UTC (rev 2260)
@@ -17,6 +17,8 @@
package org.jboss.webbeans.bean;
import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.atomic.AtomicInteger;
import javax.context.Dependent;
@@ -34,19 +36,22 @@
public abstract class RIBean<T> extends Bean<T>
{
- private static final AtomicInteger idGenerator = new AtomicInteger();
+ private static final ConcurrentMap<String, AtomicInteger> ids = new ConcurrentHashMap<String, AtomicInteger>();
private final ManagerImpl manager;
-
- private final String id;
protected RIBean(ManagerImpl manager)
{
super(manager);
this.manager = manager;
// TODO better ID strategy (human readable)
- this.id = getClass().getName() + "-" + idGenerator.getAndIncrement();
}
+
+ protected static String createId(String prefix)
+ {
+ AtomicInteger i = ids.putIfAbsent(prefix, new AtomicInteger());
+ return prefix + "-" + i;
+ }
@Override
protected ManagerImpl getManager()
@@ -73,9 +78,26 @@
public abstract RIBean<?> getSpecializedBean();
- public String getId()
+ public abstract String getId();
+
+ @Override
+ public boolean equals(Object obj)
{
- return id;
+ if (obj instanceof RIBean)
+ {
+ RIBean<?> that = (RIBean<?>) obj;
+ return this.getId().equals(that.getId());
+ }
+ else
+ {
+ return false;
+ }
}
+
+ @Override
+ public int hashCode()
+ {
+ return getId().hashCode();
+ }
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/standard/AbstractStandardBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/standard/AbstractStandardBean.java 2009-03-30 00:05:55 UTC (rev 2259)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/standard/AbstractStandardBean.java 2009-03-30 00:39:23 UTC (rev 2260)
@@ -18,9 +18,15 @@
public abstract class AbstractStandardBean<T> extends RIBean<T>
{
+ private static final Annotation[] DEFAULT_BINDING_ARRAY = { new CurrentLiteral() };
+ private static final Set<Annotation> DEFAULT_BINDING = new HashSet<Annotation>(Arrays.asList(DEFAULT_BINDING_ARRAY));
+
+ private final String id;
+
protected AbstractStandardBean(ManagerImpl manager)
{
super(manager);
+ this.id = getClass().getSimpleName();
}
@Override
@@ -29,9 +35,8 @@
// No-op
}
- private static final Annotation[] DEFAULT_BINDING_ARRAY = { new CurrentLiteral() };
- private static final Set<Annotation> DEFAULT_BINDING = new HashSet<Annotation>(Arrays.asList(DEFAULT_BINDING_ARRAY));
+
@Override
public Set<Annotation> getBindings()
{
@@ -98,4 +103,10 @@
return false;
}
+ @Override
+ public String getId()
+ {
+ return id;
+ }
+
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/MethodSignatureImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/MethodSignatureImpl.java 2009-03-30 00:05:55 UTC (rev 2259)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/MethodSignatureImpl.java 2009-03-30 00:39:23 UTC (rev 2260)
@@ -55,4 +55,10 @@
return parameterTypes;
}
+ @Override
+ public String toString()
+ {
+ return getMethodName() + Arrays.asList(getParameterTypes()).toString().replace('[', '(').replace(']', ')');
+ }
+
}
\ No newline at end of file
Added: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/NamedProducer.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/NamedProducer.java (rev 0)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/NamedProducer.java 2009-03-30 00:39:23 UTC (rev 2260)
@@ -0,0 +1,21 @@
+package org.jboss.webbeans.test.unit.implementation.producer.method;
+
+import javax.annotation.Named;
+import javax.inject.Produces;
+
+public class NamedProducer
+{
+ @Named("itoen")
+ @Produces
+ public String[] createName()
+ {
+ return new String[] { "oh", "otya" };
+ }
+
+ @Named("iemon")
+ @Produces
+ public String[] createName2()
+ {
+ return new String[] { "fukujyuen", "iemon", "otya" };
+ }
+}
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/NamedProducer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/NamedProducerTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/NamedProducerTest.java (rev 0)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/NamedProducerTest.java 2009-03-30 00:39:23 UTC (rev 2260)
@@ -0,0 +1,19 @@
+package org.jboss.webbeans.test.unit.implementation.producer.method;
+
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.webbeans.test.unit.AbstractWebBeansTest;
+import org.testng.annotations.Test;
+
+@Artifact
+public class NamedProducerTest extends AbstractWebBeansTest
+{
+ @Test
+ public void testNamedProducer()
+ {
+ String[] iemon = (String[]) manager.getInstanceByName("iemon");
+ assert iemon.length == 3;
+ String[] itoen = (String[]) manager.getInstanceByName("itoen");
+ assert itoen.length == 2;
+ }
+
+}
Property changes on: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/NamedProducerTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 8 months
[webbeans-commits] Webbeans SVN: r2259 - test-harness/trunk/jboss/src/main/java/org/jboss/testharness/integration/jbossas.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-03-29 20:05:55 -0400 (Sun, 29 Mar 2009)
New Revision: 2259
Modified:
test-harness/trunk/jboss/src/main/java/org/jboss/testharness/integration/jbossas/ProfileServiceContainersImpl.java
Log:
oops
Modified: test-harness/trunk/jboss/src/main/java/org/jboss/testharness/integration/jbossas/ProfileServiceContainersImpl.java
===================================================================
--- test-harness/trunk/jboss/src/main/java/org/jboss/testharness/integration/jbossas/ProfileServiceContainersImpl.java 2009-03-29 23:33:10 UTC (rev 2258)
+++ test-harness/trunk/jboss/src/main/java/org/jboss/testharness/integration/jbossas/ProfileServiceContainersImpl.java 2009-03-30 00:05:55 UTC (rev 2259)
@@ -93,7 +93,7 @@
IncompleteDeploymentException incompleteDeploymentException = (IncompleteDeploymentException) failure.getCause();
for (Entry<String, Throwable> entry : incompleteDeploymentException.getIncompleteDeployments().getContextsInError().entrySet())
{
- if (entry.getKey().endsWith(name + "/_WebBeansBootstrap"))
+ if (entry.getKey().endsWith(name + "/_WebBeansBootstrapBean"))
{
throw new DeploymentException(entry.getValue());
}
15 years, 8 months