public void sessionCreated(HttpSessionBindingEvent se) { try { Log.info("HttpSession Created..."); } catch (Exception e) { Log.info("Exception from sessionCreated ::" + e); } }
public String getQueryString() { StringBuffer buf = new StringBuffer(); int qMarkCount = 0; int qPos = 0; StringTokenizer tok = new StringTokenizer(sqlTemplate + " ", "?"); while (tok.hasMoreTokens()) { String oneChunk = tok.nextToken(); buf.append(oneChunk); // Log.info("=== size :: " + params.size(), this); // Log.info("=== qMarkCount :: " + qMarkCount, this); try { Object value; String value_type = ""; if (params.size() > 0 + qMarkCount) { qPos = qMarkCount++; value = params.get(0 + qPos); value_type = (String) params_type.get(0 + qPos); } else { if (tok.hasMoreTokens()) { value = null; } else { value = ""; } } if (value_type.equals("String")) buf.append(" '" + value + "'"); else buf.append(" " + value); } catch (Throwable e) { buf.append("ERROR WHEN PRODUCING QUERY STRING FOR LOG." + e.toString()); Log.error(buf.toString(), this); // catch this without whining, if this fails the only thing wrong is probably this class } } return buf.toString().trim(); }
public void close() throws SQLException { try { statement.close(); } catch (SQLException e) { Log.error("pstmt close error => " + e, this); throw e; } }
public boolean execute() throws SQLException { try { return statement.execute(); } catch (SQLException se) { Log.info(se.toString(), this); throw se; } finally { } }
public boolean execute(String sql, String[] columnNames) throws SQLException { try { return statement.execute(sql, columnNames); } catch (SQLException se) { Log.error(se.toString(), this); throw se; } finally { } }
public ResultSet executeQuery() throws SQLException { try { return statement.executeQuery(); } catch (SQLException se) { Log.info(se.toString(), this); throw se; } finally { } }
public void valueUnbound(HttpSessionBindingEvent pinsEvent) { SessionUtil.setNowUser(-1); Log.info( " <SESSIONLOGINID> <DELETED FROM SESSION> <LOGIN_ID:" + loginId_ + "><SESSION_ID:" + sessionId_ + ">"); }
public boolean execute(String sql, int autoGeneratedKeys) throws SQLException { try { return statement.execute(sql, autoGeneratedKeys); } catch (SQLException se) { Log.error(se.toString(), this); throw se; } finally { } }
public int[] executeBatch() throws SQLException { try { return statement.executeBatch(); } catch (SQLException se) { Log.error(se.toString(), this); throw se; } finally { } }
public int executeUpdate() throws SQLException { int result = 0; try { result = statement.executeUpdate(); } catch (SQLException se) { Log.info(se.toString(), this); throw se; } finally { } return result; }
public int executeUpdate(String sql, String[] columnNames) throws SQLException { int result = 0; try { result = statement.executeUpdate(sql, columnNames); } catch (SQLException se) { Log.error(se.toString(), this); throw se; } finally { } return result; }
public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException { int result = 0; try { result = statement.executeUpdate(sql, autoGeneratedKeys); } catch (SQLException se) { Log.error(se.toString(), this); throw se; } finally { } return result; }
public TRuntimeException(String code) { super(code); Log.fatal(code, this); }
public void valueBound(HttpSessionBindingEvent pinsEvent) { SessionUtil.setNowUser(1); Log.info(" <SESSIONLISTENER> <CREATED> <SESSIONID:" + loginId_ + ">"); }
public TRuntimeException(String code, String message, Throwable rootCause) { super("[" + code + "]" + message); this.rootCause = rootCause; this.isFirst = false; Log.fatal("[" + code + "]" + message, this); }
public TRuntimeException(String code, String msg) { super("[" + code + "]" + msg); Log.info("[" + code + "]" + msg, this); }
public TRuntimeException(Throwable rootCause) { this(); this.rootCause = rootCause; this.isFirst = false; Log.fatal("", this); }