pipeline.add(writeToDataSource);
tupleToWebRowSet.getResultOutput().setDataSourceResource(dataSource);
// send it to the server
RequestResource request =
drer.execute(pipeline, RequestExecutionType.ASYNCHRONOUS);
request.pollUntilRequestStarted(1000);
// Get the result data and display it
int count = 0;
while(tupleToWebRowSet.hasNextResult())
{
System.out.println("******************************************************");
System.out.println("******************************************************");
System.out.println("Have new result set, number " + count);
System.out.println("******************************************************");
System.out.println("******************************************************");
ResultSet rs = tupleToWebRowSet.nextResultAsResultSet();
printResultSet(rs);
count++;
if (count == numRuns)
{
break;
}
}
System.out.println("Have done all the runs, terminating request: " + request.getResourceID());
request.destroy();
System.out.println("Request destroyed");
}
catch(Exception e)
{
e.printStackTrace();