MethodInvokingJobDetailFactoryBean does not set the result in JobContext [SPR-5831] #10501
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
Andreas Etzlstorfer opened SPR-5831 and commented
In my Environment i have a MethodInvokingJobDetailFactoryBean which is invoking a method on a bean if the trigger fires:
e.g. TestBean.doJob (returns a String Object)
Attached to the SchedulerBean i have some JobListeners. (org.quartz.JobListener)
the implemented Method (jobWasExecuted) is asking for the Result of the Job (jobContext.getResult())
But it is everytime NULL! In my opinion it should be the return value of the method TestBean.doJob
I found the class which is invoking the method on the bean (its a inner class of MethodInvokingJobDetailFactoryBean)
class MethodInvokingJob {
....
protected void executeInternal(JobExecutionContext context) throws JobExecutionException {
....
Object result = this.methodInvoker.invoke(); //???
context.setResult(result); //???
....
}
....
}
Affects: 2.5.6
Issue Links:
Referenced from: commits 87314b9
The text was updated successfully, but these errors were encountered: