[
https://issues.apache.org/jira/browse/KARAF-6237?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16818702#comment-16818702
]
ASF subversion and git services commented on KARAF-6237:
--------------------------------------------------------
Commit 2a32c3227f9e1032a1f257ea21bc7f1d51f2c39c in karaf's branch
refs/heads/master from Jean-Baptiste Onofré
[ https://gitbox.apache.org/repos/asf?p=karaf.git;h=2a32c32 ]
Merge pull request #813 from jbonofre/KARAF-6237
[KARAF-6237] Fix reschedule action in the scheduler
> Karaf Scheduler reschedule failed because the function lost the job reference
> (After reschedule job is null)
> ------------------------------------------------------------------------------------------------------------
>
> Key: KARAF-6237
> URL: https://issues.apache.org/jira/browse/KARAF-6237
> Project: Karaf
> Issue Type: Bug
> Components: karaf
> Affects Versions: 4.2.4
> Reporter: stephane Ricci
> Assignee: Jean-Baptiste Onofré
> Priority: Major
> Labels: scheduler
> Fix For: 4.3.0, 4.2.5
>
>
> In {{KarafStdScheduler}} the {{scheduleJob}} method remove the reference to
> the job from the jobDataMap.
> {{QuartzScheduler.DATA_MAP_CONTEXT}} value contains the key
> {{QuartzScheduler.DATA_MAP_OBJECT}}.
> {quote}jobDetail.getJobDataMap().remove(QuartzScheduler.DATA_MAP_CONTEXT);
> {quote}
> In {{QuartzScheduler}} the {{reschedule}} method line 261, the job reference
> can not be retrieve like this anymore
> {quote}Object job = detail.getJobDataMap().get(DATA_MAP_OBJECT);
> {quote}
> The job reference could get it like this
> {quote}final String contextKey = key.toString();
> {quote}
> {quote}JobDataMap karafContext =
> ((KarafStdScheduler)s).getStorage().get(contextKey);
> {quote}
> {quote}Object job = karafContext.get(QuartzScheduler.DATA_MAP_OBJECT);
> {quote}
> I have tested this fixed, it works fine but I'm not sure you want to
> implement it like this ?
> In the same time, in the same class {{QuartzScheduler}} a typo line 57 may
> be fixed
> Quart{color:#ff0000}e{color}JobScheduler.Context instead of
> "Quart{color:#8eb021}z{color}JobScheduler.Context"
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)