[webbeans-commits] Webbeans SVN: r1527 - in tck/trunk/impl/src/main: java/org/jboss/jsr299/tck/unit/implementation/producer/method and 1 other directories.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Sun Feb 15 12:09:33 EST 2009


Author: dallen6
Date: 2009-02-15 12:09:33 -0500 (Sun, 15 Feb 2009)
New Revision: 1527

Added:
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/initializer/AndalusianChicken.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/initializer/LocalChicken.java
Modified:
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/initializer/InitializerMethodTest.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/method/ProducerMethodDefinitionTest.java
   tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
Split most of the "or" conditioned assertions into separate tests.

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/initializer/AndalusianChicken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/initializer/AndalusianChicken.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/initializer/AndalusianChicken.java	2009-02-15 17:09:33 UTC (rev 1527)
@@ -0,0 +1,19 @@
+package org.jboss.jsr299.tck.unit.implementation.initializer;
+
+import javax.ejb.Stateless;
+import javax.inject.Initializer;
+
+ at Stateless
+class AndalusianChicken implements LocalChicken
+{
+
+   @Override
+   public void firstBusinessMethod()
+   {
+   }
+
+   @Initializer
+   public void nonBusinessMethod()
+   {
+   }
+}


Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/initializer/AndalusianChicken.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/initializer/InitializerMethodTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/initializer/InitializerMethodTest.java	2009-02-15 16:57:27 UTC (rev 1526)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/initializer/InitializerMethodTest.java	2009-02-15 17:09:33 UTC (rev 1527)
@@ -15,134 +15,126 @@
  */
 public class InitializerMethodTest extends AbstractDeclarativeTest
 {
-   
-   @Test(expectedExceptions=DefinitionException.class, groups="initializerMethod") 
-   @SpecAssertion(section="3.8", id = "unknown")
+
+   @Test(expectedExceptions = DefinitionException.class, groups = "initializerMethod")
+   @SpecAssertion(section = "3.8", id = "unknown")
    public void testStaticInitializerMethodNotAllowed()
    {
       createSimpleBean(Dottrel.class);
    }
-   
-   @Test(groups={"stub", "initializerMethod", "servlet"}) 
-   @SpecAssertion(section="3.9", id = "unknown")
+
+   @Test(groups = { "stub", "initializerMethod", "servlet" })
+   @SpecAssertion(section = "3.9", id = "unknown")
    public void testInitializerMethodCalledOnServlet()
    {
       assert false;
    }
-   
-   @Test(groups={"stub", "initializerMethod", "ejb3"}) 
-   @SpecAssertion(section="3.9", id = "unknown")
+
+   @Test(groups = { "stub", "initializerMethod", "ejb3", "integration" })
+   @SpecAssertion(section = "3.9", id = "unknown")
    public void testInitializerMethodCalledOnEJBSessionBean()
    {
       assert false;
    }
-   
-   @Test(groups={"stub", "initializerMethod", "ejb3"}) 
-   @SpecAssertion(section="3.9", id = "unknown")
+
+   @Test(groups = { "stub", "initializerMethod", "ejb3" })
+   @SpecAssertion(section = "3.9", id = "unknown")
    public void testInitializerMethodCalledOnEJBMDB()
    {
       assert false;
    }
-   
-   @Test(groups={"stub", "initializerMethod", "ejb3", "singletons"}) 
-   @SpecAssertion(section="3.9", id = "unknown")
+
+   @Test(groups = { "stub", "initializerMethod", "ejb3", "singletons" })
+   @SpecAssertion(section = "3.9", id = "unknown")
    public void testInitializerMethodCalledOnEJBSingleton()
    {
       assert false;
    }
-   
-   @Test(groups={"stub", "initializerMethod", "ejb3"}) 
-   @SpecAssertion(section="3.9", id = "unknown")
+
+   /**
+    * If the bean is a session bean, the initializer method is not required to
+    * be a business method of the session bean
+    */
+   @Test(groups = { "stub", "initializerMethod", "ejb3" })
+   @SpecAssertion(section = "3.9", id = "c")
    public void testInitializerMethodNotABusinessMethod()
    {
-      assert false;
+      deployBeans(LocalChicken.class, AndalusianChicken.class);
    }
-   
-   @Test(groups={"stub", "initializerMethod", "interceptors"}) 
-   @SpecAssertion(section="3.9", id = "unknown")
+
+   @Test(groups = { "stub", "initializerMethod", "interceptors" })
+   @SpecAssertion(section = "3.9", id = "unknown")
    public void testMethodInterceptorNotCalledOnInitializerMethod()
    {
       assert false;
    }
-   
-   @Test(groups={"initializerMethod"}) 
-   @SpecAssertions({
-      @SpecAssertion(section = "3.9", id = "unknown"),
-      @SpecAssertion(section = "5.3", id = "unknown"),
-      @SpecAssertion(section = "3.9.2", id = "unknown"),
-      @SpecAssertion(section = "3.9.3", id = "unknown")
-    })
+
+   @Test(groups = { "initializerMethod" })
+   @SpecAssertions( { @SpecAssertion(section = "3.9", id = "unknown"), @SpecAssertion(section = "5.3", id = "unknown"), @SpecAssertion(section = "3.9.2", id = "unknown"), @SpecAssertion(section = "3.9.3", id = "unknown") })
    public void testMultipleInitializerMethodsAreCalled()
    {
       getCurrentManager().addBean(createSimpleBean(Fox.class));
       getCurrentManager().addBean(createSimpleBean(Chicken.class));
-      
+
       Bean<ChickenHutch> chickenHutchBean = createSimpleBean(ChickenHutch.class);
       ChickenHutch chickenHutch = chickenHutchBean.create(new MockCreationalContext<ChickenHutch>());
       assert chickenHutch.fox != null;
       assert chickenHutch.chicken != null;
    }
-   
-   @Test(groups="initializerMethod", expectedExceptions=DefinitionException.class) 
-   @SpecAssertions({
-     @SpecAssertion(section = "3.9.1", id = "unknown"),
-     @SpecAssertion(section = "3.4.2", id = "unknown")
-   })
+
+   @Test(groups = "initializerMethod", expectedExceptions = DefinitionException.class)
+   @SpecAssertions( { @SpecAssertion(section = "3.9.1", id = "unknown"), @SpecAssertion(section = "3.4.2", id = "unknown") })
    public void testInitializerMethodAnnotatedProduces()
    {
       createSimpleBean(Pheasant.class);
    }
-   
-   @Test(groups="initializerMethod", expectedExceptions=DefinitionException.class) 
-   @SpecAssertion(section="3.9.1", id = "unknown")
+
+   @Test(groups = "initializerMethod", expectedExceptions = DefinitionException.class)
+   @SpecAssertion(section = "3.9.1", id = "unknown")
    public void testInitializerMethodHasParameterAnnotatedDisposes()
    {
       createSimpleBean(Capercaillie.class);
    }
-   
-   @Test(groups="initializerMethod", expectedExceptions=DefinitionException.class) 
-   @SpecAssertion(section="3.9.1", id = "unknown")
+
+   @Test(groups = "initializerMethod", expectedExceptions = DefinitionException.class)
+   @SpecAssertion(section = "3.9.1", id = "unknown")
    public void testInitializerMethodHasParameterAnnotatedObserves()
    {
       createSimpleBean(Grouse.class);
    }
-   
-   @Test(groups={"stub", "initializerMethod", "webbeansxml"}) 
-   @SpecAssertion(section="3.9.2", id = "unknown")
+
+   @Test(groups = { "stub", "initializerMethod", "webbeansxml" })
+   @SpecAssertion(section = "3.9.2", id = "unknown")
    public void testInitializerMethodDeclaredInXml()
    {
       assert false;
    }
-   
-   @Test(groups={"stub", "initializerMethod", "webbeansxml"}) 
-   @SpecAssertion(section="3.9.2", id = "unknown")
+
+   @Test(groups = { "stub", "initializerMethod", "webbeansxml" })
+   @SpecAssertion(section = "3.9.2", id = "unknown")
    public void testInitializerMethodDeclaredInXmlIgnoresBindingAnnotationsInJava()
    {
       assert false;
    }
-   
-   @Test(groups={"stub", "initializerMethod", "webbeansxml"}, expectedExceptions=DefinitionException.class) 
-   @SpecAssertion(section="3.9.2", id = "unknown")
+
+   @Test(groups = { "stub", "initializerMethod", "webbeansxml" }, expectedExceptions = DefinitionException.class)
+   @SpecAssertion(section = "3.9.2", id = "unknown")
    public void testInitializerMethodDeclaredInXmlDoesNotExist()
    {
       assert false;
    }
-   
-   @Test(groups={"stub", "initializerMethod", "webbeansxml"}) 
-   @SpecAssertion(section="3.9.2", id = "unknown")
+
+   @Test(groups = { "stub", "initializerMethod", "webbeansxml" })
+   @SpecAssertion(section = "3.9.2", id = "unknown")
    public void testBeanHasAllInitializerMethodsDeclaredInJavaAndXml()
    {
       assert false;
    }
-   
-   /*
 
-   @Test(groups="initializerMethod") @SpecAssertion(section="3.8")
-   public void test
-   {
-      assert false;
-   }
-
+   /*
+    * 
+    * @Test(groups="initializerMethod") @SpecAssertion(section="3.8") public
+    * void test { assert false; }
     */
-   
+
 }
