svnno****@sourc*****
svnno****@sourc*****
2008年 6月 11日 (水) 21:45:10 JST
Revision: 972 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=972 Author: shinsuke Date: 2008-06-11 21:45:10 +0900 (Wed, 11 Jun 2008) Log Message: ----------- close statement. Modified Paths: -------------- pal-portal/branches/pal-portal-1.x/portal/jetspeed-2/components/statistics/src/java/org/apache/jetspeed/audit/impl/AuditActivityImpl.java -------------- next part -------------- Modified: pal-portal/branches/pal-portal-1.x/portal/jetspeed-2/components/statistics/src/java/org/apache/jetspeed/audit/impl/AuditActivityImpl.java =================================================================== --- pal-portal/branches/pal-portal-1.x/portal/jetspeed-2/components/statistics/src/java/org/apache/jetspeed/audit/impl/AuditActivityImpl.java 2008-06-10 12:50:27 UTC (rev 971) +++ pal-portal/branches/pal-portal-1.x/portal/jetspeed-2/components/statistics/src/java/org/apache/jetspeed/audit/impl/AuditActivityImpl.java 2008-06-11 12:45:10 UTC (rev 972) @@ -134,6 +134,7 @@ { Connection con = null; PreparedStatement stm = null; + PreparedStatement stm2 = null; try { Timestamp timestamp = new Timestamp(System.currentTimeMillis()); @@ -153,7 +154,7 @@ stm.execute(); if (maxAge > 0) { - PreparedStatement stm2 = con + stm2 = con .prepareStatement("DELETE FROM ADMIN_ACTIVITY WHERE TIME_STAMP < ?"); stm2.setTimestamp(1, new Timestamp(System.currentTimeMillis() - ((long) maxAge * 1000))); @@ -169,6 +170,7 @@ try { if (stm != null) stm.close(); + if (stm2 != null) stm2.close(); } catch (SQLException se) { @@ -200,6 +202,7 @@ { Connection con = null; PreparedStatement stm = null; + PreparedStatement stm2 = null; try { Timestamp timestamp = new Timestamp(System.currentTimeMillis()); @@ -218,7 +221,7 @@ stm.executeUpdate(); if (maxAge > 0) { - PreparedStatement stm2 = con + stm2 = con .prepareStatement("DELETE FROM USER_ACTIVITY WHERE TIME_STAMP < ?"); stm2.setTimestamp(1, new Timestamp(System .currentTimeMillis() @@ -236,6 +239,7 @@ try { if (stm != null) stm.close(); + if (stm2 != null) stm2.close(); } catch (SQLException se) {