1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
Description: Compatibility with CommonJ API provided by Geronimo project
The references to the Work related exceptions are disabled because the
build fails and the compiler emit messages like this:
"Unreachable catch block for WorkException. This exception is never thrown
from the try statement body".
Author: Miguel Landaeta <miguel@miguel.cc>
Last-Update: 2010-07-04
Forwarded: no
--- a/spring-context-support/src/main/java/org/springframework/scheduling/commonj/WorkManagerTaskExecutor.java
+++ b/spring-context-support/src/main/java/org/springframework/scheduling/commonj/WorkManagerTaskExecutor.java
@@ -142,20 +142,22 @@
public void execute(Runnable task) {
Assert.state(this.workManager != null, "No WorkManager specified");
Work work = new DelegatingWork(this.taskDecorator != null ? this.taskDecorator.decorate(task) : task);
- try {
+ //try {
if (this.workListener != null) {
this.workManager.schedule(work, this.workListener);
}
else {
this.workManager.schedule(work);
}
- }
+ //}
+ /*
catch (WorkRejectedException ex) {
throw new TaskRejectedException("CommonJ WorkManager did not accept task: " + task, ex);
}
catch (WorkException ex) {
throw new SchedulingException("Could not schedule task on CommonJ WorkManager", ex);
}
+ */
}
@Override
@@ -205,12 +207,12 @@
//-------------------------------------------------------------------------
@Override
- public WorkItem schedule(Work work) throws WorkException, IllegalArgumentException {
+ public WorkItem schedule(Work work) throws IllegalArgumentException {
return this.workManager.schedule(work);
}
@Override
- public WorkItem schedule(Work work, WorkListener workListener) throws WorkException {
+ public WorkItem schedule(Work work, WorkListener workListener) {
return this.workManager.schedule(work, workListener);
}
|