public static void updateOffers(boolean[] opType, String[] objId, int[] price) throws Throwable{
Throwable throwable = null;
Context context = ContextDelegator.getInstance();
boolean commit = true;
for (int i = 0; i < 0x7fffffff; i++) {
context.init(3);
try {
updateOffers(opType, objId, price, context);
} catch (TransactionException ex) {
commit = false;
} catch (Throwable ex) {
throwable = ex;
}
if (commit) {
if (context.commit()) {
if (throwable != null) {
throw throwable;
} else {
return;
}
}
} else {
if(context instanceof ControlContext)
ControlContext.abort(((ControlContext)context).getContextId());
else
context.rollback();
commit = true;
}
}
throw new TransactionException("Failed to commit the transaction in the defined retries.");
}