tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session JDBCStore.java
Date Tue, 02 Nov 2004 20:05:13 GMT
pero        2004/11/02 12:05:12

  Modified:    catalina/src/share/org/apache/catalina/session
                        JDBCStore.java
  Log:
  reformat the changes after a hint from bill. :-)
  
  Revision  Changes    Path
  1.12      +27 -28    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.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- JDBCStore.java	2 Nov 2004 19:07:50 -0000	1.11
  +++ JDBCStore.java	2 Nov 2004 20:05:12 -0000	1.12
  @@ -452,11 +452,11 @@
                   }
                   try {
                       if (preparedKeysSql == null) {
  -						String keysSql =
  -							"SELECT " + sessionIdCol + " FROM " + sessionTable +
  -							" WHERE " + sessionAppCol + " = ?";
  +                        String keysSql = "SELECT " + sessionIdCol + " FROM "
  +                                + sessionTable + " WHERE " + sessionAppCol
  +                                + " = ?";
                           preparedKeysSql = _conn.prepareStatement(keysSql);
  -                    }
  +					}
   
                       preparedKeysSql.setString(1, getName());
                       rst = preparedKeysSql.executeQuery();
  @@ -513,11 +513,11 @@
   
                   try {
                       if (preparedSizeSql == null) {
  -						String sizeSql =
  -							"SELECT COUNT(" + sessionIdCol + ") FROM " + sessionTable +
  -							" WHERE " + sessionAppCol + " = ?";
  +                        String sizeSql = "SELECT COUNT(" + sessionIdCol
  +                                + ") FROM " + sessionTable + " WHERE "
  +                                + sessionAppCol + " = ?";
                           preparedSizeSql = _conn.prepareStatement(sizeSql);
  -                    }
  +					}
   
                       preparedSizeSql.setString(1, getName());
                       rst = preparedSizeSql.executeQuery();
  @@ -573,11 +573,11 @@
   
                   try {
                       if (preparedLoadSql == null) {
  -						String loadSql =
  -								"SELECT " + sessionIdCol + ", " + sessionDataCol + " FROM " +
  -								sessionTable + " WHERE " + sessionIdCol + " = ? AND " +
  -								sessionAppCol + " = ?";
  -                       preparedLoadSql = _conn.prepareStatement(loadSql);
  +                        String loadSql = "SELECT " + sessionIdCol + ", "
  +                                + sessionDataCol + " FROM " + sessionTable
  +                                + " WHERE " + sessionIdCol + " = ? AND "
  +                                + sessionAppCol + " = ?";
  +                        preparedLoadSql = _conn.prepareStatement(loadSql);
                       }
   
                       preparedLoadSql.setString(1, id);
  @@ -660,9 +660,9 @@
   
                   try {
                       if (preparedRemoveSql == null) {
  -						String removeSql =
  -							"DELETE FROM " + sessionTable + " WHERE " + sessionIdCol +
  -							" = ?  AND " + sessionAppCol + " = ?";
  +                        String removeSql = "DELETE FROM " + sessionTable
  +                                + " WHERE " + sessionIdCol + " = ?  AND "
  +                                + sessionAppCol + " = ?";
                           preparedRemoveSql = _conn.prepareStatement(removeSql);
                       }
   
  @@ -702,8 +702,8 @@
   
                   try {
                       if (preparedClearSql == null) {
  -						String clearSql =
  -							"DELETE FROM " + sessionTable + " WHERE " + sessionAppCol + " = ?";
  +                        String clearSql = "DELETE FROM " + sessionTable
  +                             + " WHERE " + sessionAppCol + " = ?";
                           preparedClearSql = _conn.prepareStatement(clearSql);
                       }
   
  @@ -759,15 +759,14 @@
                       in = new BufferedInputStream(bis, size);
   
                       if (preparedSaveSql == null) {
  -						String saveSql =
  -							"INSERT INTO " + sessionTable + " (" + sessionIdCol + ", " +
  -							sessionAppCol + ", " +
  -							sessionDataCol + ", " +
  -							sessionValidCol + ", " +
  -							sessionMaxInactiveCol + ", " +
  -							sessionLastAccessedCol + ") VALUES (?, ?, ?, ?, ?, ?)";
  -                        preparedSaveSql = _conn.prepareStatement(saveSql);
  -                    }
  +                        String saveSql = "INSERT INTO " + sessionTable + " ("
  +                           + sessionIdCol + ", " + sessionAppCol + ", "
  +                           + sessionDataCol + ", " + sessionValidCol
  +                           + ", " + sessionMaxInactiveCol + ", "
  +                           + sessionLastAccessedCol
  +                           + ") VALUES (?, ?, ?, ?, ?, ?)";
  +                       preparedSaveSql = _conn.prepareStatement(saveSql);
  +					}
   
                       preparedSaveSql.setString(1, session.getId());
                       preparedSaveSql.setString(2, getName());
  
  
  

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


Mime
View raw message