예제 #1
0
 private ResultSet getResultSet() throws Exception {
   conn = MBeanUtil.getConnection(conn);
   Statement stmt = conn.createStatement();
   String sql = MBeanQueryObject.get().ValidationQuery.str();
   ResultSet rs = stmt.executeQuery(sql);
   return rs;
 }
예제 #2
0
 public String getCurrentStatus() throws Exception {
   try {
     getResultSet();
     info = null;
     return STATUS_ALIVE;
   } catch (Throwable ex) {
     info = ex.getMessage();
     return STATUS_DEAD;
   } finally {
     try {
       conn.close();
     } catch (Exception ex) {
       // do nothing
     }
   }
 }