[weld-commits] Weld SVN: r4104 - in cdi-tck/trunk/impl/src/main: resources/org/jboss/jsr299/tck/tests/interceptors/definition and 1 other directories.

weld-commits at lists.jboss.org weld-commits at lists.jboss.org
Wed Oct 14 22:57:33 EDT 2009


Author: marius.bogoevici
Date: 2009-10-14 22:57:33 -0400 (Wed, 14 Oct 2009)
New Revision: 4104

Added:
   cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/enterprise/Airborne.java
   cdi-tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/interceptors/definition/enterprise/
   cdi-tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/interceptors/definition/enterprise/beans.xml
Modified:
   cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/enterprise/Missile.java
   cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/enterprise/MissileInterceptor.java
   cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/enterprise/SessionBeanInterceptorDefinitionTest.java
Log:
Testing that @InterceptorBinding interceptors are applied on EJBs

Added: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/enterprise/Airborne.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/enterprise/Airborne.java	                        (rev 0)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/enterprise/Airborne.java	2009-10-15 02:57:33 UTC (rev 4104)
@@ -0,0 +1,19 @@
+package org.jboss.jsr299.tck.tests.interceptors.definition.enterprise;
+
+import java.lang.annotation.Target;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Documented;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.ElementType.METHOD;
+
+import javax.interceptor.InterceptorBinding;
+
+ at Target( { TYPE, METHOD})
+ at Retention(RUNTIME)
+ at Documented
+ at InterceptorBinding
+public @interface Airborne
+{
+
+}
\ No newline at end of file

Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/enterprise/Missile.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/enterprise/Missile.java	2009-10-14 23:46:51 UTC (rev 4103)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/enterprise/Missile.java	2009-10-15 02:57:33 UTC (rev 4104)
@@ -4,7 +4,7 @@
 import javax.interceptor.Interceptors;
 
 @Stateful
- at Interceptors(MissileInterceptor.class)
+ at Airborne
 public class Missile implements MissileLocal
 {
    public void fire() {}

Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/enterprise/MissileInterceptor.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/enterprise/MissileInterceptor.java	2009-10-14 23:46:51 UTC (rev 4103)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/enterprise/MissileInterceptor.java	2009-10-15 02:57:33 UTC (rev 4104)
@@ -4,7 +4,7 @@
 import javax.interceptor.Interceptor;
 import javax.interceptor.InvocationContext;
 
- at Interceptor
+ at Interceptor @Airborne
 class MissileInterceptor
 {
    public static boolean intercepted = false;

Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/enterprise/SessionBeanInterceptorDefinitionTest.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/enterprise/SessionBeanInterceptorDefinitionTest.java	2009-10-14 23:46:51 UTC (rev 4103)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/enterprise/SessionBeanInterceptorDefinitionTest.java	2009-10-15 02:57:33 UTC (rev 4104)
@@ -7,6 +7,8 @@
 import org.jboss.testharness.impl.packaging.IntegrationTest;
 import org.jboss.testharness.impl.packaging.Packaging;
 import org.jboss.testharness.impl.packaging.PackagingType;
+import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
+
 import org.testng.annotations.Test;
 
 
@@ -14,9 +16,10 @@
 @Artifact
 @Packaging(PackagingType.EAR)
 @SpecVersion(spec="cdi", version="PFD2")
+ at BeansXml("beans.xml")
 public class SessionBeanInterceptorDefinitionTest extends AbstractJSR299Test
 {
-   @Test(groups="ri-broken")
+   @Test
    @SpecAssertion(section = "7.2", id = "c")
    public void testSessionBeanIsIntercepted()
    {

Added: cdi-tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/interceptors/definition/enterprise/beans.xml
===================================================================
--- cdi-tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/interceptors/definition/enterprise/beans.xml	                        (rev 0)
+++ cdi-tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/interceptors/definition/enterprise/beans.xml	2009-10-15 02:57:33 UTC (rev 4104)
@@ -0,0 +1,5 @@
+<beans>
+  <interceptors>
+    <class>org.jboss.jsr299.tck.tests.interceptors.definition.enterprise.MissileInterceptor</class>
+  </interceptors>
+</beans>
\ No newline at end of file



More information about the weld-commits mailing list