james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject cvs commit: jakarta-james/src/java/org/apache/james/mailrepository JDBCSpoolRepository.java
Date Wed, 07 May 2003 14:33:55 GMT
noel        2003/05/07 07:33:54

  Modified:    src/java/org/apache/james/mailrepository Tag: branch_2_1_fcs
                        JDBCSpoolRepository.java
  Log:
  Reverted change from wait(long) to wait().  There appears to be an infrequent race condition
that leaves all threads sleeping.  Raised WAIT_LIMIT to 60 seconds to reduce overhead.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.15.4.6  +5 -6      jakarta-james/src/java/org/apache/james/mailrepository/JDBCSpoolRepository.java
  
  Index: JDBCSpoolRepository.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/mailrepository/JDBCSpoolRepository.java,v
  retrieving revision 1.15.4.5
  retrieving revision 1.15.4.6
  diff -u -r1.15.4.5 -r1.15.4.6
  --- JDBCSpoolRepository.java	7 May 2003 06:16:54 -0000	1.15.4.5
  +++ JDBCSpoolRepository.java	7 May 2003 14:33:53 -0000	1.15.4.6
  @@ -166,8 +166,7 @@
                       //            .append(" in ")
                       //            .append(repositoryName);
                       //System.err.println(errorBuffer.toString());
  -//                    wait(WAIT_LIMIT);
  -                    wait(); // we'll be woken by store() calling notify()
  +                    wait(WAIT_LIMIT);
                   }
               } catch (InterruptedException ex) {
                   throw ex;
  @@ -211,12 +210,12 @@
                   }
               }
               //Nothing to do... sleep!
  -//            if (sleepUntil == 0) {
  -//                sleepUntil = System.currentTimeMillis() + WAIT_LIMIT;
  -//            }
  +            if (sleepUntil == 0) {
  +                sleepUntil = System.currentTimeMillis() + WAIT_LIMIT;
  +            }
               try {
                   synchronized (this) {
  -                    long waitTime = (sleepUntil == 0) ? 0 : sleepUntil - System.currentTimeMillis();
  +                    long waitTime = sleepUntil - System.currentTimeMillis();
                       //StringBuffer errorBuffer =
                       //    new StringBuffer(128)
                       //            .append("waiting ")
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-dev-help@jakarta.apache.org


Mime
View raw message