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

Shane Bryzak Shane_Bryzak at symantec.com
Sun Oct 15 20:25:46 EDT 2006


  User: sbryzak2
  Date: 06/10/15 20:25:46

  Modified:    src/main/org/jboss/seam/annotations  Synchronized.java
  Log:
  Fixed NPE for session-scoped components without @Synchronized annotation.  Gavin, is it right to set a default timeout?
  
  Revision  Changes    Path
  1.4       +65 -32    jboss-seam/src/main/org/jboss/seam/annotations/Synchronized.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Synchronized.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/annotations/Synchronized.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -b -r1.3 -r1.4
  --- Synchronized.java	15 Oct 2006 22:43:01 -0000	1.3
  +++ Synchronized.java	16 Oct 2006 00:25:46 -0000	1.4
  @@ -1,32 +1,65 @@
   package org.jboss.seam.annotations;
   
  +
  +
   import static java.lang.annotation.ElementType.TYPE;
  +
   import static java.lang.annotation.RetentionPolicy.RUNTIME;
   
  +
  +
   import java.lang.annotation.Documented;
  +
   import java.lang.annotation.Retention;
  +
   import java.lang.annotation.Target;
   
  +
  +
   /**
  +
    * Specifies that a stateful component has
  +
    * multiple concurrent clients, and so access 
  +
    * to the component must be synchronized. This
  +
    * annotation is not required session scoped 
  +
    * components, which are synchronized by default.
  +
    * 
  +
    * @author Gavin King
  +
    *
  +
    */
  +
   @Target(TYPE)
  +
   @Retention(RUNTIME)
  +
   @Documented
  +
   public @interface Synchronized
  +
   {
  +  public static final int DEFAULT_TIMEOUT = 1000;
  +
      /**
  +
       * How long should we wait for the lock
  +
       * before throwing an exception?
  +
       * 
  +
       * @return the timeout in milliseconds
  +
       */
  -   long timeout() default 1000;
  +
  +   long timeout() default DEFAULT_TIMEOUT;
  +
   }
  +
  
  
  



More information about the jboss-cvs-commits mailing list