private void prepairResponse(AjaxResponse obj, Transaction txn) { if (LOG.isDebugEnabled()) LOG.debug("Return Ajax status " + obj.getStatus() + " - " + obj.getErrorMessage()); if (txn != null) { obj.setReturnUrl(txn.getReturnUrl()); obj.setRetry(txn.getContinueRetryCounter()); obj.setRedirect(true); if (LOG.isDebugEnabled()) { Date pollStart = (Date) txn.getContinueStartDate(); Date currentTime = new Date(); long dif = currentTime.getTime() - pollStart.getTime(); LOG.debug( "Ajax Poll: [RetryCount=" + (obj.getRetry()) + "] [Elapsed Time=" + (dif / 1000) + "s]"); } } response = obj; }