コード例 #1
0
 @Override
 public void close() {
   RuntimeException closeError = null;
   if (transferList != null) {
     synchronized (this) {
       for (Transfer transfer : transferList) {
         try {
           traceOperation("SESSION_CLOSE", 0);
           transfer.writeInt(SessionRemote.SESSION_CLOSE);
           done(transfer);
           transfer.close();
         } catch (RuntimeException e) {
           trace.error(e, "close");
           closeError = e;
         } catch (Exception e) {
           trace.error(e, "close");
         }
       }
     }
     transferList = null;
   }
   traceSystem.close();
   if (embedded != null) {
     embedded.close();
     embedded = null;
   }
   if (closeError != null) {
     throw closeError;
   }
 }
コード例 #2
0
ファイル: JdbcConnection.java プロジェクト: projetaty/kernel
 protected void finalize() {
   if (!SysProperties.runFinalize) {
     return;
   }
   if (isInternal) {
     return;
   }
   if (session != null && openStackTrace != null) {
     trace.error("Connection not closed", openStackTrace);
     try {
       close();
     } catch (SQLException e) {
       trace.debug("finalize", e);
     }
   }
 }