\ No newline at end of file

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/initializer/LocalChicken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/initializer/LocalChicken.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/initializer/LocalChicken.java	2009-02-15 17:09:33 UTC (rev 1527)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.unit.implementation.initializer;
+
+import javax.ejb.Local;
+
+ at Local
+public interface LocalChicken
+{
+   public void firstBusinessMethod();
+}


Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/initializer/LocalChicken.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/method/ProducerMethodDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/method/ProducerMethodDefinitionTest.java	2009-02-15 16:57:27 UTC (rev 1526)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/method/ProducerMethodDefinitionTest.java	2009-02-15 17:09:33 UTC (rev 1527)
@@ -16,13 +16,13 @@
 /**
  * 
  * Spec version: PRD2
- *
+ * 
  */
 public class ProducerMethodDefinitionTest extends AbstractDeclarativeTest
 {
-   
-   @Test(groups="producerMethod") 
-   @SpecAssertion(section="2.5.3", id = "unknown")
+
+   @Test(groups = "producerMethod")
+   @SpecAssertion(section = "2.5.3", id = "unknown")
    public void testProducerMethodInheritsDeploymentTypeOfDeclaringWebBean() throws Exception
    {
       Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -31,9 +31,9 @@
       Bean<Tarantula> tarantulaModel = createProducerMethodBean(method, bean);
       tarantulaModel.getDeploymentType().equals(AnotherDeploymentType.class);
    }
-   
-   @Test(groups="producerMethod") 
-   @SpecAssertion(section="3.4", id = "unknown")
+
+   @Test(groups = "producerMethod")
+   @SpecAssertion(section = "3.4", id = "unknown")
    public void testStaticMethod() throws Exception
    {
       Bean<BeanWithStaticProducerMethod> bean = createSimpleBean(BeanWithStaticProducerMethod.class);
@@ -41,16 +41,16 @@
       Method method = BeanWithStaticProducerMethod.class.getMethod("getString");
       createProducerMethodBean(method, bean);
    }
-   
-   @Test(groups={"stub", "producerMethod", "enterpriseBeans", "stub"}, expectedExceptions=DefinitionException.class) 
-   @SpecAssertion(section="3.4", id = "unknown")
+
+   @Test(groups = { "stub", "producerMethod", "enterpriseBeans" }, expectedExceptions = DefinitionException.class)
+   @SpecAssertion(section = "3.4", id = "unknown")
    public void testProducerMethodIsNotBusinessMethod() throws Exception
    {
       assert false;
    }
-   
-   @Test(groups="producerMethod") 
-   @SpecAssertion(section="3.4", id = "unknown")
+
+   @Test(groups = "producerMethod")
+   @SpecAssertion(section = "3.4", id = "unknown")
    public void testParameterizedReturnType() throws Exception
    {
       Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -58,9 +58,9 @@
       Method method = SpiderProducer.class.getMethod("getFunnelWeaverSpider");
       createProducerMethodBean(method, bean);
    }
-   
-   @Test(groups="producerMethod", expectedExceptions=DefinitionException.class) 
-   @SpecAssertion(section="3.4", id = "unknown")
+
+   @Test(groups = "producerMethod", expectedExceptions = DefinitionException.class)
+   @SpecAssertion(section = "3.4", id = "unknown")
    public void testParameterizedReturnTypeWithWildcard() throws Exception
    {
       Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -68,9 +68,9 @@
       Method method = SpiderProducer.class.getMethod("getAnotherFunnelWeaver");
       createProducerMethodBean(method, bean);
    }
-   
-   @Test(groups="producerMethod", expectedExceptions=DefinitionException.class) 
-   @SpecAssertion(section="3.4", id = "unknown")
+
+   @Test(groups = "producerMethod", expectedExceptions = DefinitionException.class)
+   @SpecAssertion(section = "3.4", id = "unknown")
    public void testParameterizedReturnTypeWithTypeParameter() throws Exception
    {
       Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -78,12 +78,9 @@
       Method method = SpiderProducer.class.getMethod("getFunnelWeaver");
       createProducerMethodBean(method, bean);
    }
-   
-   @Test(groups="producerMethod") 
-   @SpecAssertions({
-     @SpecAssertion(section = "3.4", id = "unknown"),
-     @SpecAssertion(section = "2.3.1", id = "unknown")
-   })
+
+   @Test(groups = "producerMethod")
+   @SpecAssertions( { @SpecAssertion(section = "3.4", id = "unknown"), @SpecAssertion(section = "2.3.1", id = "unknown") })
    public void testDefaultBindingType() throws Exception
    {
       Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -93,9 +90,9 @@
       assert tarantulaModel.getBindings().size() == 1;
       assert tarantulaModel.getBindings().iterator().next().annotationType().equals(Current.class);
    }
-   
-   @Test(groups="producerMethod") 
-   @SpecAssertion(section="3.4.1", id = "unknown")
+
+   @Test(groups = "producerMethod")
+   @SpecAssertion(section = "3.4.1", id = "unknown")
    public void testApiTypeForClassReturn() throws Exception
    {
       Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -110,9 +107,9 @@
       assert tarantulaModel.getTypes().contains(DeadlyAnimal.class);
       assert tarantulaModel.getTypes().contains(Object.class);
    }
-   
-   @Test(groups="producerMethod") 
-   @SpecAssertion(section="3.4.1", id = "unknown")
+
+   @Test(groups = "producerMethod")
+   @SpecAssertion(section = "3.4.1", id = "unknown")
    public void testApiTypeForInterfaceReturn() throws Exception
    {
       Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -123,9 +120,9 @@
       assert animalModel.getTypes().contains(Animal.class);
       assert animalModel.getTypes().contains(Object.class);
    }
-   
-   @Test(groups="producerMethod") 
-   @SpecAssertion(section="3.4.1", id = "unknown")
+
+   @Test(groups = "producerMethod")
+   @SpecAssertion(section = "3.4.1", id = "unknown")
    public void testApiTypeForPrimitiveReturn() throws Exception
    {
       Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -136,12 +133,9 @@
       assert intModel.getTypes().contains(int.class);
       assert intModel.getTypes().contains(Object.class);
    }
-   
-   @Test(groups="producerMethod") 
-   @SpecAssertions({
-     @SpecAssertion(section = "3.4.1", id = "unknown"),
-     @SpecAssertion(section = "2.2", id = "unknown")
-   })
+
+   @Test(groups = "producerMethod")
+   @SpecAssertions( { @SpecAssertion(section = "3.4.1", id = "unknown"), @SpecAssertion(section = "2.2", id = "unknown") })
    public void testApiTypeForArrayTypeReturn() throws Exception
    {
       Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -152,9 +146,9 @@
       assert spidersModel.getTypes().contains(Spider[].class);
       assert spidersModel.getTypes().contains(Object.class);
    }
-   
-   @Test(groups="producerMethod") 
-   @SpecAssertion(section="3.4.2", id = "unknown")
+
+   @Test(groups = "producerMethod")
+   @SpecAssertion(section = "3.4.2", id = "unknown")
    public void testBindingType() throws Exception
    {
       Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -164,9 +158,9 @@
       assert tarantulaModel.getBindings().size() == 1;
       assert tarantulaModel.getBindings().iterator().next().annotationType().equals(Tame.class);
    }
-   
-   @Test(groups="producerMethod") 
-   @SpecAssertion(section="3.4.2", id = "unknown")
+
+   @Test(groups = "producerMethod")
+   @SpecAssertion(section = "3.4.2", id = "unknown")
    public void testScopeType() throws Exception
    {
       Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -174,12 +168,12 @@
       Method method = SpiderProducer.class.getMethod("produceDaddyLongLegs");
       Bean<DaddyLongLegs> daddyLongLegsModel = createProducerMethodBean(method, bean);
       assert daddyLongLegsModel.getScopeType().equals(RequestScoped.class);
-      
+
       // TODO Inherit scope from returned web bean?
    }
-   
-   @Test(groups="producerMethod") 
-   @SpecAssertion(section="3.4.2", id = "unknown")
+
+   @Test(groups = "producerMethod")
+   @SpecAssertion(section = "3.4.2", id = "unknown")
    public void testDeploymentType() throws Exception
    {
       Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -188,9 +182,9 @@
       Bean<LadybirdSpider> ladybirdSpiderModel = createProducerMethodBean(method, bean);
       assert ladybirdSpiderModel.getDeploymentType().equals(Production.class);
    }
-   
-   @Test(groups="producerMethod") 
-   @SpecAssertion(section="3.4.2", id = "unknown")
+
+   @Test(groups = "producerMethod")
+   @SpecAssertion(section = "3.4.2", id = "unknown")
    public void testNamedMethod() throws Exception
    {
       Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -199,9 +193,9 @@
       Bean<BlackWidow> blackWidowSpiderModel = createProducerMethodBean(method, bean);
       assert blackWidowSpiderModel.getName().equals("blackWidow");
    }
-   
-   @Test(groups="producerMethod") 
-   @SpecAssertion(section="3.4.2", id = "unknown")
+
+   @Test(groups = "producerMethod")
+   @SpecAssertion(section = "3.4.2", id = "unknown")
    public void testDefaultNamedMethod() throws Exception
    {
       Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -210,9 +204,9 @@
       Bean<DaddyLongLegs> daddyLongLegsSpiderModel = createProducerMethodBean(method, bean);
       assert daddyLongLegsSpiderModel.getName().equals("produceDaddyLongLegs");
    }
-   
-   @Test(groups="producerMethod", expectedExceptions=DefinitionException.class) 
-   @SpecAssertion(section="3.4", id = "unknown")
+
+   @Test(groups = "producerMethod", expectedExceptions = DefinitionException.class)
+   @SpecAssertion(section = "3.4", id = "unknown")
    public void testProducerMethodWithParameterAnnotatedDisposes() throws Exception
    {
       Bean<SpiderProducer_Broken> bean = createSimpleBean(SpiderProducer_Broken.class);
@@ -220,9 +214,9 @@
       Method method = SpiderProducer_Broken.class.getMethod("dispose", String.class);
       createProducerMethodBean(method, bean);
    }
-   
-   @Test(groups="producerMethod", expectedExceptions=DefinitionException.class) 
-   @SpecAssertion(section="3.4", id = "unknown")
+
+   @Test(groups = "producerMethod", expectedExceptions = DefinitionException.class)
+   @SpecAssertion(section = "3.4", id = "unknown")
    public void testProducerMethodWithParameterAnnotatedObserves() throws Exception
    {
       Bean<SpiderProducer_Broken> bean = createSimpleBean(SpiderProducer_Broken.class);
@@ -230,30 +224,24 @@
       Method method = SpiderProducer_Broken.class.getMethod("observe", String.class);
       createProducerMethodBean(method, bean);
    }
-   
-   @Test(groups="producerMethod") 
-   @SpecAssertions({
-     @SpecAssertion(section = "2.7.2", id = "unknown"),
-     @SpecAssertion(section = "3.4.2", id = "unknown"),
-     @SpecAssertion(section = "2.2", id = "unknown")
-   })   
+
+   @Test(groups = "producerMethod")
+   @SpecAssertions( { @SpecAssertion(section = "2.7.2", id = "unknown"), @SpecAssertion(section = "3.4.2", id = "unknown"), @SpecAssertion(section = "2.2", id = "unknown") })
    public void testStereotypeSpecifiesScope() throws Exception
    {
       Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
       getCurrentManager().addBean(bean);
       Method method = SpiderProducer.class.getMethod("produceWolfSpider");
       Bean<WolfSpider> wolfSpider = createProducerMethodBean(method, bean);
-      //assert wolfSpiderModel.getMergedStereotypes().getRequiredTypes().size() == 1;
-      //assert wolfSpiderModel.getMergedStereotypes().getRequiredTypes().contains(Animal.class);
+      // assert wolfSpiderModel.getMergedStereotypes().getRequiredTypes().size()
+      // == 1;
+      // assert
+      // wolfSpiderModel.getMergedStereotypes().getRequiredTypes().contains(Animal.class);
       assert wolfSpider.getScopeType().equals(RequestScoped.class);
    }
-   
-   @Test(groups="producerMethod", expectedExceptions=DefinitionException.class) 
-   @SpecAssertions({
-     @SpecAssertion(section = "2.7.2", id = "unknown"),
-     @SpecAssertion(section = "3.4.2", id = "unknown"),     
-     @SpecAssertion(section = "2.2", id = "unknown")
-   })
+
+   @Test(groups = "producerMethod", expectedExceptions = DefinitionException.class)
+   @SpecAssertions( { @SpecAssertion(section = "2.7.2", id = "unknown"), @SpecAssertion(section = "3.4.2", id = "unknown"), @SpecAssertion(section = "2.2", id = "unknown") })
    public void testStereotypeEnforcesTypes() throws Exception
    {
       Bean<SpiderProducer_Broken> bean = createSimpleBean(SpiderProducer_Broken.class);
@@ -261,13 +249,13 @@
       Method method = SpiderProducer_Broken.class.getMethod("produceInteger");
       createProducerMethodBean(method, bean);
    }
-   
-   @Test 
-   @SpecAssertion(section="4.2", id = "unknown")
+
+   @Test
+   @SpecAssertion(section = "4.2", id = "unknown")
    public void testNonStaticProducerMethodNotInherited()
    {
       deployBeans(InfertileChicken.class);
       assert getCurrentManager().resolveByType(Egg.class).size() == 0;
    }
-   
+
 }

Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml	2009-02-15 16:57:27 UTC (rev 1526)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml	2009-02-15 17:09:33 UTC (rev 1527)
@@ -1,7 +1,5 @@
 <specification xmlns="http://jboss.com/products/webbeans/tck/audit"
