[jboss-cvs] JBossAS SVN: r110186 - in projects/ejb3/tags: jboss-ejb3-interceptors-1.1.3 and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Dec 23 12:51:10 EST 2010
Author: wolfc
Date: 2010-12-23 12:51:10 -0500 (Thu, 23 Dec 2010)
New Revision: 110186
Added:
projects/ejb3/tags/jboss-ejb3-interceptors-1.1.3/
projects/ejb3/tags/jboss-ejb3-interceptors-1.1.3/pom.xml
projects/ejb3/tags/jboss-ejb3-interceptors-1.1.3/src/main/java/org/jboss/ejb3/interceptors/aop/EJB3InterceptorInterceptor.java
Removed:
projects/ejb3/tags/jboss-ejb3-interceptors-1.1.3/pom.xml
projects/ejb3/tags/jboss-ejb3-interceptors-1.1.3/src/main/java/org/jboss/ejb3/interceptors/aop/EJB3InterceptorInterceptor.java
Log:
[maven-release-plugin] copy for tag jboss-ejb3-interceptors-1.1.3
Copied: projects/ejb3/tags/jboss-ejb3-interceptors-1.1.3 (from rev 110183, projects/ejb3/trunk/interceptors)
Deleted: projects/ejb3/tags/jboss-ejb3-interceptors-1.1.3/pom.xml
===================================================================
--- projects/ejb3/trunk/interceptors/pom.xml 2010-12-23 17:14:32 UTC (rev 110183)
+++ projects/ejb3/tags/jboss-ejb3-interceptors-1.1.3/pom.xml 2010-12-23 17:51:10 UTC (rev 110186)
@@ -1,153 +0,0 @@
-<!--
- vi:ts=2:sw=2:expandtab
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
- <groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-build</artifactId>
- <version>1.0.13</version>
- <relativePath>../build/pom.xml</relativePath>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>jboss-ejb3-interceptors</artifactId>
- <version>1.1.3-SNAPSHOT</version>
- <packaging>jar</packaging>
- <name>JBoss EJB 3.0 Interceptors</name>
- <url>http://www.jboss.org</url>
- <description>
- The JBoss EJB 3 Interceptors component implements all functionality
- specified in Chapter 12 (Interceptors) of the EJB 3 specification.
- </description>
-
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>aopc</id>
- <phase>process-test-classes</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <tasks>
- <property name="cp" refid="maven.test.classpath" />
-
- <echo message="aopc in action" />
-
- <!--suppress MavenModelInspection -->
- <taskdef name="aopc" classname="org.jboss.aop.ant.AopC" classpath="${cp}" />
-
- <!--suppress MavenModelInspection -->
- <aopc compilerclasspath="${cp}" verbose="true">
- <aoppath path="${basedir}/src/test/resources/ejbthree1950/jboss-aop.xml" />
- <!--
- <classpath path="${project.build.directory}/tests-classes" />
- <src path="${project.build.directory}/tests-classes" />
- -->
- <classpath path="${project.build.testOutputDirectory}" />
- <src path="${project.build.testOutputDirectory}" />
- <include name="**/*FasadBean.class" />
- </aopc>
- </tasks>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <!-- Because we fiddle with the class loader in BasicTestSuite.
- Note that the other tests also change context class loader, but this is
- to make surefire work at all. -->
- <forkMode>pertest</forkMode>
- <!--
- <argLine>-enableassertions</argLine>
- -->
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <dependencies>
- <!-- Internal -->
- <dependency>
- <groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-metadata</artifactId>
- <version>1.0.0</version>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-common</artifactId>
- <version>1.0.0</version>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.ejb3.context</groupId>
- <artifactId>jboss-ejb3-context-base</artifactId>
- <version>0.3.0</version>
- </dependency>
-
- <!-- External -->
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-reflect</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.aspects</groupId>
- <artifactId>jboss-current-invocation-aspects</artifactId>
- <version>1.0.0.CR1</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.logging</groupId>
- <artifactId>jboss-logging-spi</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.logging</groupId>
- <artifactId>jboss-logging-log4j</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.metadata</groupId>
- <artifactId>jboss-metadata</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.aop</groupId>
- <artifactId>jboss-aop</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.aspects</groupId>
- <artifactId>jboss-aspects-common</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.javaee</groupId>
- <artifactId>jboss-ejb-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.microcontainer</groupId>
- <artifactId>jboss-kernel</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.man</groupId>
- <artifactId>jboss-managed</artifactId>
- <version>2.0.0.CR1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <version>1.8.4</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-</project>
Copied: projects/ejb3/tags/jboss-ejb3-interceptors-1.1.3/pom.xml (from rev 110185, projects/ejb3/trunk/interceptors/pom.xml)
===================================================================
--- projects/ejb3/tags/jboss-ejb3-interceptors-1.1.3/pom.xml (rev 0)
+++ projects/ejb3/tags/jboss-ejb3-interceptors-1.1.3/pom.xml 2010-12-23 17:51:10 UTC (rev 110186)
@@ -0,0 +1,159 @@
+<!--
+ vi:ts=2:sw=2:expandtab
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.jboss.ejb3</groupId>
+ <artifactId>jboss-ejb3-build</artifactId>
+ <version>1.0.13</version>
+ <relativePath>../build/pom.xml</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>jboss-ejb3-interceptors</artifactId>
+ <version>1.1.3</version>
+ <packaging>jar</packaging>
+ <name>JBoss EJB 3.0 Interceptors</name>
+ <url>http://www.jboss.org</url>
+ <description>
+ The JBoss EJB 3 Interceptors component implements all functionality
+ specified in Chapter 12 (Interceptors) of the EJB 3 specification.
+ </description>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>aopc</id>
+ <phase>process-test-classes</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <property name="cp" refid="maven.test.classpath" />
+
+ <echo message="aopc in action" />
+
+ <!--suppress MavenModelInspection -->
+ <taskdef name="aopc" classname="org.jboss.aop.ant.AopC" classpath="${cp}" />
+
+ <!--suppress MavenModelInspection -->
+ <aopc compilerclasspath="${cp}" verbose="true">
+ <aoppath path="${basedir}/src/test/resources/ejbthree1950/jboss-aop.xml" />
+ <!--
+ <classpath path="${project.build.directory}/tests-classes" />
+ <src path="${project.build.directory}/tests-classes" />
+ -->
+ <classpath path="${project.build.testOutputDirectory}" />
+ <src path="${project.build.testOutputDirectory}" />
+ <include name="**/*FasadBean.class" />
+ </aopc>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <!-- Because we fiddle with the class loader in BasicTestSuite.
+ Note that the other tests also change context class loader, but this is
+ to make surefire work at all. -->
+ <forkMode>pertest</forkMode>
+ <!--
+ <argLine>-enableassertions</argLine>
+ -->
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <!-- Internal -->
+ <dependency>
+ <groupId>org.jboss.ejb3</groupId>
+ <artifactId>jboss-ejb3-metadata</artifactId>
+ <version>1.0.0</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.ejb3</groupId>
+ <artifactId>jboss-ejb3-common</artifactId>
+ <version>1.0.0</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.ejb3.context</groupId>
+ <artifactId>jboss-ejb3-context-base</artifactId>
+ <version>0.3.0</version>
+ </dependency>
+
+ <!-- External -->
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-reflect</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.aspects</groupId>
+ <artifactId>jboss-current-invocation-aspects</artifactId>
+ <version>1.0.0.CR1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-spi</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-log4j</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.metadata</groupId>
+ <artifactId>jboss-metadata</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.aop</groupId>
+ <artifactId>jboss-aop</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.aspects</groupId>
+ <artifactId>jboss-aspects-common</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-ejb-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-kernel</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.man</groupId>
+ <artifactId>jboss-managed</artifactId>
+ <version>2.0.0.CR1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-core</artifactId>
+ <version>1.8.4</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/ejb3/tags/jboss-ejb3-interceptors-1.1.3</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/ejb3/tags/jboss-ejb3-interceptors-1.1.3</developerConnection>
+ <url>http://anonsvn.jboss.org/repos/jbossas/projects/ejb3/tags/jboss-ejb3-interceptors-1.1.3</url>
+ </scm>
+</project>
Deleted: projects/ejb3/tags/jboss-ejb3-interceptors-1.1.3/src/main/java/org/jboss/ejb3/interceptors/aop/EJB3InterceptorInterceptor.java
===================================================================
--- projects/ejb3/trunk/interceptors/src/main/java/org/jboss/ejb3/interceptors/aop/EJB3InterceptorInterceptor.java 2010-12-23 17:14:32 UTC (rev 110183)
+++ projects/ejb3/tags/jboss-ejb3-interceptors-1.1.3/src/main/java/org/jboss/ejb3/interceptors/aop/EJB3InterceptorInterceptor.java 2010-12-23 17:51:10 UTC (rev 110186)
@@ -1,95 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, 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.ejb3.interceptors.aop;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.Arrays;
-
-import javax.interceptor.InvocationContext;
-
-import org.jboss.aop.advice.Interceptor;
-import org.jboss.aop.joinpoint.Invocation;
-import org.jboss.ejb3.interceptors.container.ContainerMethodInvocation;
-
-/**
- * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
- */
-public class EJB3InterceptorInterceptor implements Interceptor
-{
- private static final Class<?> PARAMETER_TYPES[] = { InvocationContext.class };
-
- private Class<?> interceptorClass;
- private Method method;
-
- /**
- * @param interceptorClass
- * @param businessMethodInterceptorMethod a business method interceptor on the spec interceptor (@AroundInvoke)
- */
- public EJB3InterceptorInterceptor(Class<?> interceptorClass, Method businessMethodInterceptorMethod)
- {
- assert interceptorClass != null : "interceptorClass is null";
- assert businessMethodInterceptorMethod != null : "businessMethodInterceptorMethod is null";
- assert businessMethodInterceptorMethod.getDeclaringClass().isAssignableFrom(interceptorClass) : businessMethodInterceptorMethod + " does not belong to " + interceptorClass;
- assert businessMethodInterceptorMethod.getReturnType() == Object.class : "return type must be Object " + businessMethodInterceptorMethod;
- assert Arrays.equals(businessMethodInterceptorMethod.getParameterTypes(), PARAMETER_TYPES) : "wrong parameter signature";
- // Ignore throw clause
-
- this.interceptorClass = interceptorClass;
- this.method = businessMethodInterceptorMethod;
- }
-
- public String getName()
- {
- return EJB3InterceptorInterceptor.class.getName();
- }
-
- public Object invoke(Invocation invocation) throws Throwable
- {
- Object interceptor = ContainerMethodInvocation.getContainerMethodInvocation(invocation).getBeanContext().getInterceptor(interceptorClass);
- return invoke(interceptor, invocation);
- }
-
- private Object invoke(Object interceptor, final Invocation invocation) throws Throwable
- {
- InvocationContext ctx = InvocationContextInterceptor.getInvocationContext(invocation);
- try
- {
- Object args[] = { ctx };
- boolean accessible = method.isAccessible();
- method.setAccessible(true);
- try
- {
- return method.invoke(interceptor, args);
- }
- finally
- {
- method.setAccessible(accessible);
- }
- }
- catch(InvocationTargetException e)
- {
- throw e.getCause();
- }
- }
-}
Copied: projects/ejb3/tags/jboss-ejb3-interceptors-1.1.3/src/main/java/org/jboss/ejb3/interceptors/aop/EJB3InterceptorInterceptor.java (from rev 110184, projects/ejb3/trunk/interceptors/src/main/java/org/jboss/ejb3/interceptors/aop/EJB3InterceptorInterceptor.java)
===================================================================
--- projects/ejb3/tags/jboss-ejb3-interceptors-1.1.3/src/main/java/org/jboss/ejb3/interceptors/aop/EJB3InterceptorInterceptor.java (rev 0)
+++ projects/ejb3/tags/jboss-ejb3-interceptors-1.1.3/src/main/java/org/jboss/ejb3/interceptors/aop/EJB3InterceptorInterceptor.java 2010-12-23 17:51:10 UTC (rev 110186)
@@ -0,0 +1,87 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, 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.ejb3.interceptors.aop;
+
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.aop.joinpoint.Invocation;
+import org.jboss.ejb3.interceptors.container.ContainerMethodInvocation;
+
+import javax.interceptor.InvocationContext;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.Arrays;
+
+/**
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+public class EJB3InterceptorInterceptor implements Interceptor
+{
+ private static final Class<?> PARAMETER_TYPES[] = { InvocationContext.class };
+
+ private Class<?> interceptorClass;
+ private Method method;
+
+ /**
+ * @param interceptorClass
+ * @param businessMethodInterceptorMethod a business method interceptor on the spec interceptor (@AroundInvoke)
+ */
+ public EJB3InterceptorInterceptor(Class<?> interceptorClass, Method businessMethodInterceptorMethod)
+ {
+ assert interceptorClass != null : "interceptorClass is null";
+ assert businessMethodInterceptorMethod != null : "businessMethodInterceptorMethod is null";
+ assert businessMethodInterceptorMethod.getDeclaringClass().isAssignableFrom(interceptorClass) : businessMethodInterceptorMethod + " does not belong to " + interceptorClass;
+ assert businessMethodInterceptorMethod.getReturnType() == Object.class : "return type must be Object " + businessMethodInterceptorMethod;
+ assert Arrays.equals(businessMethodInterceptorMethod.getParameterTypes(), PARAMETER_TYPES) : "wrong parameter signature";
+ // Ignore throw clause
+
+ this.interceptorClass = interceptorClass;
+ this.method = businessMethodInterceptorMethod;
+
+ this.method.setAccessible(true);
+ }
+
+ public String getName()
+ {
+ return EJB3InterceptorInterceptor.class.getName();
+ }
+
+ public Object invoke(Invocation invocation) throws Throwable
+ {
+ Object interceptor = ContainerMethodInvocation.getContainerMethodInvocation(invocation).getBeanContext().getInterceptor(interceptorClass);
+ return invoke(interceptor, invocation);
+ }
+
+ private Object invoke(Object interceptor, final Invocation invocation) throws Throwable
+ {
+ InvocationContext ctx = InvocationContextInterceptor.getInvocationContext(invocation);
+ try
+ {
+ Object args[] = { ctx };
+ return method.invoke(interceptor, args);
+ }
+ catch(InvocationTargetException e)
+ {
+ throw e.getCause();
+ }
+ }
+}
More information about the jboss-cvs-commits
mailing list