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

Gavin King gavin.king at jboss.com
Fri Nov 3 20:58:24 EST 2006


  User: gavin   
  Date: 06/11/03 20:58:24

  Modified:    src/main/org/jboss/seam  Component.java
  Log:
  fix remove interceptor by making it client-side JBSEAM-459
  
  Revision  Changes    Path
  1.202     +12 -6     jboss-seam/src/main/org/jboss/seam/Component.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Component.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/Component.java,v
  retrieving revision 1.201
  retrieving revision 1.202
  diff -u -b -r1.201 -r1.202
  --- Component.java	1 Nov 2006 02:54:01 -0000	1.201
  +++ Component.java	4 Nov 2006 01:58:24 -0000	1.202
  @@ -34,6 +34,7 @@
   import java.lang.reflect.Type;
   import java.util.ArrayList;
   import java.util.Arrays;
  +import java.util.Collection;
   import java.util.HashMap;
   import java.util.HashSet;
   import java.util.Hashtable;
  @@ -118,7 +119,7 @@
    *
    * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
    * @author Gavin King
  - * @version $Revision: 1.201 $
  + * @version $Revision: 1.202 $
    */
   @Scope(ScopeType.APPLICATION)
   @SuppressWarnings("deprecation")
  @@ -146,7 +147,7 @@
      private Method postConstructMethod;
      private Method prePassivateMethod;
      private Method postActivateMethod;
  -   private Set<Method> removeMethods = new HashSet<Method>();
  +   private Map<String, Method> removeMethods = new HashMap<String, Method>();
      private Set<Method> validateMethods = new HashSet<Method>();
      private Set<Method> inMethods = new HashSet<Method>();
      private Set<Field> inFields = new HashSet<Field>();
  @@ -288,7 +289,7 @@
   
      private void checkDestroyMethod()
      {
  -      if ( type==STATEFUL_SESSION_BEAN && ( destroyMethod==null || !removeMethods.contains(destroyMethod) ) )
  +      if ( type==STATEFUL_SESSION_BEAN && ( destroyMethod==null || !removeMethods.values().contains(destroyMethod) ) )
         {
            throw new IllegalArgumentException("Stateful session bean component should have a method marked @Remove @Destroy: " + name);
         }
  @@ -389,7 +390,7 @@
               }
               if ( method.isAnnotationPresent(REMOVE) )
               {
  -               removeMethods.add(method);
  +               removeMethods.put( method.getName(), method );
               }
               if ( method.isAnnotationPresent(Destroy.class) )
               {
  @@ -870,9 +871,14 @@
         return destroyMethod;
      }
   
  -   public Set<Method> getRemoveMethods()
  +   public Collection<Method> getRemoveMethods()
      {
  -      return removeMethods;
  +      return removeMethods.values();
  +   }
  +   
  +   public Method getRemoveMethod(String name)
  +   {
  +      return removeMethods.get(name);
      }
   
      public Set<Method> getValidateMethods()
  
  
  



More information about the jboss-cvs-commits mailing list