openwebbeans-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harald Wellmann <hwellmann...@gmail.com>
Subject Interceptor enablement per bean archive
Date Sun, 09 Dec 2012 19:11:15 GMT
Scenario:

There are two bean archives sample.jar and test.jar.
sample.jar contains an interceptor, an interceptor binding annotation 
and some beans with methods annotated by this annotation.

test.jar has some test classes verifying that the annotated methods do 
get intercepted.

The tests pass when the interceptor is enabled in 
sample/META-INF/beans.xml and fail as expected when not enabled.

Problem:

The tests also pass when the interceptor is enabled in 
tests/META-INF/beans.xml but not in sample/META-INF/beans.xml.

According to section 9.4. of the CDI 1.0 spec, I would have expected an 
interceptors definition in tests.jar to have no effect at all on beans 
in some other bean archive (sample.jar).

I'm testing in a plain old Java SE environment. Same problem with OWB 
1.1.6 and Weld 1.1.9.

I read the discussion in https://issues.jboss.org/browse/CDI-18 which 
seems to be related, but it sounds rather open-ended to me.

My questions:

1) Is it true that my tests SHOULD fail by CDI 1.0 if the interceptor is 
enabled in the wrong archive?

2) What is the implemented (or intended) behaviour in OWB, for Java SE 
and Java EE applications?

Best regards,
Harald



Mime
View raw message