コード例 #1
0
  public void pop() {
    try {
      ISrvSmartTran trn = SrvApiAlgs2.getIServerTran();

      trn.close();

      IPooledConnection pool = ApiStack.getApi().getIntfImplementor(IPooledConnection.class);
      Connection con = ApiStack.getApi().getIntfImplementor(Connection.class);
      try {
        pool.returnConnection(con);
      } catch (Throwable t) {
        ApiAlgs.getLog(this).error("Error returning connection", t);
      }

    } finally {
      ApiStack.popApi();
    }
  }
コード例 #2
0
 public void run() {
   QSyncTaskResult result;
   try {
     m_syncer.init();
     boolean bCompleted = exec();
     result =
         new QSyncTaskResult(
             m_qid,
             m_syncerId,
             bCompleted ? QSyncTaskStatus.SYNCED : QSyncTaskStatus.EXEC_TIMEOUT,
             null);
   } catch (Exception e) {
     ApiAlgs.getLog(this).error("Sync task error", e);
     m_syncer.finit(e);
     result = new QSyncTaskResult(m_qid, m_syncerId, m_errorStatus, e);
   }
   m_syncMan.onTaskCompleted(result);
   SrvApiAlgs2.getIServerTran().commit();
 }
コード例 #3
0
 private TQSyncQueues.BL queueBL() {
   return SrvApiAlgs2.getIServerTran().instantiateBL(TQSyncQueues.BL.class);
 }