Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MethodInvokingJobDetailFactoryBean does not set the result in JobContext [SPR-5831] #10501

Closed
spring-projects-issues opened this issue Jun 16, 2009 · 1 comment
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

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:

  • SPRNET-1340 MethodInvokingJobDetailFactoryObject does not set the result in JobContext

Referenced from: commits 87314b9

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

Good idea! This simply wasn't defined like that before. As of 3.0 RC1, the result is defined to be the result of the method invocation (if any).

Juergen

@spring-projects-issues spring-projects-issues added type: enhancement A general enhancement in: core Issues in core modules (aop, beans, core, context, expression) labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 3.0 M4 milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants