コード例 #1
0
 public void sessionCreated(HttpSessionBindingEvent se) {
   try {
     Log.info("HttpSession Created...");
   } catch (Exception e) {
     Log.info("Exception from sessionCreated ::" + e);
   }
 }
コード例 #2
0
 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();
 }
コード例 #3
0
 public void close() throws SQLException {
   try {
     statement.close();
   } catch (SQLException e) {
     Log.error("pstmt close error => " + e, this);
     throw e;
   }
 }
コード例 #4
0
 public boolean execute() throws SQLException {
   try {
     return statement.execute();
   } catch (SQLException se) {
     Log.info(se.toString(), this);
     throw se;
   } finally {
   }
 }
コード例 #5
0
 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 {
   }
 }
コード例 #6
0
 public ResultSet executeQuery() throws SQLException {
   try {
     return statement.executeQuery();
   } catch (SQLException se) {
     Log.info(se.toString(), this);
     throw se;
   } finally {
   }
 }
コード例 #7
0
 public void valueUnbound(HttpSessionBindingEvent pinsEvent) {
   SessionUtil.setNowUser(-1);
   Log.info(
       " <SESSIONLOGINID> <DELETED FROM SESSION> <LOGIN_ID:"
           + loginId_
           + "><SESSION_ID:"
           + sessionId_
           + ">");
 }
コード例 #8
0
 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 {
   }
 }
コード例 #9
0
 public int[] executeBatch() throws SQLException {
   try {
     return statement.executeBatch();
   } catch (SQLException se) {
     Log.error(se.toString(), this);
     throw se;
   } finally {
   }
 }
コード例 #10
0
 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;
 }
コード例 #11
0
 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;
 }
コード例 #12
0
 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;
 }
コード例 #13
0
 public TRuntimeException(String code) {
   super(code);
   Log.fatal(code, this);
 }
コード例 #14
0
 public void valueBound(HttpSessionBindingEvent pinsEvent) {
   SessionUtil.setNowUser(1);
   Log.info(" <SESSIONLISTENER> <CREATED> <SESSIONID:" + loginId_ + ">");
 }
コード例 #15
0
 public TRuntimeException(String code, String message, Throwable rootCause) {
   super("[" + code + "]" + message);
   this.rootCause = rootCause;
   this.isFirst = false;
   Log.fatal("[" + code + "]" + message, this);
 }
コード例 #16
0
 public TRuntimeException(String code, String msg) {
   super("[" + code + "]" + msg);
   Log.info("[" + code + "]" + msg, this);
 }
コード例 #17
0
 public TRuntimeException(Throwable rootCause) {
   this();
   this.rootCause = rootCause;
   this.isFirst = false;
   Log.fatal("", this);
 }