Hello,
Ok I agree. I created
https://issues.jboss.org/browse/CDITCK-477
T.
----- Original Message -----
From: "Jozef Hartinger" <jharting(a)redhat.com>
To: "Emily Jiang" <emijiang6(a)googlemail.com>, weld-dev(a)lists.jboss.org,
cdi-tck(a)lists.jboss.org
Sent: Thursday, May 7, 2015 4:51:43 PM
Subject: Re: [cdi-tck] [weld-dev] Validation on Alternative/Interceptor/Decorator
mentioned in beans.xml
Hi Emily,
I see what you are saying. I agree that the test would be better if tested a more
realistic scenario where a bean archive contains some classes. Unless there are objections
e.g. from the TCK lead I do not see a problem improving the test this way.
Jozef
On 05/07/2015 01:57 PM, Emily Jiang wrote:
Thank you Jozef or your reply. have brought this discussion in the cdi dev as I think the
spec is contradicting itself. Anyway, this question is related to one tck test
org.jboss.cdi.tck.tests.alternative.broken.incorrect.name.NoClassWithSpecifiedNameTest
org.jboss.cdi.tck.tests.alternative.broken.incorrect.name.stereotype.NoAnnotationWithSpecifiedNameTest
This tck is to test a scenario where no classes in the web-inf\classes but one beans.xml.
In this beans.xml, an invalid class was specified in the alternative list. The test is
expecting a deployment. In my interpretation, I won't create any archive for it as
there is no classes. What is the value to create one with beans.xml but nothing else (by
the way, no other accessible bean archives either). What is the value of this test? I
think the test should be modified to include a class. Thoughts?
On Mon, May 4, 2015 at 7:30 AM, Jozef Hartinger < jharting(a)redhat.com > wrote:
Hi Emily,
jar1 and jar2 would be bean archives on their own. If such archive declares beans.xml then
that one is used. Otherwise, the bean archive may be implicit (no beans.xml but
bean-defining annotation). Either way, no other beans.xml file is used instead for that
particular jar.
HTH,
Jozef
On 04/30/2015 11:34 PM, Emily Jiang wrote:
Thanks Jozef! I figured out why I did not get an error:
my war:
web-inf\beans.xml (containing invalid class as alternatives)
web-inf\lib\jar1.jar
web-inf\lib\jar2.jar
[no web-inf\classes]
In either jar1.jar or jar2.jar, there is no beans.xml and no bean-defining annotations. Do
you think the jar1.jar and jar2.jar should use the beans.xml in the web-inf? If yes, what
if there is beans.xml packaged in either jar1.jar or jar2.jar? I cannot find any clear
instruction on this scenario.
Thanks,
Emily
On Thu, Apr 30, 2015 at 6:24 AM, Jozef Hartinger < jharting(a)redhat.com > wrote:
Hi Emily,
Weld performs all these validations.
Jozef
On 04/29/2015 11:52 PM, Emily Jiang wrote:
CDI1.2 spec section 8.2.2 says:
In the beans.xml
Each child <class> element must specify the name of a decorator bean class. If there
is no class with the specified name, or if the class with the specified name is not a
decorator bean class, the container automatically detects the problem and treats it as a
deployment problem.
If the same class is listed twice under the <decorators> element, the container
automatically detects the problem and treats it as a deployment problem.
Will Weld do the validation or Weld expects the integrator to do the validation?
I am confused about what validations are done by the spec reference implemenatation (RI)
or RI consumer.
--
Thanks
Emily
=================
Emily Jiang
ejiang(a)apache.org
_______________________________________________
weld-dev mailing list weld-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/weld-dev
--
Thanks
Emily
=================
Emily Jiang
ejiang(a)apache.org
--
Thanks
Emily
=================
Emily Jiang
ejiang(a)apache.org
_______________________________________________
cdi-tck mailing list
cdi-tck(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/cdi-tck