-    name="JSR-299: Java Contexts and Dependency Injection"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
-    xsi:schemaLocation="http://jboss.com/products/webbeans/tck/audit http://snapshots.jboss.org/maven2/org/hibernate/tck-utils-api/0.9-SNAPSHOT/tck-utils-api-0.9-20090214.235046-7-audit.xsd"
+    name="JSR-299: Java Contexts and Dependency Injection" 
     version="Revised Public Review Draft">
 
   <section id="2" title="Bean definition">
@@ -46,42 +44,46 @@
     </assertion>
     
     <assertion id="c">
-      <text>Bean types may not declare a type variable or wildcard. If the type of an injection point is a parameterized type with a type variable or wildcard, a DefinitionException is thrown by the container at deployment time.</text>
+      <text>Bean types may not declare a type variable. If the type of an injection point is a parameterized type with a type variable, a DefinitionException is thrown by the container at deployment time.</text>
     </assertion>
     
     <assertion id="d">
+      <text>Bean types may not declare a wildcard. If the type of an injection point is a parameterized type with a wildcard, a DefinitionException is thrown by the container at deployment time.</text>
+    </assertion>
+    
+    <assertion id="e">
       <text>A bean type may be an interface</text>
     </assertion>
     
-    <assertion id="e">
+    <assertion id="f">
       <text>A bean type may be a concrete class</text>
     </assertion>
     
-    <assertion id="f">
+    <assertion id="g">
       <text>A bean type may be an abstract class</text>
     </assertion>
     
-    <assertion id="g">
+    <assertion id="h">
       <text>A bean type may be declared final</text>
     </assertion>
     
-    <assertion id="h">
+    <assertion id="i">
       <text>A bean type may have final methods</text>
     </assertion>
     
-    <assertion id="i">
+    <assertion id="j">
       <text>A bean type may be an array type. Two array types are considered identical only if the element type is identical</text>
     </assertion>
     
-    <assertion id="j">
+    <assertion id="k">
       <text>A bean type may be a primitive types. Primitive types are considered to be identical to their corresponding wrapper types in java.lang.</text>
     </assertion>
     
-    <assertion id="k">
+    <assertion id="l">
       <text>All beans have the bean type java.lang.Object</text>
     </assertion>
     
-    <assertion id="l">
+    <assertion id="m">
       <text>A client of a bean may typecast its reference to any instance of the bean to any bean type of the bean</text>
     </assertion>
   
@@ -119,10 +121,18 @@
   <section id="2.3.3" title="Declaring the bindings of a bean using annotations">
   
     <assertion id="a">
-      <text>A bean's bindings are declared by annotating the bean class or producer method or field with the binding types</text>
+      <text>A bean's bindings are declared by annotating the bean class with the binding types</text>
     </assertion>
     
     <assertion id="b">
+      <text>A bean's bindings are declared by annotating the producer method with the binding types</text>
+    </assertion>
+    
+    <assertion id="c">
+      <text>A bean's bindings are declared by annotating the field with the binding types</text>
+    </assertion>
+    
+    <assertion id="d">
       <text>Any bean may declare multiple binding types</text>
     </assertion>
   </section>
@@ -156,14 +166,26 @@
   
   <section id="2.3.6" title="Specifying bindings of a method or constructor parameter">
     <assertion id="a">
-      <text>Binding types may be applied to parameters of producer methods, initializer methods, disposal methods or bean constructors (see Chapter 3, Bean implementation) to determine the bean instance that is passed when the method is called by the container</text>
+      <text>Binding types may be applied to parameters of producer methods (see Chapter 3, Bean implementation) to determine the bean instance that is passed when the method is called by the container</text>
     </assertion>
     
     <assertion id="b">
+      <text>Binding types may be applied to parameters of initializer methods (see Chapter 3, Bean implementation) to determine the bean instance that is passed when the method is called by the container</text>
+    </assertion>
+    
+    <assertion id="c">
+      <text>Binding types may be applied to parameters of disposal methods (see Chapter 3, Bean implementation) to determine the bean instance that is passed when the method is called by the container</text>
+    </assertion>
+    
+    <assertion id="d">
+      <text>Binding types may be applied to parameters of bean constructors (see Chapter 3, Bean implementation) to determine the bean instance that is passed when the method is called by the container</text>
+    </assertion>
+    
+    <assertion id="e">
       <text>For a bean defined in XML, the bindings of a method parameter may be specified using XML</text>
     </assertion>
     
-    <assertion id="c">
+    <assertion id="f">
       <text>When the bindings of a parameter are specified using XML, any binding annotations of the parameter are ignored</text>
     </assertion>
   </section>
@@ -223,18 +245,38 @@
   <section id="2.5.3" title="Declaring the deployment type of a bean using annotations">
   
     <assertion id="a">
-      <text>The deployment type of the bean is declared by annotating the bean class or producer method or field</text>
+      <text>The deployment type of the bean is declared by annotating the bean class</text>
     </assertion>
     
     <assertion id="b">
-      <text>An bean class or producer method or field may specify at most one deployment type. If multiple deployment type annotations are specified, a DefinitionException is thrown by the container at deployment time.</text>
+      <text>The deployment type of the bean is declared by annotating the producer method</text>
     </assertion>
     
     <assertion id="c">
-      <text>By default, if no deployment type annotation is explicitly specified, a producer method or field inherits the deployment type of the bean in which it is defined.</text>
+      <text>The deployment type of the bean is declared by annotating the field</text>
     </assertion>
     
     <assertion id="d">
+      <text>An bean class may specify at most one deployment type. If multiple deployment type annotations are specified, a DefinitionException is thrown by the container at deployment time.</text>
+    </assertion>
+    
+    <assertion id="e">
+      <text>A producer method may specify at most one deployment type. If multiple deployment type annotations are specified, a DefinitionException is thrown by the container at deployment time.</text>
+    </assertion>
+    
+    <assertion id="f">
+      <text>A field may specify at most one deployment type. If multiple deployment type annotations are specified, a DefinitionException is thrown by the container at deployment time.</text>
+    </assertion>
+    
+    <assertion id="g">
+      <text>By default, if no deployment type annotation is explicitly specified, a producer method inherits the deployment type of the bean in which it is defined.</text>
+    </assertion>
+    
+    <assertion id="h">
+      <text>By default, if no deployment type annotation is explicitly specified, a field inherits the deployment type of the bean in which it is defined.</text>
+    </assertion>
+    
+    <assertion id="i">
       <text>a deployment type may be specified using a stereotype annotation, as defined in Section 2.7.2, "Declaring the stereotypes for a bean using annotations".</text>
     </assertion>
   
@@ -289,10 +331,18 @@
   <section id="2.6.1" title="Declaring the bean name using annotations">
   
     <assertion id="a">
-      <text>To specify the name of a bean, the @javax.annotation.Named annotation is applied to the bean class or producer method or field.</text>
+      <text>To specify the name of a bean, the @javax.annotation.Named annotation is applied to the bean class.</text>
     </assertion>
     
     <assertion id="b">
+      <text>To specify the name of a bean, the @javax.annotation.Named annotation is applied to the producer method.</text>
+    </assertion>
+    
+    <assertion id="c">
+      <text>To specify the name of a bean, the @javax.annotation.Named annotation is applied to the field.</text>
+    </assertion>
+    
+    <assertion id="d">
       <text>If the @Named annotation does not specify the value member, the default name is assumed</text>
     </assertion>
   </section>
@@ -311,14 +361,22 @@
   <section id="2.6.3" title="Default bean names">
   
     <assertion id="a">
-      <text>A default name must be assigned by the container when a bean class or producer method or field of a bean defined using annotations declares a @Named annotation and no name is explicitly specified by the value member</text>
+      <text>A default name must be assigned by the container when a bean class defined using annotations declares a @Named annotation and no name is explicitly specified by the value member</text>
     </assertion>
     
     <assertion id="b">
+      <text>A default name must be assigned by the container when a producer method of a bean defined using annotations declares a @Named annotation and no name is explicitly specified by the value member</text>
+    </assertion>
+    
+    <assertion id="c">
+      <text>A default name must be assigned by the container when a field of a bean defined using annotations declares a @Named annotation and no name is explicitly specified by the value member</text>
+    </assertion>
+    
+    <assertion id="d">
       <text>A default name must be assigned by the container when an empty &lt;Named&gt; element is specified by a bean defined in XML</text>
     </assertion>
     
-    <assertion id="c">
+    <assertion id="e">
       <text>A default name must be assigned by the container when a bean declares a stereotype that declares an empty @Named annotation, and the bean does not explicitly specify a name.</text>
     </assertion>
   </section>
@@ -337,9 +395,17 @@
     </assertion>
     
     <assertion id="b">
-      <text>A bean may declare zero, one or multiple stereotypes</text>
+      <text>A bean may declare zero stereotypes</text>
     </assertion>
   
+    <assertion id="c">
+      <text>A bean may declare one stereotype</text>
+    </assertion>
+  
+    <assertion id="d">
+      <text>A bean may declare multiple stereotypes</text>
+    </assertion>
+  
   </section>
 
   <section id="3" title="Bean Implementation">
@@ -358,22 +424,26 @@
  
   <section id="3.2" title="Simple beans">
     <assertion id="a">
-      <text>The bean class of a simple bean may not be a non-static inner class or a parameterized type</text>
+      <text>The bean class of a simple bean may not be a non-static inner class</text>
     </assertion>
     
     <assertion id="b">
+      <text>The bean class of a simple bean may not be a parameterized type</text>
+    </assertion>
+    
+    <assertion id="c">
       <text>The bean class of a simple bean may not be an abstract class, unless the simple bean is a decorator</text>
     </assertion>
     
-    <assertion id="c">
+    <assertion id="d">
       <text>If the bean class of a simple bean is annotated with both the @Interceptor and @Decorator stereotypes, a DefinitionException is thrown by the container at deployment time.</text>
     </assertion>
     
-    <assertion id="d">
+    <assertion id="e">
       <text>Multiple simple beans may share the same bean class. This occurs when beans are defined using XML. Only one simple bean per bean class may be defined using annotations.</text>
     </assertion>
     
-    <assertion id="e">
+    <assertion id="f">
       <text>If a simple bean has a public field, it must have scope @Dependent. If a simple bean with a public field declares any scope other than @Dependent, a DefinitionException is thrown by the container at deployment time.</text>
     </assertion>
         
@@ -387,45 +457,51 @@
       <text>A top-level Java class is not a simple bean if it is a non-static inner class</text>
     </assertion>
     <assertion id="c">
-      <text>A top-level Java class is only a simple bean if it is a concrete class, or annotated @Decorator.</text>
+      <text>A top-level Java class is only a simple bean if it is a concrete class.</text>
     </assertion>
     <assertion id="d">
-      <text>A top-level Java class is not a simple bean if it is annotated with the JPA @Entity annotation</text>
+      <text>A top-level Java class is only a simple bean if it is annotated @Decorator.</text>
     </assertion>
     <assertion id="e">
-      <text>A top-level Java class is not a simple bean if it is annotated with any of the EJB component-defining annotations</text>
+      <text>A top-level Java class is not a simple bean if it is annotated with the JPA @Entity annotation</text>
     </assertion>
     <assertion id="f">
-      <text>A top-level Java class is not a simple bean if it implements the javax.servlet.Servlet interface</text>
+      <text>A top-level Java class is not a simple bean if it is annotated with any of the EJB component-defining annotations</text>
     </assertion>
     <assertion id="g">
-      <text>A top-level Java class is not a simple bean if it implements the javax.servlet.Filter interface</text>
+      <text>A top-level Java class is not a simple bean if it implements the javax.servlet.Servlet interface</text>
     </assertion>
     <assertion id="h">
-      <text>A top-level Java class is not a simple bean if it implements the javax.servlet.ServletContextListener interface</text>
+      <text>A top-level Java class is not a simple bean if it implements the javax.servlet.Filter interface</text>
     </assertion>
     <assertion id="i">
-      <text>A top-level Java class is not a simple bean if it implements the javax.servlet.http.HttpSessionListener interface</text>
+      <text>A top-level Java class is not a simple bean if it implements the javax.servlet.ServletContextListener interface</text>
     </assertion>
     <assertion id="j">
-      <text>A top-level Java class is not a simple bean if it implements the javax.servlet.ServletRequestListener interface</text>
+      <text>A top-level Java class is not a simple bean if it implements the javax.servlet.http.HttpSessionListener interface</text>
     </assertion>
     <assertion id="k">
-      <text>A top-level Java class is not a simple bean if it implements the javax.ejb.EnterpriseBean interface</text>
+      <text>A top-level Java class is not a simple bean if it implements the javax.servlet.ServletRequestListener interface</text>
     </assertion>
     <assertion id="l">
-      <text>A top-level Java class is not a simple bean if it extends javax.faces.component.UIComponent</text>
+      <text>A top-level Java class is not a simple bean if it implements the javax.ejb.EnterpriseBean interface</text>
     </assertion>
     <assertion id="m">
-      <text>A top-level Java class is not a simple bean if it is declared as an EJB bean class in ejb-jar.xml</text>
+      <text>A top-level Java class is not a simple bean if it extends javax.faces.component.UIComponent</text>
     </assertion>
     <assertion id="n">
-      <text>A top-level Java class is not a simple bean if it is declared as a JPA entity in orm.xml</text>
+      <text>A top-level Java class is not a simple bean if it is declared as an EJB bean class in ejb-jar.xml</text>
     </assertion>
     <assertion id="o">
-      <text>A top-level Java class is only a simple bean if it has an appropriate constructor - either a constructor with no parameters, or declares a constructor annotated @Initializer</text>
+      <text>A top-level Java class is not a simple bean if it is declared as a JPA entity in orm.xml</text>
     </assertion>
     <assertion id="p">
+      <text>A top-level Java class is only a simple bean if it has an appropriate constructor - a constructor with no parameters</text>
+    </assertion>
+    <assertion id="q">
+      <text>A top-level Java class is only a simple bean if it has an appropriate constructor - a constructor annotated @Initializer</text>
+    </assertion>
+    <assertion id="r">
       <text>Additional simple beans with the same bean class may be defined using XML, by specifying the class in beans.xml.</text>    
     </assertion>
     
@@ -461,20 +537,24 @@
     </assertion>
     
     <assertion id="c">
-      <text>If the bean class of a simple bean defined in XML is a parameterized type or a non-static inner class, a DefinitionException is thrown by the container at deployment time.</text>
+      <text>If the bean class of a simple bean defined in XML is a parameterized type , a DefinitionException is thrown by the container at deployment time.</text>
     </assertion>
     
     <assertion id="d">
+      <text>If the bean class of a simple bean defined in XML is a non-static inner class, a DefinitionException is thrown by the container at deployment time.</text>
+    </assertion>
+    
+    <assertion id="e">
       <text>If the bean class of a simple bean defined in XML is an abstract class, and the simple bean is not a decorator, a DefinitionException
 is thrown by the container at deployment time</text>
     </assertion>
     
-    <assertion id="e">
+    <assertion id="f">
       <text>If the bean class of a simple bean defined in XML is annotated @Interceptor, then the bean must be explicitly declared as an interceptor in XML, as defined in Section A.3.5.2, "Declaring an interceptor using XML". If a simple bean defined in XML has a bean class annotated @Interceptor and is not declared as an interceptor in XML, a DefinitionException is
 thrown by the container at deployment time.</text>
     </assertion>
     
-    <assertion id="f">
+    <assertion id="g">
       <text>If the bean class of a simple bean defined in XML is annotated @Interceptor, then the bean must be explicitly declared as an interceptor in XML, as defined in Section A.3.5.2, "Declaring an interceptor using XML". If a simple bean defined in XML has a bean class annotated @Interceptor and is not declared as an interceptor in XML, a DefinitionException is
 thrown by the container at deployment time.</text>
     </assertion>
@@ -542,9 +622,13 @@
     </assertion>
     
     <assertion id="d">
-      <text>If a bean constructor has a parameter annotated @Disposes, or @Observes, a DefinitionException is thrown by the container at deployment time</text>
+      <text>If a bean constructor has a parameter annotated @Disposes, a DefinitionException is thrown by the container at deployment time</text>
     </assertion>
   
+    <assertion id="e">
+      <text>If a bean constructor has a parameter annotated @Observes, a DefinitionException is thrown by the container at deployment time</text>
+    </assertion>
+  
   </section>
   
   <section id="3.2.6.2" title="Declaring a bean constructor using XML">
@@ -579,21 +663,21 @@
     </assertion>
     
     <assertion id="b">
-      <text>We say that X directly specializes Y, and we can be certain that Y will never be instantiated or called by the container if X is enabled.</text>
+      <text>We say that X directly specializes Y, and we can be certain that Y will never be instantiated by the container if X is enabled.</text>
       <note>This assertion relates to specialized beans declared using annotations</note>
     </assertion>
     
     <assertion id="c">
-      <text>If the bean class of X does not directly extend the bean class of another simple bean, a DefinitionException is thrown by the container at deployment time.</text>
+      <text>We say that X directly specializes Y, and we can be certain that Y will never be called by the container if X is enabled.</text>
+      <note>This assertion relates to specialized beans declared using annotations</note>
     </assertion>
     
     <assertion id="d">
-      <text>If a simple bean X defined in XML declares the &lt;Specializes&gt; element, then the bean class of X must be the bean class of another simple bean Y defined using annotations. Then X inherits all bindings of Y, and if Y has a name, X has the same name as Y</text>
+      <text>If the bean class of X does not directly extend the bean class of another simple bean, a DefinitionException is thrown by the container at deployment time.</text>
     </assertion>
     
     <assertion id="e">
-      <text>We say that X directly specializes Y, and we can be certain that Y will never be instantiated or called by the container if X is enabled</text>
-      <note>This assertion relates to specialized beans declared in XML</note>
+      <text>If a simple bean X defined in XML declares the &lt;Specializes&gt; element, then the bean class of X must be the bean class of another simple bean Y defined using annotations. Then X inherits all bindings of Y, and if Y has a name, X has the same name as Y</text>
     </assertion>
   </section>
   
@@ -625,8 +709,12 @@
     </assertion>
     
     <assertion id="f">
-      <text>If the bean class of a session bean is annotated @Interceptor or @Decorator, a DefinitionException is thrown by the container at deployment time</text>
+      <text>If the bean class of a session bean is annotated @Interceptor, a DefinitionException is thrown by the container at deployment time</text>
     </assertion>
+
+    <assertion id="g">
+      <text>If the bean class of a session bean is annotated @Decorator, a DefinitionException is thrown by the container at deployment time</text>
+    </assertion>
   </section>
   
   <section id="3.3.1" title="EJB remove methods of session beans">
@@ -702,8 +790,12 @@
     </assertion>
     
     <assertion id="c">
-      <text>If an entity or message-driven bean class is declared in XML, a DefinitionException is thrown by the container at deployment time</text>
+      <text>If an entity bean class is declared in XML, a DefinitionException is thrown by the container at deployment time</text>
     </assertion>
+
+    <assertion id="d">
+      <text>If a message-driven bean class is declared in XML, a DefinitionException is thrown by the container at deployment time</text>
+    </assertion>
   </section>
   
   <section id="3.3.6" title="Session beans with the @New binding">
@@ -763,14 +855,18 @@
     </assertion>
     
     <assertion id="b">
-      <text>We say that X directly specializes Y, and we can be certain that Y will never be instantiated or called by the container if X is enabled</text>
+      <text>We say that X directly specializes Y, and we can be certain that Y will never be instantiated by the container if X is enabled</text>
     </assertion>
     
     <assertion id="c">
+      <text>We say that X directly specializes Y, and we can be certain that Y will never be called by the container if X is enabled</text>
+    </assertion>
+    
+    <assertion id="d">
       <text>If the bean class of X does not directly extend the bean class of another session bean, a DefinitionException is thrown by the container at deployment time</text>
     </assertion>
     
-    <assertion id="d">
+    <assertion id="e">
       <text>If a session bean X defined in XML declares the &lt;Specializes&gt; element, then the bean class of X must be the bean class of another session bean Y defined using annotations. Then X inherits all bindings of Y, and if Y has a name, X has the same name as Y.</text>
     </assertion>
   </section>
@@ -797,34 +893,42 @@
     </assertion>
     
     <assertion id="b">
-      <text>A producer method may be either static or non-static</text>
+      <text>A producer method may be static</text>
     </assertion>
     
     <assertion id="c">
-      <text>If the bean is a session bean, the producer method must be either a business method of the EJB or a static method of the bean class</text>
+      <text>A producer method may be non-static</text>
     </assertion>
     
     <assertion id="d">
-      <text>If a producer method sometimes returns a null value, then the producer method must have scope @Dependent</text>
+      <text>If the bean is a session bean, the producer method must be either a business method of the EJB or a static method of the bean class</text>
     </assertion>
     
     <assertion id="e">
-      <text>If a producer method returns a null value at runtime, and the producer method declares any other scope, an IllegalProductException is thrown by the container. This restriction allows the container to use a client proxy, as defined in Section 5.4, "Client proxies".</text>
+      <text>If a producer method sometimes returns a null value, then the producer method must have scope @Dependent</text>
     </assertion>
     
     <assertion id="f">
-      <text>If the producer method return type is a parameterized type, it must specify actual type parameters for each type parameter</text>
+      <text>If a producer method returns a null value at runtime, and the producer method declares any other scope, an IllegalProductException is thrown by the container. This restriction allows the container to use a client proxy, as defined in Section 5.4, "Client proxies".</text>
     </assertion>
     
     <assertion id="g">
-      <text>If a producer method return type contains a wildcard type parameter or type variable, a DefinitionException is thrown by the container at deployment time</text>
+      <text>If the producer method return type is a parameterized type, it must specify actual type parameters for each type parameter</text>
     </assertion>
     
     <assertion id="h">
+      <text>If a producer method return type contains a wildcard type parameter, a DefinitionException is thrown by the container at deployment time</text>
+    </assertion>
+    
+    <assertion id="i">
+      <text>If a producer method return type contains a type variable, a DefinitionException is thrown by the container at deployment time</text>
+    </assertion>
+    
+    <assertion id="j">
       <text>The application may call producer methods directly. However, if the application calls a producer method directly, no parameters will be passed to the producer method by the container; the returned object is not bound to any context; and its lifecycle is not managed by the container</text>
     </assertion>
     
-    <assertion id="i">
+    <assertion id="k">
       <text>A bean may declare multiple producer methods</text>
     </assertion>
   </section>
@@ -855,10 +959,18 @@
     </assertion>
     
     <assertion id="c">
-      <text>If a producer method is annotated @Initializer, has a parameter annotated @Disposes, or has a parameter annotated @Observes, a DefinitionException is thrown by the container at deployment time</text>
+      <text>If a producer method is annotated @Initializer, a DefinitionException is thrown by the container at deployment time</text>
     </assertion>
     
     <assertion id="d">
+      <text>If a producer method has a parameter annotated @Disposes, a DefinitionException is thrown by the container at deployment time</text>
+    </assertion>
+    
+    <assertion id="e">
+      <text>If a producer method has a parameter annotated @Observes, a DefinitionException is thrown by the container at deployment time</text>
+    </assertion>
+    
+    <assertion id="f">
       <text>If a non-static method of a session bean class is annotated @Produces, and the method is not a business method of the EJB, a DefinitionException is thrown by the container at deployment time</text>
     </assertion>
   </section>
@@ -891,8 +1003,12 @@
     </assertion>
     
     <assertion id="b">
-      <text>If the method is static or does not directly override another producer method, a DefinitionException is thrown by the container at deployment time</text>
+      <text>If the method is static, a DefinitionException is thrown by the container at deployment time</text>
     </assertion>
+    
+    <assertion id="c">
+      <text>If the method does not directly override another producer method, a DefinitionException is thrown by the container at deployment time</text>
+    </assertion>
   </section>
   
   <section id="3.4.6" title="Disposal methods">
@@ -902,14 +1018,18 @@
     </assertion>
     
     <assertion id="b">
-      <text>A disposal method may be either static or non-static</text>
+      <text>A disposal method may be static</text>
     </assertion>
     
     <assertion id="c">
+      <text>A disposal method may be non-static</text>
+    </assertion>
+    
+    <assertion id="d">
       <text>If the bean is a session bean, the disposal method must be a business method of the EJB or a static method of the bean class</text>
     </assertion>
     
-    <assertion id="d">
+    <assertion id="e">
       <text>A bean may declare multiple disposal methods</text>
     </assertion>
   </section>
@@ -1007,30 +1127,38 @@
     </assertion>
     
     <assertion id="b">
-      <text>A producer field may be either static or nonstatic</text>
+      <text>A producer field may be static</text>
     </assertion>
     
     <assertion id="c">
-      <text>If a producer field sometimes contains a null value when accessed, then the producer field must have scope @Dependent</text>
+      <text>A producer field may be nonstatic</text>
     </assertion>
     
     <assertion id="d">
-      <text>If a producer method contains a null value at runtime, and the producer field declares any other scope, an IllegalProductException is thrown by the container. This restriction allows the container to use a client proxy, as defined in Section 5.4, "Client proxies"</text>
+      <text>If a producer field sometimes contains a null value when accessed, then the producer field must have scope @Dependent</text>
     </assertion>
     
     <assertion id="e">
-      <text>If the producer field return type is a parameterized type, it must specify actual type parameters for each type parameter</text>
+      <text>If a producer method contains a null value at runtime, and the producer field declares any other scope, an IllegalProductException is thrown by the container. This restriction allows the container to use a client proxy, as defined in Section 5.4, "Client proxies"</text>
     </assertion>
     
     <assertion id="f">
-      <text>If a producer field return type contains a wildcard type parameter or type variable, a DefinitionException is thrown by the container at deployment time</text>
+      <text>If the producer field return type is a parameterized type, it must specify actual type parameters for each type parameter</text>
     </assertion>
     
     <assertion id="g">
+      <text>If a producer field return type contains a wildcard type parameter, a DefinitionException is thrown by the container at deployment time</text>
+    </assertion>
+    
+    <assertion id="h">
+      <text>If a producer field return type contains a type variable, a DefinitionException is thrown by the container at deployment time</text>
+    </assertion>
+    
+    <assertion id="i">
       <text>The application may access producer fields directly. However, if the application accesses a producer field directly, the returned object is not bound to any context; and its lifecycle is not managed by the container</text>
     </assertion>
     
-    <assertion id="h">
+    <assertion id="j">
       <text>A bean may declare multiple producer fields</text>
     </assertion>
   </section>
@@ -1085,22 +1213,54 @@
   
   <section id="3.6" title="Resources">
     <assertion id="a">
-      <text>Resources may be declared in beans.xml, allowing direct injection of an EE resource, entity manager, entity manager factory, EJB remote object or web service reference</text>
+      <text>Resources may be declared in beans.xml, allowing direct injection of an EE resource</text>
     </assertion>
     
     <assertion id="b">
-      <text>The lifecycle of an injected reference is identical to the semantics of Java EE injection using @Resource, @PersistenceContext, @PersistenceUnit, @EJB or @WebServiceRef</text>
+      <text>Resources may be declared in beans.xml, allowing direct injection of an entity manager</text>
     </assertion>
     
     <assertion id="c">
+      <text>Resources may be declared in beans.xml, allowing direct injection of an entity manager factory</text>
+    </assertion>
+    
+    <assertion id="d">
+      <text>Resources may be declared in beans.xml, allowing direct injection of an EJB remote object</text>
+    </assertion>
+    
+    <assertion id="e">
+      <text>Resources may be declared in beans.xml, allowing direct injection of a web service reference</text>
+    </assertion>
+    
+    <assertion id="f">
+      <text>The lifecycle of an injected reference is identical to the semantics of Java EE injection using @Resource</text>
+    </assertion>
+    
+    <assertion id="g">
+      <text>The lifecycle of an injected reference is identical to the semantics of Java EE injection using @PersistenceContext</text>
+    </assertion>
+    
+    <assertion id="h">
+      <text>The lifecycle of an injected reference is identical to the semantics of Java EE injection using @PersistenceUnit</text>
+    </assertion>
+    
+    <assertion id="i">
+      <text>The lifecycle of an injected reference is identical to the semantics of Java EE injection using @EJB</text>
+    </assertion>
+    
+    <assertion id="j">
+      <text>The lifecycle of an injected reference is identical to the semantics of Java EE injection using @WebServiceRef</text>
+    </assertion>
+    
+    <assertion id="k">
       <text>A resource always has scope @Dependent</text>
     </assertion>
     
-    <assertion id="d">
+    <assertion id="l">
       <text>A resource may not declare a bean name</text>
     </assertion>
     
-    <assertion id="e">
+    <assertion id="m">
       <text>Resources are always declared using XML</text>
     </assertion>
   </section>
@@ -1153,11 +1313,11 @@
 &lt;WebServiceRef&gt; element.  For a web service, a JNDI name or mapped name must be specified using the &lt;name&gt; or &lt;mappedName&gt; child elements of the &lt;WebServiceRef&gt; element. Optionally, a URL pointing to a WSDL document may be specified using the &lt;wsdlLocation&gt; child element</text>
     </assertion>
     
-    <assertion id="k">
+    <assertion name="k">
       <text>The JNDI name specified by the &lt;name&gt; element must be a name in the global java:global or application java:app naming context</text>
     </assertion>
     
-    <assertion id="l">
+    <assertion name="l">
       <text>Optionally, one or more bindings may be specified for resources in XML.  If no binding is explicitly specified, the default binding @Current is assumed.</text>
     </assertion>
   
@@ -1169,26 +1329,158 @@
     </assertion>
     
     <assertion id="b">
-      <text>JMS queue resources must allow the direct injection of the Queue, QueueConnection, QueueSession, QueueReceiver and/or QueueSender</text>
+      <text>JMS queue resources must allow the direct injection of the Queue</text>
     </assertion>
     
     <assertion id="c">
-      <text>JMS topic resources must allow the direct injection of the Topic, TopicConnection, TopicSession, TopicSubscriber and/or TopicPublisher</text>
+      <text>JMS queue resources must allow the direct injection of the QueueConnection</text>
     </assertion>
     
     <assertion id="d">
-      <text>The lifecycles of the injected objects are managed by the container, and therefore the application need not explicitly close() any injected JMS object. If the application calls close() on an instance of a JMS resource, an UnsupportedOperationException is thrown by the container.</text>
+      <text>JMS queue resources must allow the direct injection of the QueueSession</text>
     </assertion>
     
     <assertion id="e">
-      <text>A JMS resource always has scope @Dependent</text>
+      <text>JMS queue resources must allow the direct injection of the QueueReceiver</text>
     </assertion>
     
     <assertion id="f">
-      <text>A JMS resource may not declare a bean name</text>
+      <text>JMS queue resources must allow the direct injection of the QueueSender</text>
     </assertion>
     
     <assertion id="g">
+      <text>JMS topic resources must allow the direct injection of the Topic</text>
+    </assertion>
+    
+    <assertion id="h">
+      <text>JMS topic resources must allow the direct injection of the TopicConnection</text>
+    </assertion>
+    
+    <assertion id="i">
+      <text>JMS topic resources must allow the direct injection of the TopicSession</text>
+    </assertion>
+    
+    <assertion id="j">
+      <text>JMS topic resources must allow the direct injection of the TopicSubscriber</text>
+    </assertion>
+    
+    <assertion id="k">
+      <text>JMS topic resources must allow the direct injection of the TopicPublisher</text>
+    </assertion>
+    
+    <assertion id="l">
+      <text>The lifecycles of the injected objects are managed by the container, and therefore the application need not explicitly close() any injected JMS object. If the application calls close() on an instance of a QueueConnection, an UnsupportedOperationException is thrown by the container.</text>
+    </assertion>
+    
+    <assertion id="m">
+      <text>The lifecycles of the injected objects are managed by the container, and therefore the application need not explicitly close() any injected JMS object. If the application calls close() on an instance of a QueueSession, an UnsupportedOperationException is thrown by the container.</text>
+    </assertion>
+    
+    <assertion id="n">
+      <text>The lifecycles of the injected objects are managed by the container, and therefore the application need not explicitly close() any injected JMS object. If the application calls close() on an instance of a QueueReceiver, an UnsupportedOperationException is thrown by the container.</text>
+    </assertion>
+    
+    <assertion id="o">
+      <text>The lifecycles of the injected objects are managed by the container, and therefore the application need not explicitly close() any injected JMS object. If the application calls close() on an instance of a QueueSender, an UnsupportedOperationException is thrown by the container.</text>
+    </assertion>
+    
+    <assertion id="p">
+      <text>The lifecycles of the injected objects are managed by the container, and therefore the application need not explicitly close() any injected JMS object. If the application calls close() on an instance of a TopicConnection, an UnsupportedOperationException is thrown by the container.</text>
+    </assertion>
+    
+    <assertion id="q">
+      <text>The lifecycles of the injected objects are managed by the container, and therefore the application need not explicitly close() any injected JMS object. If the application calls close() on an instance of a TopicSession, an UnsupportedOperationException is thrown by the container.</text>
+    </assertion>
+    
+    <assertion id="r">
+      <text>The lifecycles of the injected objects are managed by the container, and therefore the application need not explicitly close() any injected JMS object. If the application calls close() on an instance of a TopicSubscriber, an UnsupportedOperationException is thrown by the container.</text>
+    </assertion>
+    
+    <assertion id="s">
+      <text>The lifecycles of the injected objects are managed by the container, and therefore the application need not explicitly close() any injected JMS object. If the application calls close() on an instance of a TopicPublisher, an UnsupportedOperationException is thrown by the container.</text>
+    </assertion>
+    
+    <assertion id="t">
+      <text>A JMS Queue resource always has scope @Dependent</text>
+    </assertion>
+    
+    <assertion id="u">
+      <text>A JMS QueueConnection resource always has scope @Dependent</text>
+    </assertion>
+    
+    <assertion id="v">
+      <text>A JMS QueueSession resource always has scope @Dependent</text>
+    </assertion>
+    
+    <assertion id="w">
+      <text>A JMS QueueReceiver resource always has scope @Dependent</text>
+    </assertion>
+    
+    <assertion id="x">
+      <text>A JMS QueueSender resource always has scope @Dependent</text>
+    </assertion>
+    
+    <assertion id="y">
+      <text>A JMS Topic resource always has scope @Dependent</text>
+    </assertion>
+    
+    <assertion id="z">
+      <text>A JMS TopicConnection resource always has scope @Dependent</text>
+    </assertion>
+    
+    <assertion id="aa">
+      <text>A JMS TopicSession resource always has scope @Dependent</text>
+    </assertion>
+    
+    <assertion id="ab">
+      <text>A JMS TopicSubscriber resource always has scope @Dependent</text>
+    </assertion>
+    
+    <assertion id="ac">
+      <text>A JMS TopicPublisher resource always has scope @Dependent</text>
+    </assertion>
+    
+    <assertion id="ad">
+      <text>A JMS Queue resource may not declare a bean name</text>
+    </assertion>
+    
+    <assertion id="ae">
+      <text>A JMS QueueConnection resource may not declare a bean name</text>
+    </assertion>
+    
+    <assertion id="af">
+      <text>A JMS QueueSession resource may not declare a bean name</text>
+    </assertion>
+    
+    <assertion id="ag">
+      <text>A JMS QueueReceiver resource may not declare a bean name</text>
+    </assertion>
+    
+    <assertion id="ah">
+      <text>A JMS QueueSender resource may not declare a bean name</text>
+    </assertion>
+    
+    <assertion id="ai">
+      <text>A JMS Topic resource may not declare a bean name</text>
+    </assertion>
+    
+    <assertion id="aj">
+      <text>A JMS TopicConnection resource may not declare a bean name</text>
+    </assertion>
+    
+    <assertion id="ak">
+      <text>A JMS TopicSession resource may not declare a bean name</text>
+    </assertion>
+    
+    <assertion id="al">
+      <text>A JMS TopicSubscriber resource may not declare a bean name</text>
+    </assertion>
+    
+    <assertion id="am">
+      <text>A JMS TopicPublisher resource may not declare a bean name</text>
+    </assertion>
+    
+    <assertion id="an">
       <text>JMS resources are always declared using XML</text>
     </assertion>
   </section>
