private List<List> readResultsFromExecution(Execution execution) throws TranslatorException { List<List> results = new ArrayList<List>(); while (true) { try { if (execution instanceof ResultSetExecution) { ResultSetExecution rs = (ResultSetExecution)execution; List result = null; while ((result = rs.next()) != null) { results.add(result); } break; } UpdateExecution rs = (UpdateExecution)execution; int[] result = rs.getUpdateCounts(); for (int i = 0; i < result.length; i++) { results.add(Arrays.asList(result[i])); } break; } catch (DataNotAvailableException e) { if (e.getRetryDelay() > 0) { try { Thread.sleep(e.getRetryDelay()); } catch (InterruptedException e1) { throw new TranslatorException(e1); } } } } return results; }
timer.start(); if (execution != null) { execution.close(); LogManager.logDetail(LogConstants.CTX_CONNECTOR, new Object[] {this.id, "Closed execution"}); //$NON-NLS-1$ if (execution instanceof ReusableExecution<?>) {
this.execution.execute(); LogManager.logDetail(LogConstants.CTX_CONNECTOR, new Object[] {this.id, "Executed command"}); //$NON-NLS-1$ } catch (Throwable t) {
this.execution.execute(); LogManager.logDetail(LogConstants.CTX_CONNECTOR, new Object[] {this.id, "Executed command"}); //$NON-NLS-1$ } catch (Throwable t) {
while (batchSize < this.requestMsg.getFetchSize()) { List<?> row = this.execution.next(); if (row == null) { this.lastBatch = true;
execution.close(); LogManager.logDetail(LogConstants.CTX_CONNECTOR, new Object[] {this.id, "Closed execution"}); //$NON-NLS-1$ if (execution instanceof ReusableExecution<?>) {
this.execution.execute(); LogManager.logDetail(LogConstants.CTX_CONNECTOR, new Object[] {this.id, "Executed command"}); //$NON-NLS-1$ } catch (Throwable t) {
while (batchSize < this.requestMsg.getFetchSize()) { List<?> row = this.execution.next(); if (row == null) { this.lastBatch = true;
execution.close(); LogManager.logDetail(LogConstants.CTX_CONNECTOR, new Object[] {this.id, "Closed execution"}); //$NON-NLS-1$ if (execution instanceof ReusableExecution<?>) {
while (batchSize < this.requestMsg.getFetchSize()) { List<?> row = this.execution.next(); if (row == null) { this.lastBatch = true;