Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
爱吃血肠
spring-framework
提交
24030a3f
S
spring-framework
项目概览
爱吃血肠
/
spring-framework
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
spring-framework
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
24030a3f
编写于
1月 05, 2014
作者:
J
Juergen Hoeller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Added deprecation log message and javadoc note for Quartz 1.x support
Issue: SPR-11262
上级
b228a06e
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
31 addition
and
9 deletion
+31
-9
spring-context-support/src/main/java/org/springframework/scheduling/quartz/AdaptableJobFactory.java
...pringframework/scheduling/quartz/AdaptableJobFactory.java
+1
-0
spring-context-support/src/main/java/org/springframework/scheduling/quartz/CronTriggerBean.java
...rg/springframework/scheduling/quartz/CronTriggerBean.java
+2
-0
spring-context-support/src/main/java/org/springframework/scheduling/quartz/JobDetailBean.java
.../org/springframework/scheduling/quartz/JobDetailBean.java
+4
-2
spring-context-support/src/main/java/org/springframework/scheduling/quartz/MethodInvokingJobDetailFactoryBean.java
...scheduling/quartz/MethodInvokingJobDetailFactoryBean.java
+3
-0
spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerAccessor.java
.../springframework/scheduling/quartz/SchedulerAccessor.java
+13
-0
spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerAccessorBean.java
...ingframework/scheduling/quartz/SchedulerAccessorBean.java
+1
-0
spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerFactoryBean.java
...ringframework/scheduling/quartz/SchedulerFactoryBean.java
+4
-7
spring-context-support/src/main/java/org/springframework/scheduling/quartz/SimpleTriggerBean.java
.../springframework/scheduling/quartz/SimpleTriggerBean.java
+2
-0
spring-context-support/src/main/java/org/springframework/scheduling/quartz/SpringBeanJobFactory.java
...ringframework/scheduling/quartz/SpringBeanJobFactory.java
+1
-0
未找到文件。
spring-context-support/src/main/java/org/springframework/scheduling/quartz/AdaptableJobFactory.java
浏览文件 @
24030a3f
...
...
@@ -31,6 +31,7 @@ import org.springframework.util.ReflectionUtils;
* objects as well as standard Quartz {@link org.quartz.Job} instances.
*
* <p>Compatible with Quartz 1.8 as well as Quartz 2.0-2.2, as of Spring 4.0.
* <b>Note:</b> Quartz 1.x support is deprecated - please upgrade to Quartz 2.0+.
*
* @author Juergen Hoeller
* @since 2.0
...
...
spring-context-support/src/main/java/org/springframework/scheduling/quartz/CronTriggerBean.java
浏览文件 @
24030a3f
...
...
@@ -107,7 +107,9 @@ public class CronTriggerBean extends CronTrigger
* by the TriggerListener implementation.
* @see SchedulerFactoryBean#setTriggerListeners
* @see org.quartz.TriggerListener#getName
* @deprecated as of Spring 4.0, since it only works on Quartz 1.x
*/
@Deprecated
public
void
setTriggerListenerNames
(
String
...
names
)
{
for
(
String
name
:
names
)
{
addTriggerListener
(
name
);
...
...
spring-context-support/src/main/java/org/springframework/scheduling/quartz/JobDetailBean.java
浏览文件 @
24030a3f
...
...
@@ -82,7 +82,7 @@ public class JobDetailBean extends JobDetail
* to adapt the given job class to the Quartz Job interface.
*/
@Override
public
Class
<?>
getJobClass
()
{
public
Class
getJobClass
()
{
return
(
this
.
actualJobClass
!=
null
?
this
.
actualJobClass
:
super
.
getJobClass
());
}
...
...
@@ -97,7 +97,7 @@ public class JobDetailBean extends JobDetail
* (for example Spring-managed beans)
* @see SchedulerFactoryBean#setSchedulerContextAsMap
*/
public
void
setJobDataAsMap
(
Map
jobDataAsMap
)
{
public
void
setJobDataAsMap
(
Map
<
String
,
?>
jobDataAsMap
)
{
getJobDataMap
().
putAll
(
jobDataAsMap
);
}
...
...
@@ -108,7 +108,9 @@ public class JobDetailBean extends JobDetail
* by the JobListener implementation.
* @see SchedulerFactoryBean#setJobListeners
* @see org.quartz.JobListener#getName
* @deprecated as of Spring 4.0, since it only works on Quartz 1.x
*/
@Deprecated
public
void
setJobListenerNames
(
String
...
names
)
{
for
(
String
name
:
names
)
{
addJobListener
(
name
);
...
...
spring-context-support/src/main/java/org/springframework/scheduling/quartz/MethodInvokingJobDetailFactoryBean.java
浏览文件 @
24030a3f
...
...
@@ -68,6 +68,7 @@ import org.springframework.util.ReflectionUtils;
* where you want a persistent job to delegate to a specific service method.
*
* <p>Compatible with Quartz 1.8 as well as Quartz 2.0-2.2, as of Spring 4.0.
* <b>Note:</b> Quartz 1.x support is deprecated - please upgrade to Quartz 2.0+.
*
* @author Juergen Hoeller
* @author Alef Arendsen
...
...
@@ -171,7 +172,9 @@ public class MethodInvokingJobDetailFactoryBean extends ArgumentConvertingMethod
* by the JobListener implementation.
* @see SchedulerFactoryBean#setJobListeners
* @see org.quartz.JobListener#getName
* @deprecated as of Spring 4.0, since it only works on Quartz 1.x
*/
@Deprecated
public
void
setJobListenerNames
(
String
...
names
)
{
this
.
jobListenerNames
=
names
;
}
...
...
spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerAccessor.java
浏览文件 @
24030a3f
...
...
@@ -53,6 +53,7 @@ import org.springframework.util.ReflectionUtils;
* {@link SchedulerAccessorBean} classes.
*
* <p>Compatible with Quartz 1.8 as well as Quartz 2.0-2.2, as of Spring 4.0.
* <b>Note:</b> Quartz 1.x support is deprecated - please upgrade to Quartz 2.0+.
*
* @author Juergen Hoeller
* @since 2.5.6
...
...
@@ -64,6 +65,7 @@ public abstract class SchedulerAccessor implements ResourceLoaderAware {
private
static
Class
<?>
triggerKeyClass
;
static
{
// Quartz 2.0 job/trigger key available?
try
{
jobKeyClass
=
Class
.
forName
(
"org.quartz.JobKey"
);
triggerKeyClass
=
Class
.
forName
(
"org.quartz.TriggerKey"
);
...
...
@@ -102,6 +104,13 @@ public abstract class SchedulerAccessor implements ResourceLoaderAware {
protected
ResourceLoader
resourceLoader
;
public
SchedulerAccessor
()
{
if
(
jobKeyClass
==
null
&&
logger
.
isInfoEnabled
())
{
logger
.
info
(
"Spring's Quartz 1.x support is deprecated - please upgrade to Quartz 2.0+"
);
}
}
/**
* Set whether any jobs defined on this SchedulerFactoryBean should overwrite
* existing job definitions. Default is "false", to not overwrite already
...
...
@@ -202,7 +211,9 @@ public abstract class SchedulerAccessor implements ResourceLoaderAware {
* manually register a Matcher against the Quartz ListenerManager instead.
* @see org.quartz.JobListener#getName
* @see JobDetailBean#setJobListenerNames
* @deprecated as of Spring 4.0, since it only works on Quartz 1.x
*/
@Deprecated
public
void
setJobListeners
(
JobListener
...
jobListeners
)
{
this
.
jobListeners
=
jobListeners
;
}
...
...
@@ -224,7 +235,9 @@ public abstract class SchedulerAccessor implements ResourceLoaderAware {
* @see org.quartz.TriggerListener#getName
* @see CronTriggerBean#setTriggerListenerNames
* @see SimpleTriggerBean#setTriggerListenerNames
* @deprecated as of Spring 4.0, since it only works on Quartz 1.x
*/
@Deprecated
public
void
setTriggerListeners
(
TriggerListener
...
triggerListeners
)
{
this
.
triggerListeners
=
triggerListeners
;
}
...
...
spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerAccessorBean.java
浏览文件 @
24030a3f
...
...
@@ -30,6 +30,7 @@ import org.springframework.beans.factory.ListableBeanFactory;
* triggers and listeners on a given {@link org.quartz.Scheduler} instance.
*
* <p>Compatible with Quartz 1.8 as well as Quartz 2.0-2.2, as of Spring 4.0.
* <b>Note:</b> Quartz 1.x support is deprecated - please upgrade to Quartz 2.0+.
*
* @author Juergen Hoeller
* @since 2.5.6
...
...
spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerFactoryBean.java
浏览文件 @
24030a3f
...
...
@@ -76,6 +76,7 @@ import org.springframework.util.CollectionUtils;
* Alternatively, you may add transactional advice for the Scheduler itself.
*
* <p>Compatible with Quartz 1.8 as well as Quartz 2.0-2.2, as of Spring 4.0.
* <b>Note:</b> Quartz 1.x support is deprecated - please upgrade to Quartz 2.0+.
*
* @author Juergen Hoeller
* @since 18.02.2004
...
...
@@ -454,10 +455,8 @@ public class SchedulerFactoryBean extends SchedulerAccessor implements FactoryBe
this
.
resourceLoader
=
this
.
applicationContext
;
}
// Create SchedulerFactory instance.
SchedulerFactory
schedulerFactory
=
(
SchedulerFactory
)
BeanUtils
.
instantiateClass
(
this
.
schedulerFactoryClass
);
// Create SchedulerFactory instance...
SchedulerFactory
schedulerFactory
=
BeanUtils
.
instantiateClass
(
this
.
schedulerFactoryClass
);
initSchedulerFactory
(
schedulerFactory
);
if
(
this
.
resourceLoader
!=
null
)
{
...
...
@@ -520,9 +519,7 @@ public class SchedulerFactoryBean extends SchedulerAccessor implements FactoryBe
* Load and/or apply Quartz properties to the given SchedulerFactory.
* @param schedulerFactory the SchedulerFactory to initialize
*/
private
void
initSchedulerFactory
(
SchedulerFactory
schedulerFactory
)
throws
SchedulerException
,
IOException
{
private
void
initSchedulerFactory
(
SchedulerFactory
schedulerFactory
)
throws
SchedulerException
,
IOException
{
if
(!(
schedulerFactory
instanceof
StdSchedulerFactory
))
{
if
(
this
.
configLocation
!=
null
||
this
.
quartzProperties
!=
null
||
this
.
taskExecutor
!=
null
||
this
.
dataSource
!=
null
)
{
...
...
spring-context-support/src/main/java/org/springframework/scheduling/quartz/SimpleTriggerBean.java
浏览文件 @
24030a3f
...
...
@@ -112,7 +112,9 @@ public class SimpleTriggerBean extends SimpleTrigger
* by the TriggerListener implementation.
* @see SchedulerFactoryBean#setTriggerListeners
* @see org.quartz.TriggerListener#getName
* @deprecated as of Spring 4.0, since it only works on Quartz 1.x
*/
@Deprecated
public
void
setTriggerListenerNames
(
String
...
names
)
{
for
(
String
name
:
names
)
{
addTriggerListener
(
name
);
...
...
spring-context-support/src/main/java/org/springframework/scheduling/quartz/SpringBeanJobFactory.java
浏览文件 @
24030a3f
...
...
@@ -38,6 +38,7 @@ import org.springframework.util.ReflectionUtils;
* is by default simply ignored. This is analogous to QuartzJobBean's behavior.
*
* <p>Compatible with Quartz 1.8 as well as Quartz 2.0-2.2, as of Spring 4.0.
* <b>Note:</b> Quartz 1.x support is deprecated - please upgrade to Quartz 2.0+.
*
* @author Juergen Hoeller
* @since 2.0
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录