james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject cvs commit: james-server/src/java/org/apache/james/util/mordred JdbcDataSource.java
Date Wed, 14 Apr 2004 18:10:50 GMT
noel        2004/04/14 11:10:49

  Modified:    src/java/org/apache/james/util/mordred Tag: branch_2_1_fcs
                        JdbcDataSource.java
  Log:
  Fix JAMES-253.  Correction to move Thread.sleep(5000L) out of the synchronized block.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.18.4.7  +4 -3      james-server/src/java/org/apache/james/util/mordred/JdbcDataSource.java
  
  Index: JdbcDataSource.java
  ===================================================================
  RCS file: /home/cvs/james-server/src/java/org/apache/james/util/mordred/JdbcDataSource.java,v
  retrieving revision 1.18.4.6
  retrieving revision 1.18.4.7
  diff -u -r1.18.4.6 -r1.18.4.7
  --- JdbcDataSource.java	14 Apr 2004 17:33:28 -0000	1.18.4.6
  +++ JdbcDataSource.java	14 Apr 2004 18:10:49 -0000	1.18.4.7
  @@ -388,8 +388,8 @@
        */
       public void run() {
           try {
  -            while(reaperActive) synchronized (pool) {
  -                for(int i = 0; i < pool.size(); i++) try {
  +            while(reaperActive) {
  +                synchronized(pool) { for(int i = 0; i < pool.size(); i++) try {
                       PoolConnEntry entry = (PoolConnEntry)pool.elementAt(i);
                       long age            = System.currentTimeMillis() - entry.getLastActivity();
                       synchronized(entry) {
  @@ -442,6 +442,7 @@
                       if (getLogger().isErrorEnabled()) {
                           getLogger().error(sout.toString());
                       }
  +                }
                   }
                   try {
                       // Check for activity every 5 seconds
  
  
  

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


Mime
View raw message