in service/src/main/java/org/apache/fineract/cn/deposit/service/rest/ProductInstanceRestController.java [96:118]
public ResponseEntity<Void> create(@RequestBody @Valid final ProductInstance productInstance) throws Throwable{
int retryCount = 0;
Exception e = null;
do {
retryCount++;
logger.info("Try transaction : " + retryCount + " of " + txnMaxRetry);
System.out.println("*******Try transaction : " + retryCount + " of " + txnMaxRetry);
try {
this.commandGateway.process(new CreateProductInstanceCommand(productInstance));
return ResponseEntity.accepted().build();
} catch (Exception ex) {
logger.info(ex.getClass().getCanonicalName());
System.out.println(ex.getClass().getCanonicalName());
logger.info(ex.getClass().getName());
System.out.println(ex.getClass().getName());
logger.info(ex.getMessage());
System.out.println(ex.getMessage());
e=ex;
}
} while (retryCount < txnMaxRetry);
//throw the last exception
throw e;
}