try {
beganTransaction = TransactionUtil.begin();
orderIds = TransactionUtil.doNewTransaction(new Callable<List<String>>() {
public List<String> call() throws Exception {
List<String> orderIds = new LinkedList<String>();
EntityListIterator eli = null;
try {
eli = delegator.find("OrderHeader", cond, null, UtilMisc.toSet("orderId"), UtilMisc.toList("entryDate ASC"), null);
GenericValue orderHeader;
while ((orderHeader = eli.next()) != null) {
orderIds.add(orderHeader.getString("orderId"));
}
} finally {
if (eli != null) {
eli.close();
}
}
return orderIds;
}
}, "getSalesOrderIds", 0, true);