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

Gavin King gavin.king at jboss.com
Tue Jul 25 15:51:43 EDT 2006


  User: gavin   
  Date: 06/07/25 15:51:43

  Modified:    src/main/org/jboss/seam    Component.java
                        InterceptionType.java Seam.java
  Log:
  change defaulting for when interception occurs
  
  Revision  Changes    Path
  1.151     +5 -1      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.150
  retrieving revision 1.151
  diff -u -b -r1.150 -r1.151
  --- Component.java	25 Jul 2006 04:40:42 -0000	1.150
  +++ Component.java	25 Jul 2006 19:51:43 -0000	1.151
  @@ -88,7 +88,7 @@
    *
    * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
    * @author Gavin King
  - * @version $Revision: 1.150 $
  + * @version $Revision: 1.151 $
    */
   @Scope(ScopeType.APPLICATION)
   public class Component
  @@ -174,6 +174,10 @@
         startup = beanClass.isAnnotationPresent(Startup.class);
         if (startup)
         {
  +         if (scope!=ScopeType.SESSION && scope!=ScopeType.APPLICATION)
  +         {
  +            throw new IllegalArgumentException("@Startup only supported for SESSION or APPLICATION scoped components: " + name);
  +         }
            dependencies = getBeanClass().getAnnotation(Startup.class).depends();
         }
         
  
  
  
  1.4       +11 -8     jboss-seam/src/main/org/jboss/seam/InterceptionType.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: InterceptionType.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/InterceptionType.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -b -r1.3 -r1.4
  --- InterceptionType.java	27 Dec 2005 00:40:36 -0000	1.3
  +++ InterceptionType.java	25 Jul 2006 19:51:43 -0000	1.4
  @@ -1,4 +1,4 @@
  -//$Id: InterceptionType.java,v 1.3 2005/12/27 00:40:36 gavin Exp $
  +//$Id: InterceptionType.java,v 1.4 2006/07/25 19:51:43 gavin Exp $
   package org.jboss.seam;
   
   import javax.faces.event.PhaseId;
  @@ -23,22 +23,25 @@
      NEVER,
      /**
       * Seam intercepts any invocations that occur after the 
  -    * restore view phase (default for session bean and
  -    * JavaBean components)
  +    * restore view phase, or any invocation that occurs 
  +    * outside the context of JSF 
       */
      AFTER_RESTORE_VIEW,
      /**
       * Seam intercepts any invocations that occur after the 
  -    * update model values phase
  +    * update model values phase, or any invocation that occurs 
  +    * outside the context of JSF
       */
      AFTER_UPDATE_MODEL_VALUES,
      /**
       * Seam intercepts invocations upon the component only during
  -    * the invoke application phase
  +    * the invoke application phase, or invocations that occur 
  +    * outside the context of JSF
       */
      INVOKE_APPLICATION,
      /**
       * Seam always intercepts invocations upon the component
  +    * (default for session bean and JavaBean components)
       */
      ALWAYS;
   
  @@ -51,11 +54,11 @@
            case NEVER:
               return false;
            case AFTER_RESTORE_VIEW:
  -            return phaseId!=PhaseId.RESTORE_VIEW && phaseId!=null;
  +            return phaseId!=PhaseId.RESTORE_VIEW;
            case AFTER_UPDATE_MODEL_VALUES:
  -            return phaseId!=PhaseId.RESTORE_VIEW && phaseId!=PhaseId.UPDATE_MODEL_VALUES && phaseId!=null;
  +            return phaseId!=PhaseId.RESTORE_VIEW && phaseId!=PhaseId.UPDATE_MODEL_VALUES;
            case INVOKE_APPLICATION:
  -            return phaseId==PhaseId.INVOKE_APPLICATION;
  +            return phaseId==PhaseId.INVOKE_APPLICATION || phaseId==null;
            case ALWAYS:
               return true;
            default:
  
  
  
  1.22      +2 -2      jboss-seam/src/main/org/jboss/seam/Seam.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Seam.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/Seam.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -b -r1.21 -r1.22
  --- Seam.java	16 Jun 2006 04:07:23 -0000	1.21
  +++ Seam.java	25 Jul 2006 19:51:43 -0000	1.22
  @@ -1,4 +1,4 @@
  -//$Id: Seam.java,v 1.21 2006/06/16 04:07:23 gavin Exp $
  +//$Id: Seam.java,v 1.22 2006/07/25 19:51:43 gavin Exp $
   package org.jboss.seam;
   
   import static org.jboss.seam.ComponentType.ENTITY_BEAN;
  @@ -150,7 +150,7 @@
         }
         else 
         {
  -         return InterceptionType.AFTER_RESTORE_VIEW;
  +         return InterceptionType.ALWAYS;
         }
      }
   
  
  
  



More information about the jboss-cvs-commits mailing list