[jboss-cvs] jboss-seam/src/main/org/jboss/seam/interceptors ...

Gavin King gavin.king at jboss.com
Mon Jun 25 01:49:18 EDT 2007


  User: gavin   
  Date: 07/06/25 01:49:18

  Modified:    src/main/org/jboss/seam/interceptors 
                        MethodContextInterceptor.java
  Log:
  this and component references in method context
  
  Revision  Changes    Path
  1.6       +7 -2      jboss-seam/src/main/org/jboss/seam/interceptors/MethodContextInterceptor.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: MethodContextInterceptor.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/interceptors/MethodContextInterceptor.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -b -r1.5 -r1.6
  --- MethodContextInterceptor.java	21 Jun 2007 05:27:28 -0000	1.5
  +++ MethodContextInterceptor.java	25 Jun 2007 05:49:18 -0000	1.6
  @@ -1,5 +1,6 @@
   package org.jboss.seam.interceptors;
   
  +import org.jboss.seam.Component;
   import org.jboss.seam.annotations.AroundInvoke;
   import org.jboss.seam.annotations.intercept.Interceptor;
   import org.jboss.seam.contexts.Context;
  @@ -21,11 +22,15 @@
      @AroundInvoke
      public Object aroundInvoke(InvocationContext ctx) throws Exception
      {
  -      String name = getComponent().getName();
  +      Component comp = getComponent();
  +      String name = comp.getName();
  +      Object target = ctx.getTarget();
         Context outerMethodContext = Lifecycle.beginMethod();
         try
         {
  -         Contexts.getMethodContext().set( name, ctx.getTarget() );
  +         Contexts.getMethodContext().set(name, target);
  +         Contexts.getMethodContext().set("org.jboss.seam.this", target);
  +         Contexts.getMethodContext().set("org.jboss.seam.component", comp);
            return ctx.proceed();
         }
         finally
  
  
  



More information about the jboss-cvs-commits mailing list