Exemple #1
0
 public CommandAnonymousInnerClass(FailedJobListener outerInstance, CommandContext commandContext,
                                   ICommand <object> cmd)
 {
     this._outerInstance  = outerInstance;
     this._commandContext = commandContext;
     this._cmd            = cmd;
 }
Exemple #2
0
 private static OptimisticLockingException CallFailedJobListenerWithRetries(ICommandExecutor commandExecutor, FailedJobListener failedJobListener)
 {
     try
     {
         commandExecutor.Execute(failedJobListener);
         return(null);
     }
     catch (OptimisticLockingException ex)
     {
         failedJobListener.IncrementCountRetries();
         if (failedJobListener.GetRetriesLeft() > 0)
         {
             return(CallFailedJobListenerWithRetries(commandExecutor, failedJobListener));
         }
         return(ex);
     }
 }