code: protected void handleConnectionException(int errorCode, Throwable originalCause)
      throws ActivityException {
          InternalEvent message = InternalEvent.createActivityStartMessage(getActivityId(),
                  getProcessInstanceId(), getWorkTransitionInstanceId(), getMasterRequestId(),
                  COMPCODE_AUTO_RETRY);
          ScheduledEventQueue eventQueue = ScheduledEventQueue.getSingleton();
          int retry_interval = this.getRetryInterval();
          Date scheduledTime = new Date(DatabaseAccess.getCurrentTime()+retry_interval*1000);
          super.loginfo("The activity failed, set to retry at " + StringHelper.dateToString(scheduledTime));
          eventQueue.scheduleInternalEvent(ScheduledEvent.INTERNAL_EVENT_PREFIX+this.getActivityInstanceId(),
                  scheduledTime, message.toString(), "procinst:"+this.getProcessInstanceId().toString());
          this.setReturnCode(COMPCODE_AUTO_RETRY);
          // the above is to prevent engine from making transitions (typically to exception handler)
          throw new ActivityException(errorCode, originalCause.getMessage(), originalCause);
      }
docs: Typically you should not override this method. ConnectionPoolAdapter
  does override this with internal MDW logic.
  @param errorCode
  @throws ActivityException