Exemplo n.º 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;
 }
Exemplo n.º 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
     }
   }
 }