[webbeans-commits] Webbeans SVN: r1498 - 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
Thu Feb 12 13:46:02 EST 2009
Author: dallen6
Date: 2009-02-12 13:46:02 -0500 (Thu, 12 Feb 2009)
New Revision: 1498
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/method/AndalusianChicken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/DisposingConstructor_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/MountainLion.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/ObservingConstructor_Broken.java
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/method/Chicken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/method/DisposalMethodDefinitionTest.java
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/ProducerMethodLifecycleTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/NewSimpleBeanTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/SimpleBeanDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/SimpleBeanLifecycleTest.java
tck/trunk/impl/tck-audit.xml
Log:
Additional tests and reorganization.
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/method/AndalusianChicken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/method/AndalusianChicken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/method/AndalusianChicken.java 2009-02-12 18:46:02 UTC (rev 1498)
@@ -0,0 +1,16 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.method;
+
+import javax.inject.Specializes;
+
+ at Specializes
+ at AnotherDeploymentType
+class AndalusianChicken extends Chicken
+{
+ private static Egg egg = new Egg();
+
+ @Override
+ public Egg getEgg()
+ {
+ return egg;
+ }
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/method/AndalusianChicken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/method/Chicken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/method/Chicken.java 2009-02-12 15:18:25 UTC (rev 1497)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/method/Chicken.java 2009-02-12 18:46:02 UTC (rev 1498)
@@ -4,11 +4,16 @@
class Chicken
{
+ private static Egg egg = new Egg();
@Produces
public Egg produceEgg()
{
- return new Egg();
+ return getEgg();
}
-
+
+ public Egg getEgg()
+ {
+ return egg;
+ }
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/method/DisposalMethodDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/method/DisposalMethodDefinitionTest.java 2009-02-12 15:18:25 UTC (rev 1497)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/method/DisposalMethodDefinitionTest.java 2009-02-12 18:46:02 UTC (rev 1498)
@@ -1,20 +1,226 @@
package org.jboss.jsr299.tck.unit.implementation.producer.method;
+import javax.inject.DefinitionException;
+import javax.inject.UnsatisfiedDependencyException;
+
import org.hibernate.tck.annotations.SpecAssertion;
import org.testng.annotations.Test;
/**
*
- * Spec version: PRD2
- *
+ * Spec version: Public Release Draft 2
+ *
*/
public class DisposalMethodDefinitionTest
{
-
- @Test(groups="stub") @SpecAssertion(section="4.2", id = "unknown")
- public void testNonStaticDisposalMethodNotInherited()
+
+ /**
+ * A disposal method must be a method of a simple bean class or session bean
+ * class.
+ */
+ @Test(groups = { "stub", "disposalMethod" })
+ @SpecAssertion(section = "3.4.6", id = "a")
+ public void testDisposalMethodCanBeOfSimpleOrSessionBean()
{
assert false;
}
-
+
+ /**
+ * A disposal method may be either static or non-static
+ */
+ @Test(groups = { "stub", "disposalMethod" })
+ @SpecAssertion(section = "3.4.6", id = "b")
+ public void testDisposalMethodCanBeStaticOrNonStatic()
+ {
+ assert false;
+ }
+
+ /**
+ * A bean may declare multiple disposal methods
+ */
+ @Test(groups = { "stub", "disposalMethod" })
+ @SpecAssertion(section = "3.4.6", id = "d")
+ public void testBeanCanDeclareMultipleDisposalMethods()
+ {
+ assert false;
+ }
+
+ /**
+ * Each disposal method must have exactly one disposed parameter, of the same
+ * type as the corresponding producer method return type
+ */
+ @Test(groups = { "stub", "disposalMethod" })
+ @SpecAssertion(section = "3.4.7", id = "a")
+ public void testDisposalMethodCanHaveOnlyOneDisposedParameter()
+ {
+ assert false;
+ }
+
+ /**
+ * When searching for disposal methods for a producer method, the container
+ * considers the type and bindings of the disposed parameter.
+ */
+ @Test(groups = { "stub", "disposalMethod" })
+ @SpecAssertion(section = "3.4.7", id = "b")
+ public void testContainerUsesTypeAndBindingsForDisposalMethodSearch()
+ {
+ assert false;
+ }
+
+ /**
+ * If a disposed parameter resolves to a producer method according to the
+ * typesafe resolution algorithm, the container must call this method when
+ * destroying an instance returned by that producer method.
+ */
+ @Test(groups = { "stub", "disposalMethod" })
+ @SpecAssertion(section = "3.4.7", id = "d")
+ public void testContainerCallsDisposalMethodOnDestructionOfProducedInstance()
+ {
+ assert false;
+ }
+
+ /**
+ * If the disposed parameter does not resolve to any producer method
+ * according to the typesafe resolution algorithm, an
+ * UnsatisfiedDependencyException is thrown by the container at deployment
+ * time
+ */
+ @Test(groups = { "stub", "disposalMethod" }, expectedExceptions = { UnsatisfiedDependencyException.class })
+ @SpecAssertion(section = "3.4.7", id = "c")
+ public void testDisposalMethodOnUnresolvableTypeFails()
+ {
+ assert false;
+ }
+
+ /**
+ * A disposal method may be declared using annotations by annotating a
+ * parameter @javax.inject.Disposes. That parameter is the disposed parameter
+ */
+ @Test(groups = { "stub", "disposalMethod" })
+ @SpecAssertion(section = "3.4.8", id = "a")
+ public void testDisposalMethodDeclaredByAnnotation()
+ {
+ assert false;
+ }
+
+ /**
+ * If a method has more than one parameter annotated @Disposes, a
+ * DefinitionException is thrown by the container
+ */
+ @Test(groups = { "stub", "disposalMethod" }, expectedExceptions = { DefinitionException.class })
+ @SpecAssertion(section = "3.4.8", id = "b")
+ public void testMoreThanOneDisposalParameterFails()
+ {
+ assert false;
+ }
+
+ /**
+ * If a disposal method is annotated @Produces, or @Initializer or has a
+ * parameter annotated @Observes, a DefinitionException is thrown by the
+ * container at deployment time
+ */
+ @Test(groups = { "stub", "disposalMethod" }, expectedExceptions = { DefinitionException.class })
+ @SpecAssertion(section = "3.4.8", id = "c")
+ public void testDisposalMethodWithProducesFails()
+ {
+ assert false;
+ }
+
+ /**
+ * If a disposal method is annotated @Produces, or @Initializer or has a
+ * parameter annotated @Observes, a DefinitionException is thrown by the
+ * container at deployment time
+ */
+ @Test(groups = { "stub", "disposalMethod" }, expectedExceptions = { DefinitionException.class })
+ @SpecAssertion(section = "3.4.8", id = "d")
+ public void testDisposalMethodWithInitializerFails()
+ {
+ assert false;
+ }
+
+ /**
+ * If a disposal method is annotated @Produces, or @Initializer or has a
+ * parameter annotated @Observes, a DefinitionException is thrown by the
+ * container at deployment time
+ */
+ @Test(groups = { "stub", "disposalMethod" }, expectedExceptions = { DefinitionException.class })
+ @SpecAssertion(section = "3.4.8", id = "e")
+ public void testDisposalMethodWithObservesFails()
+ {
+ assert false;
+ }
+
+ /**
+ * For a bean defined in XML, a disposal method may be declared using the
+ * method name, the <Disposes> element, and the parameter types of the
+ * method
+ */
+ @Test(groups = { "stub", "disposalMethod", "webbeansxml" })
+ @SpecAssertion(section = "3.4.9", id = "a")
+ public void testDisposalMethodDeclaredByXML()
+ {
+ assert false;
+ }
+
+ /**
+ * When a disposal method is declared in XML, the container ignores binding
+ * annotations applied to the Java method parameter
+ */
+ @Test(groups = { "stub", "disposalMethod", "webbeansxml" })
+ @SpecAssertion(section = "3.4.9", id = "b")
+ public void testDisposalMethodDeclaredByXMLIgnoresAnnotatedBindings()
+ {
+ assert false;
+ }
+
+ /**
+ * If the bean class of a bean declared in XML does not have a method with
+ * the name and parameter types declared in XML, a DefinitionException is
+ * thrown by the container at deployment time
+ */
+ @Test(groups = { "stub", "disposalMethod", "webbeansxml" }, expectedExceptions = { DefinitionException.class })
+ @SpecAssertion(section = "3.4.9", id = "c")
+ public void testDisposalMethodDeclaredByXMLDoesNotMatchJava()
+ {
+ assert false;
+ }
+
+ /**
+ * In addition to the disposed parameter, a disposal method may declare
+ * additional parameters, which may also specify bindings. The container
+ * calls Manager.getInstanceToInject() to determine a value for each
+ * parameter of a disposal method and calls the disposal method with those
+ * parameter values
+ */
+ @Test(groups = { "stub", "disposalMethod" })
+ @SpecAssertion(section = "3.4.10", id = "a")
+ public void testDisposalMethodParametersGetInjected()
+ {
+ assert false;
+ }
+
+ /**
+ * When searching for disposal methods for a producer method, the container
+ * searches for disposal methods which are declared by an enabled bean, and
+ * for which the disposed parameter must resolve to the producer method,
+ * according to the typesafe resolution algorithm
+ */
+ @Test(groups = { "stub", "disposalMethod" })
+ @SpecAssertion(section = "3.4.11", id = "a")
+ public void testDisposalMethodTypeSafeResolution()
+ {
+ assert false;
+ }
+
+ /**
+ * If there are multiple disposal methods for a producer method, a
+ * DefinitionException is thrown by the container at deployment time
+ */
+ @Test(groups = { "stub", "disposalMethod" }, expectedExceptions = { DefinitionException.class })
+ @SpecAssertion(section = "3.4.11", id = "b")
+ public void testMultipleDisposalMethodsFails()
+ {
+ assert false;
+ }
+
}
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-12 15:18:25 UTC (rev 1497)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/method/ProducerMethodDefinitionTest.java 2009-02-12 18:46:02 UTC (rev 1498)
@@ -231,74 +231,6 @@
createProducerMethodBean(method, bean);
}
- @Test(groups={"stub", "disposalMethod"})
- @SpecAssertion(section="3.3.5", id = "unknown")
- public void testDisposalMethodNonStatic()
- {
- // TODO Placeholder
- assert false;
- }
-
- @Test(groups={"stub", "disposalMethod"})
- @SpecAssertion(section="3.3.5", id = "unknown")
- public void testDisposalMethodMethodDeclaredOnWebBeanImplementationClass()
- {
- // TODO Placeholder
- assert false;
- }
-
- @Test(groups={"stub", "disposalMethod"})
- @SpecAssertion(section="3.3.5", id = "unknown")
- public void testDisposalMethodBindingAnnotations()
- {
- // TODO Placeholder
- assert false;
- }
-
- @Test(groups={"stub", "disposalMethod"})
- @SpecAssertion(section="3.3.5", id = "unknown")
- public void testDisposalMethodDefaultBindingAnnotations()
- {
- // TODO Placeholder
- assert false;
- }
-
- @Test(groups={"stub", "disposalMethod"})
- @SpecAssertion(section="3.3.5", id = "unknown")
- public void testDisposalMethodDoesNotResolveToProducerMethod()
- {
- // TODO Placeholder
- assert false;
- }
-
- @Test(groups={"stub", "disposalMethod"})
- @SpecAssertion(section="3.4.6", id = "unknown")
- public void testDisposalMethodDeclaredOnEnabledBean()
- {
- // TODO Placeholder
- // TODO Move this
-
- assert false;
- }
-
- @Test(groups={"stub", "disposalMethod"})
- @SpecAssertion(section="3.4.6", id = "unknown")
- public void testBeanCanDeclareMultipleDisposalMethods()
- {
- // TODO move this
- // TODO Placeholder
- assert false;
- }
-
- @Test(groups={"stub", "disposalMethod"})
- @SpecAssertion(section="3.4.6", id = "unknown")
- public void testProducerMethodHasNoMoreThanOneDisposalMethod()
- {
- // TODO move this
- // TODO Placeholder
- assert false;
- }
-
@Test(groups="producerMethod")
@SpecAssertions({
@SpecAssertion(section = "2.7.2", id = "unknown"),
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/method/ProducerMethodLifecycleTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/method/ProducerMethodLifecycleTest.java 2009-02-12 15:18:25 UTC (rev 1497)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/method/ProducerMethodLifecycleTest.java 2009-02-12 18:46:02 UTC (rev 1498)
@@ -1,6 +1,8 @@
package org.jboss.jsr299.tck.unit.implementation.producer.method;
+import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
+import java.util.List;
import javax.inject.CreationException;
import javax.inject.IllegalProductException;
@@ -15,69 +17,93 @@
/**
*
* Spec version: PRD2
- *
+ *
*/
public class ProducerMethodLifecycleTest extends AbstractTest
{
-
- @Test(groups={"producerMethod", "broken"})
- @SpecAssertion(section="B.1", id = "unknown")
+
+ @Override
+ protected List<Class<? extends Annotation>> getEnabledDeploymentTypes()
+ {
+ List<Class<? extends Annotation>> deploymentTypes = super.getStandardDeploymentTypes();
+ deploymentTypes.add(AnotherDeploymentType.class);
+ return deploymentTypes;
+ }
+
+ @Test(groups = { "producerMethod", "broken" })
+ @SpecAssertion(section = "B.1", id = "unknown")
public void testProducerMethodBeanCreate() throws Exception
{
- Bean<SpiderProducer> spiderProducer = createSimpleBean(SpiderProducer.class);
+ Bean<SpiderProducer> spiderProducer = createSimpleBean(SpiderProducer.class);
manager.addBean(spiderProducer);
Method method = SpiderProducer.class.getMethod("produceTarantula");
Bean<Tarantula> tarantulaBean = createProducerMethodBean(method, spiderProducer);
Tarantula tarantula = tarantulaBean.create(new MockCreationalContext<Tarantula>());
assert tarantula != null;
}
-
- @Test(groups={"stub", "specialization"})
- @SpecAssertion(section="3.3.4", id = "unknown")
- public void testSpecializedBeanAlwaysUsed()
+
+ /**
+ * Otherwise, if the producer method is non-static, the container must:
+ *
+ * • obtain the Bean object for the most specialized bean that specializes
+ * the bean which declares the producer method, and then
+ *
+ * • obtain an instance of the most specialized bean, by calling
+ * Manager.getInstance(), passing the Bean object representing the bean, and
+ *
+ * • invoke the producer method upon this instance.
+ *
+ * @throws Exception
+ */
+ @Test(groups = { "specialization" })
+ @SpecAssertion(section = "6.7", id = "unknown")
+ public void testSpecializedBeanAlwaysUsed() throws Exception
{
- // TODO Placeholder
- assert false;
+ deployBeans(Chicken.class, AndalusianChicken.class);
+ new RunInDependentContext()
+ {
+
+ @Override
+ protected void execute() throws Exception
+ {
+ Egg egg = manager.getInstanceByType(Egg.class);
+ assert egg != null;
+ assert egg.equals(new AndalusianChicken().getEgg());
+ }
+
+ }.run();
}
-
- @Test(groups={"stub", "disposalMethod", "beanLifecycle"})
- @SpecAssertion(section="3.3.5", id = "unknown")
+
+ @Test(groups = { "stub", "disposalMethod", "beanLifecycle" })
+ @SpecAssertion(section = "3.3.5", id = "unknown")
public void testDisposalMethodCalled()
{
// TODO Placeholder
assert false;
}
-
- @Test(groups={"stub", "disposalMethod", "beanLifecycle"})
- @SpecAssertion(section="3.3.5", id = "unknown")
+
+ @Test(groups = { "stub", "disposalMethod", "beanLifecycle" })
+ @SpecAssertion(section = "3.3.5", id = "unknown")
public void testDisposalMethodHasParametersInjected()
{
// TODO Placeholder
assert false;
}
-
-
- @Test(groups={"producerMethod", "broken"})
- @SpecAssertions({
- @SpecAssertion(section = "3.4", id = "unknown"),
- @SpecAssertion(section = "B.1", id = "unknown"),
- @SpecAssertion(section = "7.3", id = "unknown")
- })
+
+ @Test(groups = { "producerMethod", "broken" })
+ @SpecAssertions( { @SpecAssertion(section = "3.4", id = "unknown"), @SpecAssertion(section = "B.1", id = "unknown"), @SpecAssertion(section = "7.3", id = "unknown") })
public void testProducerMethodReturnsNullIsDependent() throws Exception
{
- Bean<SpiderProducer> spiderProducer = createSimpleBean(SpiderProducer.class);
+ Bean<SpiderProducer> spiderProducer = createSimpleBean(SpiderProducer.class);
manager.addBean(spiderProducer);
Method method = SpiderProducer.class.getMethod("getNullSpider");
Bean<Spider> spiderBean = createProducerMethodBean(method, spiderProducer);
Spider spider = spiderBean.create(new MockCreationalContext<Spider>());
assert spider == null;
}
-
- @Test(groups="producerMethod", expectedExceptions=IllegalProductException.class)
- @SpecAssertions({
- @SpecAssertion(section = "3.4", id = "unknown"),
- @SpecAssertion(section = "B.1", id = "unknown")
- })
+
+ @Test(groups = "producerMethod", expectedExceptions = IllegalProductException.class)
+ @SpecAssertions( { @SpecAssertion(section = "3.4", id = "unknown"), @SpecAssertion(section = "B.1", id = "unknown") })
public void testProducerMethodReturnsNullIsNotDependent() throws Exception
{
Bean<SpiderProducer_Broken> spiderProducer = createSimpleBean(SpiderProducer_Broken.class);
@@ -85,35 +111,35 @@
Method method = SpiderProducer_Broken.class.getMethod("getRequestScopedSpider");
createProducerMethodBean(method, spiderProducer).create(new MockCreationalContext<Object>());
}
-
- @Test(expectedExceptions=CreationException.class)
+
+ @Test(expectedExceptions = CreationException.class)
public void testCreationExceptionWrapsCheckedExceptionThrownFromCreate() throws Exception
{
deployBeans(LorryProducer_Broken.class);
new RunInDependentContext()
{
-
- protected void execute() throws Exception
+
+ protected void execute() throws Exception
{
manager.getInstanceByType(Lorry.class);
}
-
+
}.run();
}
-
- @Test(expectedExceptions=FooException.class)
+
+ @Test(expectedExceptions = FooException.class)
public void testUncheckedExceptionThrownFromCreateNotWrapped() throws Exception
{
deployBeans(ShipProducer_Broken.class);
new RunInDependentContext()
{
-
- protected void execute() throws Exception
+
+ protected void execute() throws Exception
{
manager.getInstanceByType(Ship.class);
}
-
+
}.run();
}
-
+
}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/DisposingConstructor_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/DisposingConstructor_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/DisposingConstructor_Broken.java 2009-02-12 18:46:02 UTC (rev 1498)
@@ -0,0 +1,11 @@
+package org.jboss.jsr299.tck.unit.implementation.simple;
+
+import javax.inject.Disposes;
+
+public class DisposingConstructor_Broken
+{
+ public DisposingConstructor_Broken(@Disposes Duck duck)
+ {
+
+ }
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/DisposingConstructor_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/MountainLion.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/MountainLion.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/MountainLion.java 2009-02-12 18:46:02 UTC (rev 1498)
@@ -0,0 +1,10 @@
+package org.jboss.jsr299.tck.unit.implementation.simple;
+
+import javax.inject.Specializes;
+
+ at Specializes
+ at AnotherDeploymentType
+public class MountainLion extends Lion
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/MountainLion.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/NewSimpleBeanTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/NewSimpleBeanTest.java 2009-02-12 15:18:25 UTC (rev 1497)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/NewSimpleBeanTest.java 2009-02-12 18:46:02 UTC (rev 1498)
@@ -1,6 +1,8 @@
package org.jboss.jsr299.tck.unit.implementation.simple;
import java.lang.annotation.Annotation;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
import java.util.Set;
import javax.context.Dependent;
@@ -20,31 +22,50 @@
/**
*
* Spec version: PRD2
- *
+ *
*/
public class NewSimpleBeanTest extends AbstractTest
{
-
- private static final Annotation TAME_LITERAL = new AnnotationLiteral<Tame>() {};
-
+
+ private static final Annotation TAME_LITERAL = new AnnotationLiteral<Tame>()
+ {
+ };
+
private Bean<WrappedSimpleBean> newSimpleBean;
-
+
@BeforeMethod
- public void initNewBean()
+ public void initNewBean()
{
deployBeans(WrappedSimpleBean.class);
Set<Bean<WrappedSimpleBean>> beans = manager.resolveByType(WrappedSimpleBean.class, new NewLiteral());
assert beans.size() == 1;
newSimpleBean = beans.iterator().next();
}
-
+
/**
- * When the built-in binding type @New is applied to an injection point, a
- * Web Bean is implicitly defined with: � scope @Dependent, � deployment type
+ * Additionally, for each such simple bean, a second simple bean exists
+ * which:
*
- * @Standard, � @New as the only binding annotation, � no Web Bean name, � no
- * stereotypes, and such that � the implementation class is the
- * declared type of the injection point.
+ * • has the same bean class,
+ *
+ * • has the same bean constructor, initializer methods and injected fields
+ * defined by annotations, and
+ *
+ * • has the same interceptor bindings defined by annotations.
+ *
+ * However, this second bean:
+ *
+ * • has scope @Dependent,
+ *
+ * • has deployment type @Standard,
+ *
+ * • has @javax.inject.New as the only binding,
+ *
+ * • has no bean name,
+ *
+ * • has no stereotypes, and
+ *
+ * • has no observer methods, producer methods or fields or disposal methods.
*/
@Test(groups = { "new" })
@SpecAssertion(section = "3.2.5", id = "unknown")
@@ -54,12 +75,29 @@
}
/**
- * When the built-in binding type @New is applied to an injection point, a
- * Web Bean is implicitly defined with: � scope @Dependent, � deployment type
+ * Additionally, for each such simple bean, a second simple bean exists
+ * which:
*
- * @Standard, � @New as the only binding annotation, � no Web Bean name, � no
- * stereotypes, and such that � the implementation class is the
- * declared type of the injection point.
+ * • has the same bean class,
+ *
+ * • has the same bean constructor, initializer methods and injected fields
+ * defined by annotations, and
+ *
+ * • has the same interceptor bindings defined by annotations.
+ *
+ * However, this second bean:
+ *
+ * • has scope @Dependent,
+ *
+ * • has deployment type @Standard,
+ *
+ * • has @javax.inject.New as the only binding,
+ *
+ * • has no bean name,
+ *
+ * • has no stereotypes, and
+ *
+ * • has no observer methods, producer methods or fields or disposal methods.
*/
@Test(groups = { "new" })
@SpecAssertion(section = "3.2.5", id = "unknown")
@@ -69,28 +107,62 @@
}
/**
- * When the built-in binding type @New is applied to an injection point, a
- * Web Bean is implicitly defined with: � scope @Dependent, � deployment type
+ * Additionally, for each such simple bean, a second simple bean exists
+ * which:
*
- * @Standard, � @New as the only binding annotation, � no Web Bean name, � no
- * stereotypes, and such that � the implementation class is the
- * declared type of the injection point.
+ * • has the same bean class,
+ *
+ * • has the same bean constructor, initializer methods and injected fields
+ * defined by annotations, and
+ *
+ * • has the same interceptor bindings defined by annotations.
+ *
+ * However, this second bean:
+ *
+ * • has scope @Dependent,
+ *
+ * • has deployment type @Standard,
+ *
+ * • has @javax.inject.New as the only binding,
+ *
+ * • has no bean name,
+ *
+ * • has no stereotypes, and
+ *
+ * • has no observer methods, producer methods or fields or disposal methods.
*/
@Test(groups = { "new" })
@SpecAssertion(section = "3.2.5", id = "unknown")
- public void testNewBeanIsHasOnlyNewBinding()
+ public void testNewBeanHasOnlyNewBinding()
{
assert newSimpleBean.getBindings().size() == 1;
assert newSimpleBean.getBindings().iterator().next().annotationType().equals(new NewLiteral().annotationType());
}
/**
- * When the built-in binding type @New is applied to an injection point, a
- * Web Bean is implicitly defined with: � scope @Dependent, � deployment type
+ * Additionally, for each such simple bean, a second simple bean exists
+ * which:
*
- * @Standard, � @New as the only binding annotation, � no Web Bean name, � no
- * stereotypes, and such that � the implementation class is the
- * declared type of the injection point.
+ * • has the same bean class,
+ *
+ * • has the same bean constructor, initializer methods and injected fields
+ * defined by annotations, and
+ *
+ * • has the same interceptor bindings defined by annotations.
+ *
+ * However, this second bean:
+ *
+ * • has scope @Dependent,
+ *
+ * • has deployment type @Standard,
+ *
+ * • has @javax.inject.New as the only binding,
+ *
+ * • has no bean name,
+ *
+ * • has no stereotypes, and
+ *
+ * • has no observer methods, producer methods or fields or disposal methods.
*/
@Test(groups = { "new" })
@SpecAssertion(section = "3.2.5", id = "unknown")
@@ -100,32 +172,64 @@
}
/**
- * When the built-in binding type @New is applied to an injection point, a
- * Web Bean is implicitly defined with: � scope @Dependent, � deployment type
+ * Additionally, for each such simple bean, a second simple bean exists
+ * which:
*
- * @Standard, � @New as the only binding annotation, � no Web Bean name, � no
- * stereotypes, and such that � the implementation class is the
- * declared type of the injection point.
+ * • has the same bean class,
+ *
+ * • has the same bean constructor, initializer methods and injected fields
+ * defined by annotations, and
+ *
+ * • has the same interceptor bindings defined by annotations.
+ *
+ * However, this second bean:
+ *
+ * • has scope @Dependent,
+ *
+ * • has deployment type @Standard,
+ *
+ * • has @javax.inject.New as the only binding,
+ *
+ * • has no bean name,
+ *
+ * • has no stereotypes, and
+ *
+ * • has no observer methods, producer methods or fields or disposal methods.
+ * TODO API does not provide a way to see what stereotypes are applied on a bean
*/
- @Test(groups = { "stub", "new" })
+ @Test(groups = { "underInvestigation", "new" })
@SpecAssertion(section = "3.2.5", id = "unknown")
public void testNewBeanHasNoStereotypes()
{
assert false;
}
-
+
/**
- * Furthermore, this Web Bean: � has the same Web Bean constructor,
- * initializer methods and injected fields as a Web Bean defined using
- * annotations� that is, it has any Web Bean constructor, initializer method
- * or injected field declared by annotations that appear on the
- * implementation class, � has no observer methods, producer methods or
- * fields or disposal methods, � has the same interceptors as a Web Bean
- * defined using annotations�that is, it has all the interceptor binding
- * types declared by annotations that appear on the implementation class, and
- * � has no decorators.
+ * Additionally, for each such simple bean, a second simple bean exists
+ * which:
+ *
+ * • has the same bean class,
+ *
+ * • has the same bean constructor, initializer methods and injected fields
+ * defined by annotations, and
+ *
+ * • has the same interceptor bindings defined by annotations.
+ *
+ * However, this second bean:
+ *
+ * • has scope @Dependent,
+ *
+ * • has deployment type @Standard,
+ *
+ * • has @javax.inject.New as the only binding,
+ *
+ * • has no bean name,
+ *
+ * • has no stereotypes, and
+ *
+ * • has no observer methods, producer methods or fields or disposal methods.
*/
- @Test(groups = {"new", "stub" })
+ @Test(groups = { "new", "underInvestigation" })
@SpecAssertion(section = "3.2.5", id = "unknown")
public void testNewBeanHasNoObservers()
{
@@ -133,17 +237,32 @@
}
/**
- * Furthermore, this Web Bean: � has the same Web Bean constructor,
- * initializer methods and injected fields as a Web Bean defined using
- * annotations� that is, it has any Web Bean constructor, initializer method
- * or injected field declared by annotations that appear on the
- * implementation class, � has no observer methods, producer methods or
- * fields or disposal methods, � has the same interceptors as a Web Bean
- * defined using annotations�that is, it has all the interceptor binding
- * types declared by annotations that appear on the implementation class, and
- * � has no decorators.
+ * Additionally, for each such simple bean, a second simple bean exists
+ * which:
+ *
+ * • has the same bean class,
+ *
+ * • has the same bean constructor, initializer methods and injected fields
+ * defined by annotations, and
+ *
+ * • has the same interceptor bindings defined by annotations.
+ *
+ * However, this second bean:
+ *
+ * • has scope @Dependent,
+ *
+ * • has deployment type @Standard,
+ *
+ * • has @javax.inject.New as the only binding,
+ *
+ * • has no bean name,
+ *
+ * • has no stereotypes, and
+ *
+ * • has no observer methods, producer methods or fields or disposal methods.
+ * TODO The API does not provide any way to see producer fields from the new bean
*/
- @Test(groups = { "new", "stub" })
+ @Test(groups = { "new", "underInvestigation" })
@SpecAssertion(section = "3.2.5", id = "unknown")
public void testNewBeanHasNoProducerFields()
{
@@ -151,17 +270,31 @@
}
/**
- * Furthermore, this Web Bean: � has the same Web Bean constructor,
- * initializer methods and injected fields as a Web Bean defined using
- * annotations� that is, it has any Web Bean constructor, initializer method
- * or injected field declared by annotations that appear on the
- * implementation class, � has no observer methods, producer methods or
- * fields or disposal methods, � has the same interceptors as a Web Bean
- * defined using annotations�that is, it has all the interceptor binding
- * types declared by annotations that appear on the implementation class, and
- * � has no decorators.
+ * Additionally, for each such simple bean, a second simple bean exists
+ * which:
+ *
+ * • has the same bean class,
+ *
+ * • has the same bean constructor, initializer methods and injected fields
+ * defined by annotations, and
+ *
+ * • has the same interceptor bindings defined by annotations.
+ *
+ * However, this second bean:
+ *
+ * • has scope @Dependent,
+ *
+ * • has deployment type @Standard,
+ *
+ * • has @javax.inject.New as the only binding,
+ *
+ * • has no bean name,
+ *
+ * • has no stereotypes, and
+ *
+ * • has no observer methods, producer methods or fields or disposal methods.
*/
- @Test(groups = { "new", "stub" })
+ @Test(groups = { "new", "underInvestigation" })
@SpecAssertion(section = "3.2.5", id = "unknown")
public void testNewBeanHasNoProducerMethods()
{
@@ -169,35 +302,66 @@
}
/**
- * Furthermore, this Web Bean: � has the same Web Bean constructor,
- * initializer methods and injected fields as a Web Bean defined using
- * annotations� that is, it has any Web Bean constructor, initializer method
- * or injected field declared by annotations that appear on the
- * implementation class, � has no observer methods, producer methods or
- * fields or disposal methods, � has the same interceptors as a Web Bean
- * defined using annotations�that is, it has all the interceptor binding
- * types declared by annotations that appear on the implementation class, and
- * � has no decorators.
+ * Additionally, for each such simple bean, a second simple bean exists
+ * which:
+ *
+ * • has the same bean class,
+ *
+ * • has the same bean constructor, initializer methods and injected fields
+ * defined by annotations, and
+ *
+ * • has the same interceptor bindings defined by annotations.
+ *
+ * However, this second bean:
+ *
+ * • has scope @Dependent,
+ *
+ * • has deployment type @Standard,
+ *
+ * • has @javax.inject.New as the only binding,
+ *
+ * • has no bean name,
+ *
+ * • has no stereotypes, and
+ *
+ * • has no observer methods, producer methods or fields or disposal methods.
+ * TODO API does not provide a way to detect if disposal methods exist on a bean
*/
- @Test(groups = { "new" , "stub"})
+ @Test(groups = { "new", "underInvestigation" })
@SpecAssertion(section = "3.2.5", id = "unknown")
public void testNewBeanHasNoDisposalMethods()
{
- //Class<?> type = TypeInfo.ofTypes(newSimpleBean.getTypes()).getSuperClass();
- //assert manager.resolveDisposalMethods(type, newSimpleBean.getBindings().toArray(new Annotation[0])).isEmpty();
+ // Class<?> type =
+ // TypeInfo.ofTypes(newSimpleBean.getTypes()).getSuperClass();
+ // assert manager.resolveDisposalMethods(type,
+ // newSimpleBean.getBindings().toArray(new Annotation[0])).isEmpty();
assert false;
}
/**
- * Furthermore, this Web Bean: � has the same Web Bean constructor,
- * initializer methods and injected fields as a Web Bean defined using
- * annotations� that is, it has any Web Bean constructor, initializer method
- * or injected field declared by annotations that appear on the
- * implementation class, � has no observer methods, producer methods or
- * fields or disposal methods, � has the same interceptors as a Web Bean
- * defined using annotations�that is, it has all the interceptor binding
- * types declared by annotations that appear on the implementation class, and
- * � has no decorators.
+ * Additionally, for each such simple bean, a second simple bean exists
+ * which:
+ *
+ * • has the same bean class,
+ *
+ * • has the same bean constructor, initializer methods and injected fields
+ * defined by annotations, and
+ *
+ * • has the same interceptor bindings defined by annotations.
+ *
+ * However, this second bean:
+ *
+ * • has scope @Dependent,
+ *
+ * • has deployment type @Standard,
+ *
+ * • has @javax.inject.New as the only binding,
+ *
+ * • has no bean name,
+ *
+ * • has no stereotypes, and
+ *
+ * • has no observer methods, producer methods or fields or disposal methods.
*/
@Test(groups = { "stub", "new" })
@SpecAssertion(section = "3.2.5", id = "unknown")
@@ -207,17 +371,31 @@
}
/**
- * Furthermore, this Web Bean: � has the same Web Bean constructor,
- * initializer methods and injected fields as a Web Bean defined using
- * annotations� that is, it has any Web Bean constructor, initializer method
- * or injected field declared by annotations that appear on the
- * implementation class, � has no observer methods, producer methods or
- * fields or disposal methods, � has the same interceptors as a Web Bean
- * defined using annotations�that is, it has all the interceptor binding
- * types declared by annotations that appear on the implementation class, and
- * � has no decorators.
+ * Additionally, for each such simple bean, a second simple bean exists
+ * which:
+ *
+ * • has the same bean class,
+ *
+ * • has the same bean constructor, initializer methods and injected fields
+ * defined by annotations, and
+ *
+ * • has the same interceptor bindings defined by annotations.
+ *
+ * However, this second bean:
+ *
+ * • has scope @Dependent,
+ *
+ * • has deployment type @Standard,
+ *
+ * • has @javax.inject.New as the only binding,
+ *
+ * • has no bean name,
+ *
+ * • has no stereotypes, and
+ *
+ * • has no observer methods, producer methods or fields or disposal methods.
*/
- @Test(groups = { "new" , "broken"})
+ @Test(groups = { "new", "broken" })
@SpecAssertion(section = "3.2.5", id = "unknown")
public void testNewBeanHasNoDecorators()
{
@@ -232,8 +410,9 @@
* of the field or parameter is a concrete Java type which satisfies the
* requirements of a simple Web Bean implementation class or enterprise Web
* Bean implementation class.
+ * TODO This is not defined behavior in the spec in section 3.2.5
*/
- @Test(groups = { "new" })
+ @Test(groups = { "new", "underInvestigation" })
@SpecAssertion(section = "3.2.5", id = "unknown")
public void testNewAnnotationMayBeAppliedToField()
{
@@ -248,6 +427,7 @@
* of the field or parameter is a concrete Java type which satisfies the
* requirements of a simple Web Bean implementation class or enterprise Web
* Bean implementation class.
+ * TODO This is not defined behavior in the spec in section 3.2.5
*/
@Test(groups = { "new" })
@SpecAssertion(section = "3.2.5", id = "unknown")
@@ -264,8 +444,9 @@
* of the field or parameter is a concrete Java type which satisfies the
* requirements of a simple Web Bean implementation class or enterprise Web
* Bean implementation class.
+ * TODO This is not defined behavior in the spec in section 3.2.5
*/
- @Test(groups = { "new" })
+ @Test(groups = { "new", "underInvestigation" })
@SpecAssertion(section = "3.2.5", id = "unknown")
public void testNewAnnotationMayBeAppliedToInitializerMethodParameter()
{
@@ -280,6 +461,7 @@
* of the field or parameter is a concrete Java type which satisfies the
* requirements of a simple Web Bean implementation class or enterprise Web
* Bean implementation class.
+ * TODO This is not defined behavior in the spec in section 3.2.5
*/
@Test(groups = { "new" })
@SpecAssertion(section = "3.2.5", id = "unknown")
@@ -295,9 +477,10 @@
* satisfy the definition of a simple Web Bean implementation class or
* enterprise Web Bean implementation class, a DefinitionException is thrown
* by the container at deployment time.
+ * TODO This is not defined behavior in the spec in section 3.2.5
*/
@Test(groups = { "new" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.2.5", id = "unknown")
+ @SpecAssertion(section = "unknown", id = "unknown")
public void testNewAnnotationCannotAppearInConjunctionWithOtherBindingType()
{
deployBeans(NewAndOtherBindingType_Broken.class);
@@ -309,8 +492,9 @@
* satisfy the definition of a simple Web Bean implementation class or
* enterprise Web Bean implementation class, a DefinitionException is thrown
* by the container at deployment time.
+ * TODO This is not defined behavior in the spec in section 3.2.5
*/
- @Test(groups = { "stub", "new" }, expectedExceptions = DefinitionException.class)
+ @Test(groups = { "underInvestigation", "new" }, expectedExceptions = DefinitionException.class)
@SpecAssertion(section = "3.2.5", id = "unknown")
public void testNewAnnotationCannotBeAppliedToNonWebBeanImplementationClass()
{
@@ -321,34 +505,39 @@
* No Web Bean defined using annotations or XML may explicitly declare @New
* as a binding type
*/
- @Test(groups = { "stub", "new" }, expectedExceptions = DefinitionException.class)
+ @Test(groups = { "new" })
@SpecAssertion(section = "3.2.5", id = "unknown")
public void testNewAnnotationCannotBeExplicitlyDeclared()
{
- assert false;
+ // All we can really do is make sure the annotation itself
+ // prevents the compiler from violating the assertion
+ Target target = New.class.getAnnotation(Target.class);
+ for (ElementType elementType : target.value())
+ {
+ assert !elementType.equals(ElementType.TYPE);
+ }
}
-
- @Test
- @SpecAssertion(section="3.2.5", id = "unknown")
+
+ @Test
+ @SpecAssertion(section = "3.2.5", id = "unknown")
public void testForEachSimpleBeanANewBeanExists()
{
deployBeans(Order.class, Lion.class);
assert manager.resolveByType(Order.class).size() == 1;
assert manager.resolveByType(Order.class).iterator().next().getBindings().size() == 1;
assert manager.resolveByType(Order.class).iterator().next().getBindings().iterator().next().annotationType().equals(Current.class);
-
+
assert manager.resolveByType(Order.class, new NewLiteral()).size() == 1;
assert manager.resolveByType(Order.class, new NewLiteral()).iterator().next().getBindings().size() == 1;
assert manager.resolveByType(Order.class, new NewLiteral()).iterator().next().getBindings().iterator().next().annotationType().equals(New.class);
-
+
assert manager.resolveByType(Lion.class, TAME_LITERAL).size() == 1;
assert manager.resolveByType(Lion.class, TAME_LITERAL).iterator().next().getBindings().size() == 1;
assert manager.resolveByType(Lion.class, TAME_LITERAL).iterator().next().getBindings().iterator().next().annotationType().equals(Tame.class);
-
+
assert manager.resolveByType(Lion.class, new NewLiteral()).size() == 1;
assert manager.resolveByType(Lion.class, new NewLiteral()).iterator().next().getBindings().size() == 1;
assert manager.resolveByType(Lion.class, new NewLiteral()).iterator().next().getBindings().iterator().next().annotationType().equals(New.class);
}
-
-
+
}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/ObservingConstructor_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/ObservingConstructor_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/ObservingConstructor_Broken.java 2009-02-12 18:46:02 UTC (rev 1498)
@@ -0,0 +1,12 @@
+package org.jboss.jsr299.tck.unit.implementation.simple;
+
+import javax.event.Observes;
+
+public class ObservingConstructor_Broken
+{
+
+ public ObservingConstructor_Broken(@Observes String stringEvent)
+ {
+
+ }
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/ObservingConstructor_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/SimpleBeanDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/SimpleBeanDefinitionTest.java 2009-02-12 15:18:25 UTC (rev 1497)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/SimpleBeanDefinitionTest.java 2009-02-12 18:46:02 UTC (rev 1498)
@@ -16,11 +16,11 @@
/**
*
* Spec version: PRD2
- *
+ *
*/
public class SimpleBeanDefinitionTest extends AbstractTest
-{
-
+{
+
@Override
protected List<Class<? extends Annotation>> getEnabledDeploymentTypes()
{
@@ -28,51 +28,51 @@
deploymentTypes.add(AnotherDeploymentType.class);
return deploymentTypes;
}
-
- //*** BEAN CLASS CHECKS ****//
-
- @Test(expectedExceptions=DefinitionException.class)
- @SpecAssertion(section="3.2", id = "unknown")
+
+ // *** BEAN CLASS CHECKS ****//
+
+ @Test(expectedExceptions = DefinitionException.class)
+ @SpecAssertion(section = "3.2", id = "unknown")
public void testAbstractClassDeclaredInJavaIsNotAllowed()
{
createSimpleBean(Cow_Broken.class);
}
-
- @Test(groups="innerClass")
- @SpecAssertion(section="3.2", id = "unknown")
+
+ @Test(groups = "innerClass")
+ @SpecAssertion(section = "3.2", id = "unknown")
public void testStaticInnerClassDeclaredInJavaAllowed()
{
createSimpleBean(StaticInnerBean_Broken.class);
}
-
- @Test(expectedExceptions=DefinitionException.class, groups="innerClass")
- @SpecAssertion(section="3.2", id = "unknown")
+
+ @Test(expectedExceptions = DefinitionException.class, groups = "innerClass")
+ @SpecAssertion(section = "3.2", id = "unknown")
public void testNonStaticInnerClassDeclaredInJavaNotAllowed()
{
createSimpleBean(InnerBean_Broken.class);
}
-
+
@SuppressWarnings("unchecked")
- @Test(expectedExceptions=DefinitionException.class)
- @SpecAssertion(section="3.2", id = "unknown")
+ @Test(expectedExceptions = DefinitionException.class)
+ @SpecAssertion(section = "3.2", id = "unknown")
public void testParameterizedClassDeclaredInJavaIsNotAllowed()
{
createSimpleBean(ParameterizedBean_Broken.class);
}
-
- @Test(expectedExceptions=DefinitionException.class, groups={"stub", "interceptors", "decorators"})
- @SpecAssertion(section="3.2", id = "unknown")
+
+ @Test(expectedExceptions = DefinitionException.class, groups = { "stub", "interceptors", "decorators" })
+ @SpecAssertion(section = "3.2", id = "unknown")
public void testClassCannotBeInterceptorAndDecorator()
{
-
+
}
-
- @Test(groups="stub")
- public void testEntitiesNotDiscoveredAsSimpleBeans()
- {
- assert false;
- }
-
+
+ // @Test(groups="stub")
+ // public void testEntitiesNotDiscoveredAsSimpleBeans()
+ // {
+ // assert false;
+ // }
+
@Test
public void testClassesImplementingServletInterfacesNotDiscoveredAsSimpleBeans()
{
@@ -83,91 +83,92 @@
assert manager.resolveByType(MockServletContextListener.class).size() == 0;
assert manager.resolveByType(MockServletRequestListener.class).size() == 0;
}
-
+
@Test
public void testClassesImplementingEnterpriseBeanInterfaceNotDiscoveredAsSimpleBean()
{
deployBeans(MockEnterpriseBean.class);
assert manager.resolveByType(MockEnterpriseBean.class).size() == 0;
}
-
+
@Test
public void testClassExtendingUiComponentNotDiscoveredAsSimpleBean()
{
deployBeans(MockUIComponent.class);
assert manager.resolveByType(MockUIComponent.class).size() == 0;
}
-
- @Test(groups="stub")
- public void testEjbsNotDiscoveredAsSimpleBean()
- {
- assert false;
- }
-
- @Test(groups={"stub", "producerMethod", "webbeansxml"})
- @SpecAssertion(section="3.2.4", id = "unknown")
+
+ // @Test(groups="stub")
+ // public void testEjbsNotDiscoveredAsSimpleBean()
+ // {
+ // assert false;
+ // }
+ //
+ @Test(groups = { "stub", "producerMethod", "webbeansxml" })
+ @SpecAssertion(section = "3.2.4", id = "unknown")
public void testBeanDeclaredInXmlIgnoresProducerMethodDeclaredInJava()
{
assert false;
}
-
- @Test(groups={"stub", "disposalMethod", "webbeansxml"})
- @SpecAssertion(section="3.2.4", id = "unknown")
+
+ @Test(groups = { "stub", "disposalMethod", "webbeansxml" })
+ @SpecAssertion(section = "3.2.4", id = "unknown")
public void testBeanDeclaredInXmlIgnoresDisposalMethodDeclaredInJava()
{
assert false;
}
-
- @Test(groups={"stub", "observerMethod", "webbeansxml"})
- @SpecAssertion(section="3.2.4", id = "unknown")
+
+ @Test(groups = { "stub", "observerMethod", "webbeansxml" })
+ @SpecAssertion(section = "3.2.4", id = "unknown")
public void testBeanDeclaredInXmlIgnoresObserverMethodDeclaredInJava()
{
assert false;
}
-
- @Test(expectedExceptions=DefinitionException.class, groups={"stub", "webbeansxml"})
- @SpecAssertion(section="3.2.4", id = "unknown")
+
+ @Test(expectedExceptions = DefinitionException.class, groups = { "stub", "webbeansxml" })
+ @SpecAssertion(section = "3.2.4", id = "unknown")
public void testAbstractClassDeclaredInXmlIsNotAllowed()
{
-
+
}
-
- @Test(groups={"stub", "innerClass", "webbeansxml"})
- @SpecAssertion(section="3.2.4", id = "unknown")
+
+ @Test(groups = { "stub", "innerClass", "webbeansxml" })
+ @SpecAssertion(section = "3.2.4", id = "unknown")
public void testStaticInnerClassDeclaredInXmlAllowed()
{
assert false;
}
-
- @Test(expectedExceptions=DefinitionException.class, groups={"stub", "innerClass", "webbeansxml"})
- @SpecAssertion(section="3.2.4", id = "unknown")
+
+ @Test(expectedExceptions = DefinitionException.class, groups = { "stub", "innerClass", "webbeansxml" })
+ @SpecAssertion(section = "3.2.4", id = "unknown")
public void testNonStaticInnerClassDeclaredInXmlNotAllowed()
{
assert false;
}
-
- @Test(expectedExceptions=DefinitionException.class, groups={"stub", "webbeansxml"})
- @SpecAssertion(section="3.2.4", id = "unknown")
+
+ @Test(expectedExceptions = DefinitionException.class, groups = { "stub", "webbeansxml" })
+ @SpecAssertion(section = "3.2.4", id = "unknown")
public void testParameterizedClassDeclaredInXmlIsNotAllowed()
{
assert false;
}
-
- @Test(expectedExceptions=DefinitionException.class, groups={"stub", "interceptors"})
- @SpecAssertion(section="3.2.4", id = "unknown")
+
+ @Test(expectedExceptions = DefinitionException.class, groups = { "stub", "interceptors", "webbeansxml" })
+ @SpecAssertion(section = "3.2.4", id = "unknown")
public void testClassHasInterceptorInJavaMustHaveInterceptorInXml()
{
assert false;
}
-
- @Test(expectedExceptions=DefinitionException.class, groups={"stub", "interceptors"})
- @SpecAssertion(section="3.2.4", id = "unknown")
+
+ @Test(expectedExceptions = DefinitionException.class, groups = { "stub", "interceptors", "webbeansxml" })
+ @SpecAssertion(section = "3.2.4", id = "unknown")
public void testClassHasDecoratorInJavaMustHaveDecoratorInXml()
{
assert false;
}
-
- @Test @SpecAssertion(section="3.2.5.1", id = "unknown")
+
+ @Test
+ @SpecAssertion(section = "3.2.5.1", id = "unknown")
public void testInitializerAnnotatedConstructor() throws Exception
{
deployBeans(Sheep.class);
@@ -178,30 +179,30 @@
{
manager.getInstanceByType(Sheep.class);
assert Sheep.constructedCorrectly;
-
+
}
}.run();
-
+
}
-
- @Test
- @SpecAssertion(section="3.2.5.1", id = "unknown")
+
+ @Test
+ @SpecAssertion(section = "3.2.5.1", id = "unknown")
public void testImplicitConstructorUsed()
{
Bean<Order> order = createSimpleBean(Order.class);
// TODO Test this properly!
}
-
- @Test
- @SpecAssertion(section="3.2.6.1", id = "unknown")
+
+ @Test
+ @SpecAssertion(section = "3.2.6.1", id = "unknown")
public void testEmptyConstructorUsed()
{
createSimpleBean(Donkey.class).create(new MockCreationalContext<Donkey>());
assert Donkey.constructedCorrectly;
}
-
- @Test
- @SpecAssertion(section="3.2.6.1", id = "unknown")
+
+ @Test
+ @SpecAssertion(section = "3.2.6.1", id = "unknown")
public void testInitializerAnnotatedConstructorUsedOverEmptyConstuctor() throws Exception
{
deployBeans(Turkey.class);
@@ -215,58 +216,68 @@
}
}.run();
}
-
- @Test(expectedExceptions=DefinitionException.class)
- @SpecAssertion(section="3.2.6.1", id = "unknown")
+
+ @Test(expectedExceptions = DefinitionException.class)
+ @SpecAssertion(section = "3.2.6.1", id = "unknown")
public void testTooManyInitializerAnnotatedConstructor()
{
createSimpleBean(Goose_Broken.class);
}
-
- @Test(expectedExceptions=DefinitionException.class, groups={"stub", "disposalMethod"})
- @SpecAssertion(section="3.2.6.1", id = "unknown")
- public void testConstructorHasDisposesParameter()
+
+ @Test(expectedExceptions = DefinitionException.class, groups = { "broken", "disposalMethod" })
+ @SpecAssertion(section = "3.2.6.1", id = "unknown")
+ public void testConstructorHasDisposesParameter() throws Exception
{
- assert false;
+ deployBeans(DisposingConstructor_Broken.class, Duck.class);
+ new RunInDependentContext()
+ {
+
+ @Override
+ protected void execute() throws Exception
+ {
+ manager.getInstanceByType(DisposingConstructor_Broken.class);
+ }
+
+ }.run();
}
-
- @Test(expectedExceptions=DefinitionException.class, groups={"stub", "observerMethod"})
- @SpecAssertion(section="3.2.6.1", id = "unknown")
+
+ @Test(expectedExceptions = DefinitionException.class, groups = { "broken", "observerMethod" })
+ @SpecAssertion(section = "3.2.6.1", id = "unknown")
public void testConstructorHasObservesParameter()
{
- assert false;
+ deployBeans(ObservingConstructor_Broken.class);
}
-
- @Test(groups={"stub", "webbeansxml"})
- @SpecAssertion(section="3.2.6.2", id = "unknown")
+
+ @Test(groups = { "stub", "webbeansxml" })
+ @SpecAssertion(section = "3.2.6.2", id = "unknown")
public void testImplicitConstructorDeclaredInXmlUsed()
{
assert false;
}
-
- @Test(groups={"stub", "webbeansxml"})
- @SpecAssertion(section="3.2.6.2", id = "unknown")
+
+ @Test(groups = { "stub", "webbeansxml" })
+ @SpecAssertion(section = "3.2.6.2", id = "unknown")
public void testEmptyConstructorDeclaredInXmlUsed()
{
assert false;
}
-
- @Test(expectedExceptions=DefinitionException.class, groups={"stub", "webbeansxml"})
- @SpecAssertion(section="3.2.6.2", id = "unknown")
+
+ @Test(expectedExceptions = DefinitionException.class, groups = { "stub", "webbeansxml" })
+ @SpecAssertion(section = "3.2.6.2", id = "unknown")
public void testConstructorDeclaredInXmlDoesNotExist()
{
assert false;
}
-
- @Test(groups={"stub", "webbeansxml"})
- @SpecAssertion(section="3.2.6.2", id = "unknown")
+
+ @Test(groups = { "stub", "webbeansxml" })
+ @SpecAssertion(section = "3.2.6.2", id = "unknown")
public void testConstructorDeclaredInXmlIgnoresBindingTypesDeclaredInJava()
{
assert false;
}
-
- @Test
- @SpecAssertion(section="3.2.6.3", id = "unknown")
+
+ @Test
+ @SpecAssertion(section = "3.2.6.3", id = "unknown")
public void testBindingTypeAnnotatedConstructor() throws Exception
{
deployBeans(Duck.class);
@@ -280,30 +291,30 @@
}
}.run();
}
-
- @Test
- @SpecAssertion(section="3.2", id = "unknown")
+
+ @Test
+ @SpecAssertion(section = "3.2", id = "unknown")
public void testDependentScopedBeanCanHavePublicField() throws Exception
{
deployBeans(Tiger.class);
new RunInDependentContext()
{
-
+
@Override
protected void execute() throws Exception
{
assert manager.getInstanceByType(Tiger.class).name.equals("pete");
}
-
+
}.run();
-
+
}
-
- @Test(expectedExceptions=DefinitionException.class)
- @SpecAssertion(section="3.2", id = "unknown")
+
+ @Test(expectedExceptions = DefinitionException.class)
+ @SpecAssertion(section = "3.2", id = "unknown")
public void testNonDependentScopedBeanCanNotHavePublicField()
{
deployBeans(Leopard_Broken.class);
}
-
+
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/SimpleBeanLifecycleTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/SimpleBeanLifecycleTest.java 2009-02-12 15:18:25 UTC (rev 1497)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/SimpleBeanLifecycleTest.java 2009-02-12 18:46:02 UTC (rev 1498)
@@ -3,6 +3,7 @@
import java.lang.annotation.Annotation;
import java.util.List;
+import javax.inject.AnnotationLiteral;
import javax.inject.CreationException;
import javax.inject.manager.Bean;
@@ -14,11 +15,14 @@
/**
*
* Spec version: PRD2
- *
+ *
*/
public class SimpleBeanLifecycleTest extends AbstractTest
{
-
+ private static final Annotation TAME_LITERAL = new AnnotationLiteral<Tame>()
+ {
+ };
+
@Override
protected List<Class<? extends Annotation>> getEnabledDeploymentTypes()
{
@@ -26,72 +30,150 @@
deploymentTypes.add(AnotherDeploymentType.class);
return deploymentTypes;
}
-
- @Test(groups="beanConstruction")
- @SpecAssertion(section="3.2.5.3", id = "unknown")
- public void testInjectionOfParametersIntoBeanConstructor()
- {
- Bean<FishPond> goldfishPondBean = createSimpleBean(FishPond.class);
- Bean<Goldfish> goldfishBean = createSimpleBean(Goldfish.class);
- manager.addBean(goldfishBean);
- manager.addBean(goldfishPondBean);
- FishPond fishPond = goldfishPondBean.create(new MockCreationalContext<FishPond>());
- assert fishPond.goldfish != null;
- }
-
- @Test(groups={"stub", "specialization"})
- @SpecAssertion(section="3.2.6", id = "unknown")
- public void testSpecializedBeanAlwaysUsed()
+
+ @Test(groups = "beanConstruction")
+ @SpecAssertion(section = "3.2.6.3", id = "unknown")
+ public void testInjectionOfParametersIntoBeanConstructor()
{
- // TODO Placeholder
- assert false;
+ Bean<FishPond> goldfishPondBean = createSimpleBean(FishPond.class);
+ Bean<Goldfish> goldfishBean = createSimpleBean(Goldfish.class);
+ manager.addBean(goldfishBean);
+ manager.addBean(goldfishPondBean);
+ FishPond fishPond = goldfishPondBean.create(new MockCreationalContext<FishPond>());
+ assert fishPond.goldfish != null;
}
-
- @Test(groups="beanLifecycle")
- @SpecAssertion(section="5.3", id = "unknown")
+
+ @Test(groups = { "broken", "specialization" })
+ @SpecAssertion(section = "3.2.7", id = "unknown")
+ public void testSpecializedBeanAlwaysUsed() throws Exception
+ {
+ deployBeans(Lion.class, MountainLion.class);
+ new RunInDependentContext()
+ {
+
+ @Override
+ protected void execute() throws Exception
+ {
+ assert manager.getInstanceByType(Lion.class, TAME_LITERAL) instanceof MountainLion;
+ }
+
+ }.run();
+ }
+
+ /**
+ * The create() method performs the following tasks:
+ *
+ * • obtains an instance of the bean,
+ *
+ * • creates the interceptor and decorator stacks and binds them to the
+ * instance,
+ *
+ * • injects any dependencies,
+ *
+ * • sets any initial field values defined in XML, and
+ *
+ * • calls the @PostConstruct method, if necessary.
+ */
+ @Test(groups = "beanLifecycle")
+ @SpecAssertion(section = "6.2", id = "unknown")
public void testCreateReturnsInstanceOfBean()
{
Bean<RedSnapper> bean = createSimpleBean(RedSnapper.class);
assert bean.create(new MockCreationalContext<RedSnapper>()) instanceof RedSnapper;
}
-
- @Test(groups={"stub", "beanLifecycle", "interceptors"})
- @SpecAssertion(section="6.3", id = "unknown")
+
+ /**
+ * The create() method performs the following tasks:
+ *
+ * • creates the interceptor and decorator stacks and binds them to the
+ * instance,
+ */
+ @Test(groups = { "stub", "beanLifecycle", "interceptors" })
+ @SpecAssertion(section = "6.2", id = "unknown")
public void testCreateBindsInterceptorStack()
{
assert false;
}
-
- @Test(groups={"stub", "beanLifecycle", "decorators"})
- @SpecAssertion(section="6.3", id = "unknown")
+
+ /**
+ * The create() method performs the following tasks:
+ *
+ * • creates the interceptor and decorator stacks and binds them to the
+ * instance, JSR-299 Revised Public Review Draft 57 Bean lifecycle
+ */
+ @Test(groups = { "stub", "beanLifecycle", "decorators" })
+ @SpecAssertion(section = "6.2", id = "unknown")
public void testCreateBindsDecoratorStack()
{
assert false;
}
-
- @Test(groups={"stub", "beanLifecycle", "commonAnnotations"})
- @SpecAssertion(section="6.3", id = "unknown")
+
+ /**
+ * Next, the container initializes the values of any attributes annotated
+ *
+ * @EJB, @PersistenceContext or @Resource, as defined in the Common
+ * Annotations for the Java Platform, JPA and EJB specifications.
+ */
+ @Test(groups = { "stub", "beanLifecycle", "commonAnnotations", "integration" })
+ @SpecAssertion(section = "6.4", id = "unknown")
public void testCreateInjectsEjb()
{
assert false;
}
-
- @Test(groups={"stub", "beanLifecycle", "commonAnnotations"})
- @SpecAssertion(section="6.3", id = "unknown")
+
+ /**
+ * Next, the container initializes the values of any attributes annotated
+ *
+ * @EJB, @PersistenceContext or @Resource, as defined in the Common
+ * Annotations for the Java Platform, JPA and EJB specifications.
+ */
+ @Test(groups = { "stub", "beanLifecycle", "commonAnnotations", "integration" })
+ @SpecAssertion(section = "6.4", id = "unknown")
public void testCreateInjectsPersistenceContext()
{
assert false;
}
-
- @Test(groups={"stub", "beanLifecycle", "commonAnnotations"})
- @SpecAssertion(section="6.3", id = "unknown")
+
+ /**
+ * Next, the container initializes the values of any attributes annotated
+ *
+ * @EJB, @PersistenceContext or @Resource, as defined in the Common
+ * Annotations for the Java Platform, JPA and EJB specifications.
+ */
+ @Test(groups = { "stub", "beanLifecycle", "commonAnnotations", "integration" })
+ @SpecAssertion(section = "6.4", id = "unknown")
public void testCreateInjectsResource()
{
assert false;
}
-
- @Test(groups={"beanLifecycle", "lifecycleCallbacks"})
- @SpecAssertion(section="6.3", id = "unknown")
+
+ /**
+ * Next, the container initializes the values of all injected fields. For
+ * each injected field, the container sets the value to the object returned
+ * by Manager.getInstanceToInject().
+ */
+ @Test(groups = "injection")
+ @SpecAssertion(section = "6.4", id = "unknown")
+ public void testCreateInjectsFieldsDeclaredInJava()
+ {
+ Bean<TunaFarm> tunaFarmBean = createSimpleBean(TunaFarm.class);
+ Bean<Tuna> tunaBean = createSimpleBean(Tuna.class);
+ manager.addBean(tunaBean);
+ TunaFarm tunaFarm = tunaFarmBean.create(new MockCreationalContext<TunaFarm>());
+ assert tunaFarm.tuna != null;
+ }
+
+ /**
+ * The create() method performs the following tasks:
+ *
+ * • calls the @PostConstruct method, if necessary.
+ *
+ * The destroy() method performs the following tasks:
+ *
+ * • calls the @PreDestroy method, if necessary, and
+ */
+ @Test(groups = { "beanLifecycle", "lifecycleCallbacks" })
+ @SpecAssertion(section = "6.3", id = "unknown")
public void testPostConstructPreDestroy() throws Exception
{
Bean<FarmOffice> farmOfficeBean = createSimpleBean(FarmOffice.class);
@@ -99,14 +181,23 @@
manager.addBean(farmOfficeBean);
manager.addBean(farmBean);
Farm farm = farmBean.create(new MockCreationalContext<Farm>());
- assert farm.founded!=null;
- assert farm.initialStaff==20;
- assert farm.closed==null;
+ assert farm.founded != null;
+ assert farm.initialStaff == 20;
+ assert farm.closed == null;
farmBean.destroy(farm);
- assert farm.closed!=null;
+ assert farm.closed != null;
}
-
- @Test @SpecAssertion(section="4.2", id = "unknown")
+
+ /**
+ * If X declares an initializer method, @PostConstruct method or @PreDestroy
+ * method x() then Y inherits x() if and only if neither Y nor any
+ * intermediate class that is a subclass of X and a superclass of Y overrides
+ * the method x().
+ *
+ * @throws Exception
+ */
+ @Test
+ @SpecAssertion(section = "4.2", id = "unknown")
public void testSubClassInheritsPostConstructOnSuperclass() throws Exception
{
OrderProcessor.postConstructCalled = false;
@@ -121,8 +212,17 @@
}.run();
assert OrderProcessor.postConstructCalled;
}
-
- @Test @SpecAssertion(section="4.2", id = "unknown")
+
+ /**
+ * If X declares an initializer method, @PostConstruct method or @PreDestroy
+ * method x() then Y inherits x() if and only if neither Y nor any
+ * intermediate class that is a subclass of X and a superclass of Y overrides
+ * the method x().
+ *
+ * @throws Exception
+ */
+ @Test
+ @SpecAssertion(section = "4.2", id = "unknown")
public void testSubClassInheritsPreDestroyOnSuperclass() throws Exception
{
OrderProcessor.preDestroyCalled = false;
@@ -138,11 +238,20 @@
}.run();
assert OrderProcessor.preDestroyCalled;
}
-
- @Test @SpecAssertion(section="4.2", id = "unknown")
+
+ /**
+ * If X declares an initializer method, @PostConstruct method or @PreDestroy
+ * method x() then Y inherits x() if and only if neither Y nor any
+ * intermediate class that is a subclass of X and a superclass of Y overrides
+ * the method x().
+ *
+ * @throws Exception
+ */
+ @Test
+ @SpecAssertion(section = "4.2", id = "unknown")
public void testSubClassDoesNotInheritPostConstructOnSuperclassBlockedByIntermediateClass() throws Exception
{
-
+
OrderProcessor.postConstructCalled = false;
new RunInDependentContext()
{
@@ -155,8 +264,17 @@
}.run();
assert !OrderProcessor.postConstructCalled;
}
-
- @Test @SpecAssertion(section="4.2", id = "unknown")
+
+ /**
+ * If X declares an initializer method, @PostConstruct method or @PreDestroy
+ * method x() then Y inherits x() if and only if neither Y nor any
+ * intermediate class that is a subclass of X and a superclass of Y overrides
+ * the method x().
+ *
+ * @throws Exception
+ */
+ @Test
+ @SpecAssertion(section = "4.2", id = "unknown")
public void testSubClassDoesNotInheritPreDestroyConstructOnSuperclassBlockedByIntermediateClass() throws Exception
{
OrderProcessor.preDestroyCalled = false;
@@ -173,19 +291,8 @@
assert !OrderProcessor.preDestroyCalled;
}
-
- @Test(groups="injection")
- @SpecAssertion(section="6.3", id = "unknown")
- public void testCreateInjectsFieldsDeclaredInJava()
- {
- Bean<TunaFarm> tunaFarmBean = createSimpleBean(TunaFarm.class);
- Bean<Tuna> tunaBean = createSimpleBean(Tuna.class);
- manager.addBean(tunaBean);
- TunaFarm tunaFarm = tunaFarmBean.create(new MockCreationalContext<TunaFarm>());
- assert tunaFarm.tuna != null;
- }
-
- @Test(groups="injection")
+
+ @Test(groups = "injection")
public void testFieldMissingBindingAnnotationsAreNotInjected()
{
Bean<TunaFarm> tunaFarmBean = createSimpleBean(TunaFarm.class);
@@ -194,35 +301,35 @@
TunaFarm tunaFarm = tunaFarmBean.create(new MockCreationalContext<TunaFarm>());
assert tunaFarm.notInjectedTuna != manager.getInstance(tunaBean);
}
-
- @Test(expectedExceptions=CreationException.class)
+
+ @Test(expectedExceptions = CreationException.class)
public void testCreationExceptionWrapsCheckedExceptionThrownFromCreate() throws Exception
{
deployBeans(Lorry_Broken.class);
new RunInDependentContext()
{
-
- protected void execute() throws Exception
+
+ protected void execute() throws Exception
{
manager.getInstanceByType(Lorry_Broken.class);
}
-
+
}.run();
}
-
- @Test(expectedExceptions=FooException.class)
+
+ @Test(expectedExceptions = FooException.class)
public void testUncheckedExceptionThrownFromCreateNotWrapped() throws Exception
{
deployBeans(Van_Broken.class);
new RunInDependentContext()
{
-
- protected void execute() throws Exception
+
+ protected void execute() throws Exception
{
manager.getInstanceByType(Van_Broken.class);
}
-
+
}.run();
}
-
+
}
Modified: tck/trunk/impl/tck-audit.xml
===================================================================
--- tck/trunk/impl/tck-audit.xml 2009-02-12 15:18:25 UTC (rev 1497)
+++ tck/trunk/impl/tck-audit.xml 2009-02-12 18:46:02 UTC (rev 1498)
@@ -925,6 +925,10 @@
<assertion id="c">
<text>If the disposed parameter does not resolve to any producer method according to the typesafe resolution algorithm, an UnsatisfiedDependencyException is thrown by the container at deployment time</text>
</assertion>
+
+ <assertion id="d">
+ <text>If a disposed parameter resolves to a producer method according to the typesafe resolution algorithm, the container must call this method when destroying an instance returned by that producer method</text>
+ </assertion>
</section>
<section id="3.4.8" title="Declaring a disposal method using annotations">
@@ -938,10 +942,18 @@
</assertion>
<assertion id="c">
- <text>If a disposal method is annotated @Produces, or @Initializer or has a parameter annotated @Observes, a DefinitionException is thrown by the container at deployment time</text>
+ <text>If a disposal method is annotated @Produces, a DefinitionException is thrown by the container at deployment time</text>
</assertion>
<assertion id="d">
+ <text>If a disposal method is annotated @Initializer, a DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>If a disposal 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 has a parameter annotated @Disposes, and the method is not a business method of the EJB, a DefinitionException is thrown by the container at deployment time</text>
</assertion>
</section>
More information about the weld-commits
mailing list