[jboss-cvs] JBossAS SVN: r81612 - in projects/microcontainer/trunk/aop-mc-int/src/test: java/org/jboss/test/microcontainer/beans/test and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Nov 26 00:48:50 EST 2008


Author: scott.stark at jboss.org
Date: 2008-11-26 00:48:50 -0500 (Wed, 26 Nov 2008)
New Revision: 81612

Added:
   projects/microcontainer/trunk/aop-mc-int/src/test/java/org/jboss/test/microcontainer/beans/iPOJO.java
   projects/microcontainer/trunk/aop-mc-int/src/test/java/org/jboss/test/microcontainer/beans/test/InterceptorSimpleIfaceDeploymentTestCase.java
   projects/microcontainer/trunk/aop-mc-int/src/test/resources/org/jboss/test/microcontainer/beans/test/InterceptorSimpleIfaceDeploymentTestCase.xml
Modified:
   projects/microcontainer/trunk/aop-mc-int/src/test/java/org/jboss/test/microcontainer/beans/POJO.java
Log:
Test intercepting an interface bean

Modified: projects/microcontainer/trunk/aop-mc-int/src/test/java/org/jboss/test/microcontainer/beans/POJO.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/test/java/org/jboss/test/microcontainer/beans/POJO.java	2008-11-26 05:19:53 UTC (rev 81611)
+++ projects/microcontainer/trunk/aop-mc-int/src/test/java/org/jboss/test/microcontainer/beans/POJO.java	2008-11-26 05:48:50 UTC (rev 81612)
@@ -27,6 +27,7 @@
  * @version $Revision: 1.1 $
  */
 public class POJO
+   implements iPOJO
 {
    public int method(int i)
    {

Added: projects/microcontainer/trunk/aop-mc-int/src/test/java/org/jboss/test/microcontainer/beans/iPOJO.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/test/java/org/jboss/test/microcontainer/beans/iPOJO.java	                        (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/test/java/org/jboss/test/microcontainer/beans/iPOJO.java	2008-11-26 05:48:50 UTC (rev 81612)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.microcontainer.beans;
+
+/**
+ * @author Scott.Stark at jboss.org
+ * @version $Revision:$
+ */
+public interface iPOJO
+{
+   public int method(int i);
+   public void method();
+   public void defaultMethod();
+}

Added: projects/microcontainer/trunk/aop-mc-int/src/test/java/org/jboss/test/microcontainer/beans/test/InterceptorSimpleIfaceDeploymentTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/test/java/org/jboss/test/microcontainer/beans/test/InterceptorSimpleIfaceDeploymentTestCase.java	                        (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/test/java/org/jboss/test/microcontainer/beans/test/InterceptorSimpleIfaceDeploymentTestCase.java	2008-11-26 05:48:50 UTC (rev 81612)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors. 
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/ 
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class InterceptorSimpleIfaceDeploymentTestCase extends InterceptorSimpleTest
+{
+
+   public static Test suite()
+   {
+      return suite(InterceptorSimpleIfaceDeploymentTestCase.class);
+   }
+   
+   public InterceptorSimpleIfaceDeploymentTestCase(String name)
+   {
+      super(name);
+   }
+}

Added: projects/microcontainer/trunk/aop-mc-int/src/test/resources/org/jboss/test/microcontainer/beans/test/InterceptorSimpleIfaceDeploymentTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/test/resources/org/jboss/test/microcontainer/beans/test/InterceptorSimpleIfaceDeploymentTestCase.xml	                        (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/test/resources/org/jboss/test/microcontainer/beans/test/InterceptorSimpleIfaceDeploymentTestCase.xml	2008-11-26 05:48:50 UTC (rev 81612)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+   <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+      <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+   </bean>
+
+   <interceptor xmlns="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.TestInterceptor"/>
+   <!-- This works -->
+   <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* $instanceof{org.jboss.test.microcontainer.beans.iPOJO}->*(..))">
+		<interceptor-ref name="org.jboss.test.microcontainer.beans.TestInterceptor"/>
+   </bind>
+   <!-- This does not
+   <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* $instanceof{org.jboss.test.microcontainer.beans.iPOJO}->$implements(org.jboss.test.microcontainer.beans.iPOJO))">
+      <interceptor-ref name="org.jboss.test.microcontainer.beans.TestInterceptor"/>
+   </bind>
+   -->
+
+   <bean name="Bean" class="org.jboss.test.microcontainer.beans.POJO"/>
+   
+</deployment>




More information about the jboss-cvs-commits mailing list