[jboss-cvs] JBossAS SVN: r109435 - in projects/ejb3/trunk/interceptors: src/main/java/org/jboss/ejb3/interceptors/aop and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Nov 23 12:52:53 EST 2010


Author: wolfc
Date: 2010-11-23 12:52:53 -0500 (Tue, 23 Nov 2010)
New Revision: 109435

Modified:
   projects/ejb3/trunk/interceptors/pom.xml
   projects/ejb3/trunk/interceptors/src/main/java/org/jboss/ejb3/interceptors/aop/InvocationContextInterceptor.java
   projects/ejb3/trunk/interceptors/src/test/resources/log4j.xml
Log:
EJBTHREE-2202: implement the spi InvocationContext


Modified: projects/ejb3/trunk/interceptors/pom.xml
===================================================================
--- projects/ejb3/trunk/interceptors/pom.xml	2010-11-23 17:49:42 UTC (rev 109434)
+++ projects/ejb3/trunk/interceptors/pom.xml	2010-11-23 17:52:53 UTC (rev 109435)
@@ -10,7 +10,7 @@
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>jboss-ejb3-interceptors</artifactId>
-  <version>1.0.9-SNAPSHOT</version>
+  <version>1.1.0-SNAPSHOT</version>
   <packaging>jar</packaging>
   <name>JBoss EJB 3.0 Interceptors</name>
   <url>http://www.jboss.org</url>
@@ -85,6 +85,12 @@
       <version>1.0.0</version>
     </dependency>
 
+    <dependency>
+      <groupId>org.jboss.ejb3.context</groupId>
+      <artifactId>jboss-ejb3-context-base</artifactId>
+      <version>0.3.0-SNAPSHOT</version>
+    </dependency>
+
     <!-- External -->
     <dependency>
       <groupId>org.jboss</groupId>

Modified: projects/ejb3/trunk/interceptors/src/main/java/org/jboss/ejb3/interceptors/aop/InvocationContextInterceptor.java
===================================================================
--- projects/ejb3/trunk/interceptors/src/main/java/org/jboss/ejb3/interceptors/aop/InvocationContextInterceptor.java	2010-11-23 17:49:42 UTC (rev 109434)
+++ projects/ejb3/trunk/interceptors/src/main/java/org/jboss/ejb3/interceptors/aop/InvocationContextInterceptor.java	2010-11-23 17:52:53 UTC (rev 109435)
@@ -1,13 +1,14 @@
 package org.jboss.ejb3.interceptors.aop;
 
+import org.jboss.aop.joinpoint.Invocation;
+import org.jboss.aop.joinpoint.MethodInvocation;
+import org.jboss.ejb3.context.base.BaseInvocationContext;
+
 import java.lang.reflect.Method;
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.Map;
 
-import org.jboss.aop.joinpoint.Invocation;
-import org.jboss.aop.joinpoint.MethodInvocation;
-
 /*
  * JBoss, Home of Professional Open Source.
  * Copyright 2007, Red Hat Middleware LLC, and individual contributors
@@ -35,7 +36,7 @@
  * is available.
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public class InvocationContextInterceptor
 {
@@ -54,6 +55,7 @@
          throw new IllegalStateException("InvocationContextInterceptor must be in the interceptor chain");
       //assert ctx.invocation == invocation : "using InvocationContextInterceptor from a different bind";
       // FIXME: is this allowed?
+      // This is a hack to counter the fact that InterceptorSequencer creates a new invocation.
       ctx.invocation = invocation;
       return ctx;
    }
@@ -95,7 +97,7 @@
       }
    }
 
-   private static class InvocationContext implements javax.interceptor.InvocationContext
+   private static class InvocationContext extends BaseInvocationContext
    {
       private Invocation invocation;
       private Map<String, Object> contextData = new HashMap<String, Object>();
@@ -104,6 +106,7 @@
       
       private InvocationContext(Invocation invocation)
       {
+         super(null, null);
          this.invocation = invocation;
          // Whether we're calling a business method or a lifecycle callback is beyond scope
          // here. This must be explicitly set via setBusinessMethodInvocation.

Modified: projects/ejb3/trunk/interceptors/src/test/resources/log4j.xml
===================================================================
--- projects/ejb3/trunk/interceptors/src/test/resources/log4j.xml	2010-11-23 17:49:42 UTC (rev 109434)
+++ projects/ejb3/trunk/interceptors/src/test/resources/log4j.xml	2010-11-23 17:52:53 UTC (rev 109435)
@@ -102,9 +102,11 @@
   </category>
   -->
 
+  <!--
   <category name="org.jboss.aop">
     <priority value="ALL"/>
   </category>
+  -->
   
   <category name="org.jboss">
     <priority value="INFO"/>



More information about the jboss-cvs-commits mailing list