1 17 18 package org.sape.carbon.services.scheduler.test; 19 20 21 import org.apache.commons.logging.Log; 22 import org.apache.commons.logging.LogFactory; 23 24 import org.sape.carbon.services.scheduler.UnrecoverableTaskException; 25 26 32 public class RecoverableExceptionSchedulableImpl 33 implements SchedulableComponent { 34 35 38 private Log log = LogFactory.getLog(this.getClass()); 39 40 private SchedulerServiceTestListener listener; 41 42 45 public void setListener(SchedulerServiceTestListener listener) { 46 this.listener = listener; 47 } 48 49 public void doSpecializeTask() throws Exception { 50 if (log.isTraceEnabled()) { 51 log.trace("Running scheduled task"); 52 } 53 this.listener.incrementSecondaryCount(); 54 throw new Exception ("test exception"); 55 } 56 57 60 public void runScheduledTask() throws Exception { 61 if (log.isTraceEnabled()) { 62 log.trace("Running scheduled task"); 63 } 64 this.listener.incrementCount(); 65 throw new Exception ("test exception"); 66 } 67 68 } 69 | Popular Tags |