remm        2005/01/07 07:09:37

  Modified:    catalina/src/share/org/apache/catalina/session
                        JDBCStore.java
  Log:
  - 25889: don't execute queries twice.
  - Submitted by Tom Anderson.
  
  Revision  Changes    Path
  1.13      +13 -1     
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session/JDBCStore.java
  
  Index: JDBCStore.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session/JDBCStore.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- JDBCStore.java    2 Nov 2004 20:05:12 -0000       1.12
  +++ JDBCStore.java    7 Jan 2005 15:09:37 -0000       1.13
  @@ -467,6 +467,8 @@
                           }
                       }
                       keys = (String[]) tmpkeys.toArray(new 
String[tmpkeys.size()]);
  +                    // Break out after the finally block
  +                    numberOfTries = 0;
                   } catch (SQLException e) {
                       
manager.getContainer().getLogger().error(sm.getString(getStoreName() + 
".SQLException", e));
                       keys = new String[0];
  @@ -524,6 +526,8 @@
                       if (rst.next()) {
                           size = rst.getInt(1);
                       }
  +                    // Break out after the finally block
  +                    numberOfTries = 0;
                   } catch (SQLException e) {
                       
manager.getContainer().getLogger().error(sm.getString(getStoreName() + 
".SQLException", e));
                       if (dbConnection != null)
  @@ -610,6 +614,8 @@
                         } else if 
(manager.getContainer().getLogger().isDebugEnabled()) {
                           
manager.getContainer().getLogger().debug(getStoreName() + ": No persisted data 
object found");
                       }
  +                    // Break out after the finally block
  +                    numberOfTries = 0;
                   } catch (SQLException e) {
                       
manager.getContainer().getLogger().error(sm.getString(getStoreName() + 
".SQLException", e));
                       if (dbConnection != null)
  @@ -669,6 +675,8 @@
                       preparedRemoveSql.setString(1, id);
                       preparedRemoveSql.setString(2, getName());
                       preparedRemoveSql.execute();
  +                    // Break out after the finally block
  +                    numberOfTries = 0;
                   } catch (SQLException e) {
                       
manager.getContainer().getLogger().error(sm.getString(getStoreName() + 
".SQLException", e));
                       if (dbConnection != null)
  @@ -709,6 +717,8 @@
   
                       preparedClearSql.setString(1, getName());
                       preparedClearSql.execute();
  +                    // Break out after the finally block
  +                    numberOfTries = 0;
                   } catch (SQLException e) {
                       
manager.getContainer().getLogger().error(sm.getString(getStoreName() + 
".SQLException", e));
                       if (dbConnection != null)
  @@ -775,6 +785,8 @@
                       preparedSaveSql.setInt(5, 
session.getMaxInactiveInterval());
                       preparedSaveSql.setLong(6, 
session.getLastAccessedTime());
                       preparedSaveSql.execute();
  +                    // Break out after the finally block
  +                    numberOfTries = 0;
                   } catch (SQLException e) {
                       
manager.getContainer().getLogger().error(sm.getString(getStoreName() + 
".SQLException", e));
                       if (dbConnection != null)
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to