@@ -1222,20 +1514,40 @@
   <section id="3.8" title="Injected fields">
   
     <assertion id="a">
-      <text>An injected field is a non-static, non-final field of a bean class, of a servlet, or of any EJB session or message driven bean class.</text>
+      <text>An injected field is a non-static, non-final field of a bean class.</text>
     </assertion>
     
     <assertion id="b">
-      <text>Injected fields are initialized by the container immediately after instantiation and before any methods of the instance are invoked. The container calls the method Manager.getInstanceToInject() defined in Section 5.7.1, "Resolving dependencies" to determine a value for each injected field</text>
+      <text>An injected field is a non-static, non-final field of a servlet.</text>
     </assertion>
     
     <assertion id="c">
-      <text>Any EJB session or message driven bean may declare injected fields and have those fields injected by the container</text>
+      <text>An injected field is a non-static, non-final field of any EJB session bean class.</text>
     </assertion>
     
     <assertion id="d">
-      <text>If a field is a producer field or a decorator delegate attribute, it is not an injected field</text>
+      <text>An injected field is a non-static, non-final field of any message driven bean class.</text>
     </assertion>
+    
+    <assertion id="e">
+      <text>Injected fields are initialized by the container immediately after instantiation and before any methods of the instance are invoked. The container calls the method Manager.getInstanceToInject() defined in Section 5.7.1, "Resolving dependencies" to determine a value for each injected field</text>
+    </assertion>
+    
+    <assertion id="f">
+      <text>Any EJB session bean may declare injected fields and have those fields injected by the container</text>
+    </assertion>
+    
+    <assertion id="g">
+      <text>Any EJB message driven bean may declare injected fields and have those fields injected by the container</text>
+    </assertion>
+    
+    <assertion id="h">
+      <text>If a field is a producer field, it is not an injected field</text>
+    </assertion>
+
+    <assertion id="i">
+      <text>If a field is a decorator delegate attribute, it is not an injected field</text>
+    </assertion>
   </section>
   
   <section id="3.8.1" title="Declaring an injected field using annotations">
@@ -1265,32 +1577,48 @@
   
   <section id="3.9" title="Initializer methods">
     <assertion id="a">
-      <text>An initializer method is a non-static method of a bean class, of a servlet, or of any EJB session or message driven bean class.</text>
+      <text>An initializer method is a non-static method of a bean class.</text>
     </assertion>
     
+    <assertion id="a">
+      <text>An initializer method is a non-static method of a servlet.</text>
+    </assertion>
+    
     <assertion id="b">
-      <text>Initializer methods are called by the container immediately after injected fields have been initialized by the container and before any other methods of the instance are invoked.</text>
+      <text>An initializer method is a non-static method of any EJB session bean class.</text>
     </assertion>
     
     <assertion id="c">
-      <text>If the bean is a session bean, the initializer method is not required to be a business method of the session bean</text>
+      <text>An initializer method is a non-static method of a of any EJB message driven bean class.</text>
     </assertion>
     
     <assertion id="d">
-      <text>Method interceptors are never called when the container calls an initializer method</text>
+      <text>Initializer methods are called by the container immediately after injected fields have been initialized by the container and before any other methods of the instance are invoked.</text>
     </assertion>
     
     <assertion id="e">
-      <text>A bean class may declare multiple (or zero) initializer methods</text>
+      <text>If the bean is a session bean, the initializer method is not required to be a business method of the session bean</text>
     </assertion>
     
     <assertion id="f">
-      <text>The application may call initializer methods directly, but then no parameters will be passed to the method by the container</text>
+      <text>Method interceptors are never called when the container calls an initializer method</text>
     </assertion>
     
     <assertion id="g">
-      <text>Any EJB session or message driven bean may declare initializer methods and have the methods called by the container</text>
+      <text>A bean class may declare multiple (or zero) initializer methods</text>
     </assertion>
+    
+    <assertion id="h">
+      <text>The application may call initializer methods directly, but then no parameters will be passed to the method by the container</text>
+    </assertion>
+    
+    <assertion id="i">
+      <text>Any EJB session bean may declare initializer methods and have the methods called by the container</text>
+    </assertion>
+    
+    <assertion id="j">
+      <text>Any EJB message driven bean may declare initializer methods and have the methods called by the container</text>
+    </assertion>
   </section>
   
   <section id="3.9.1" title="Declaring an initializer method using annotations">
@@ -1299,9 +1627,17 @@
     </assertion>
     
     <assertion id="b">
-      <text>If an initializer method is annotated @Produces, has a parameter annotated @Disposes, or has a parameter annotated @Observes, a DefinitionException is thrown by the container at deployment time</text>
+      <text>If an initializer method is annotated @Produces, a DefinitionException is thrown by the container at deployment time</text>
     </assertion>
     
+    <assertion id="c">
+      <text>If an initializer method has a parameter annotated @Disposes, a DefinitionException is thrown by the container at deployment time</text>
+    </assertion>
+    
+    <assertion id="d">
+      <text>If an initializer method has a parameter annotated @Observes, a DefinitionException is thrown by the container at deployment time</text>
+    </assertion>
+    
   </section>
   
   <section id="3.9.2" title="Declaring an initializer method using XML">
@@ -1327,18 +1663,34 @@
   
   <section id="3.10" title="Support for Common Annotations">
     <assertion id="a">
-      <text>Dependency injection via @EJB, @Resource, @PersistenceUnit and @PersistenceContext is provided by the container when annotations are applied to the bean class of a simple bean</text>
+      <text>Dependency injection via @EJB is provided by the container when annotations are applied to the bean class of a simple bean</text>
     </assertion>
     
     <assertion id="b">
-      <text>@PostConstruct and @PreDestroy callbacks are provided by the container when annotations are applied to the bean class of a simple bean</text>
+      <text>Dependency injection via @Resource is provided by the container when annotations are applied to the bean class of a simple bean</text>
     </assertion>
     
     <assertion id="c">
+      <text>Dependency injection via @PersistenceUnit is provided by the container when annotations are applied to the bean class of a simple bean</text>
+    </assertion>
+    
+    <assertion id="d">
+      <text>Dependency injection via @PersistenceContext is provided by the container when annotations are applied to the bean class of a simple bean</text>
+    </assertion>
+    
+    <assertion id="e">
+      <text>@PostConstruct callbacks are provided by the container when annotations are applied to the bean class of a simple bean</text>
+    </assertion>
+    
+    <assertion id="f">
+      <text>@PreDestroy callbacks are provided by the container when annotations are applied to the bean class of a simple bean</text>
+    </assertion>
+    
+    <assertion id="g">
       <text>Interception, as defined in javax.interceptor is provided by the container when annotations are applied to the bean class of a simple bean</text>
     </assertion>
     
-    <assertion id="d">
+    <assertion id="h">
       <text>@PersistenceContext(type=EXTENDED) is not supported for simple beans</text>
     </assertion>
   </section>
@@ -1520,8 +1872,20 @@
     </assertion>
     
     <assertion id="c">
-      <text>Any non-static producer methods (see Section 3.4, "Producer methods"), producer fields (see Section 3.5, "Producer fields"), disposal methods (see Section 3.4.6, "Disposal methods") or observer methods (see Section 7.5, "Observer methods") of any bean are invoked upon an instance of the most specialized enabled bean that specializes the bean, as defined by Section 6.7, "Lifecycle of producer methods", Section 6.8, "Lifecycle of producer fields" and Section 7.4, "Observer notification".</text>
+      <text>Any non-static producer methods (see Section 3.4, "Producer methods") of any bean are invoked upon an instance of the most specialized enabled bean that specializes the bean, as defined by Section 6.7, "Lifecycle of producer methods".</text>
     </assertion>
+    
+    <assertion id="d">
+      <text>Any non-static producer fields (see Section 3.5, "Producer fields") of any bean are invoked upon an instance of the most specialized enabled bean that specializes the bean, as defined by Section 6.8, "Lifecycle of producer fields".</text>
+    </assertion>
+    
+    <assertion id="e">
+      <text>Any non-static disposal methods (see Section 3.4.6, "Disposal methods") of any bean are invoked upon an instance of the most specialized enabled bean that specializes the bean.</text>
+    </assertion>
+    
+    <assertion id="f">
+      <text>Any non-static observer methods (see Section 7.5, "Observer methods") of any bean are invoked upon an instance of the most specialized enabled bean that specializes the bean, as defined by Section 7.4, "Observer notification".</text>
+    </assertion>
   </section>
   
   <section id="4.3.3" title="Inconsistent specialization">




More information about the weld-commits mailing list