Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
熊鹏飞
/
xxljob220
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
21ceb607
authored
Sep 30, 2016
by
xueli.xue
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
更新RM
parent
1fd34a20
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
17 deletions
README.md
xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
README.md
View file @
21ceb607
...
@@ -142,14 +142,22 @@ XXL-JOB是一个轻量级分布式任务调度框架,其核心设计目标是
...
@@ -142,14 +142,22 @@ XXL-JOB是一个轻量级分布式任务调度框架,其核心设计目标是
作用:负责接收“调度中心”的调度并执行;
作用:负责接收“调度中心”的调度并执行;
-
**A:配置
Jdbc链接**
:请在下图所示位置配置jdbc链接地址,链接地址请保持和 2.1章节 所创建的调度数据库的地址一致。
-
**A:配置
“执行器”**
:


1、配置01、JobHandler 扫描路径
2、配置02、执行器端口,默认9999
3、配置03、GlueFactory (启用GLUE任务时才需要, 否则可删除)
4、配置04、XXL-JOB公共数据源 (启用GLUE任务, 且使用 "DbGlueLoader" 作为 "GLUE源码加载器" 时才需要, 否则可删除)
-
**B:配置“执行器”端口**
:由于“调度中心”和“执行器”部署在不同项目,“调度中心”会请求该端口触发任务执行。端口如下
图所示,默认的“执行器”端口是9999,如果与系统现有端口冲突可自行修改,如若不冲突,可忽略。
执行器端口:由于“调度中心”和“执行器”部署在不同项目,“调度中心”会请求该端口触发任务执行。如上
图所示,默认的“执行器”端口是9999,如果与系统现有端口冲突可自行修改,如若不冲突,可忽略。

-
**B:配置Jdbc链接**
:(启用GLUE任务, 且使用 "DbGlueLoader" 作为 "GLUE源码加载器" 时才需要, 否则可忽略)
请在下图所示位置配置jdbc链接地址,链接地址请保持和 2.1章节 所创建的调度数据库的地址一致。

**部署项目**
:如果已经正确进行上述配置,可将项目编译打war包并部署到tomcat中。
**部署项目**
:如果已经正确进行上述配置,可将项目编译打war包并部署到tomcat中。
...
@@ -643,6 +651,11 @@ Tips: 历史版本(V1.3.x)目前已经Release至稳定版本, 进入维护阶段
...
@@ -643,6 +651,11 @@ Tips: 历史版本(V1.3.x)目前已经Release至稳定版本, 进入维护阶段
-
4、调度超时和Handler匹配不到时,调度状态优化;
-
4、调度超时和Handler匹配不到时,调度状态优化;
-
5、因catch异常,导致任务不可终止的问题,给出解决方案, 见文档;
-
5、因catch异常,导致任务不可终止的问题,给出解决方案, 见文档;
#### 6.9 版本 V1.5.0 特性
-
1、调度中心回调逻辑优化, 过滤非法请求;
-
2、公共依赖中新增DBGlueLoader,基于原生jdbc实现GLUE源码的加载器,减少第三方依赖(mybatis,spring-orm等);
-
3、精简和优化执行器测配置(针对GLUE任务),降低上手难度
#### 规划中
#### 规划中
-
1、任务执行规则自定义:假如前一个任务正在执行,后续调度执行规则支持自定义;
-
1、任务执行规则自定义:假如前一个任务正在执行,后续调度执行规则支持自定义;
串行(默认,当前逻辑):后续调度入调度队列;
串行(默认,当前逻辑):后续调度入调度队列;
...
...
xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
View file @
21ceb607
...
@@ -7,33 +7,29 @@
...
@@ -7,33 +7,29 @@
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
>
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
>
<!--
scan job handler
-->
<!--
配置01、JobHandler 扫描路径
-->
<context:component-scan
base-package=
"com.xxl.job.executor"
/>
<context:component-scan
base-package=
"com.xxl.job.executor
.service.jobhandler
"
/>
<!-- 执行器
<!-- 配置02、执行器 -->
……………………………………………………………………………………………………………………
port : 执行器端口号
-->
<bean
id=
"xxlJobExecutor"
class=
"com.xxl.job.core.executor.jetty.XxlJobExecutor"
init-method=
"start"
destroy-method=
"destroy"
>
<bean
id=
"xxlJobExecutor"
class=
"com.xxl.job.core.executor.jetty.XxlJobExecutor"
init-method=
"start"
destroy-method=
"destroy"
>
<!-- 执行器端口号 -->
<property
name=
"port"
value=
"9999"
/>
<property
name=
"port"
value=
"9999"
/>
</bean>
</bean>
<!-- glue factory (开启GLUE任务时才需要, 否则可以删除)
<!-- 配置03、GlueFactory (启用GLUE任务时才需要, 否则可删除) -->
……………………………………………………………………………………………………………………
cacheTimeout : GLUE任务示例缓存失效时间, 单位/ms
glueLoader : GLUE 代码加载器,推荐将该服务配置成RPC服务
dataSource : XXL-JOB公共数据源
-->
<bean
id=
"glueFactory"
class=
"com.xxl.job.core.glue.GlueFactory"
>
<bean
id=
"glueFactory"
class=
"com.xxl.job.core.glue.GlueFactory"
>
<!-- GLUE任务示例缓存失效时间, 单位/ms -->
<property
name=
"cacheTimeout"
value=
"10000"
/>
<property
name=
"cacheTimeout"
value=
"10000"
/>
<!-- GLUE 代码加载器,推荐将该服务配置成RPC服务 -->
<property
name=
"glueLoader"
>
<property
name=
"glueLoader"
>
<bean
class=
"com.xxl.job.core.glue.loader.impl.DbGlueLoader"
>
<bean
class=
"com.xxl.job.core.glue.loader.impl.DbGlueLoader"
>
<!-- XXL-JOB公共数据源 -->
<property
name=
"dataSource"
ref=
"dataSource"
/>
<property
name=
"dataSource"
ref=
"dataSource"
/>
</bean>
</bean>
</property>
</property>
</bean>
</bean>
<!--
XXL-JOB公共数据源 (开启GLUE任务时才需要, 否则可以
删除) -->
<!--
配置04、XXL-JOB公共数据源 (启用GLUE任务, 且使用 "DbGlueLoader" 作为 "GLUE源码加载器" 时才需要, 否则可
删除) -->
<bean
id=
"dataSource"
class=
"com.mchange.v2.c3p0.ComboPooledDataSource"
destroy-method=
"close"
>
<bean
id=
"dataSource"
class=
"com.mchange.v2.c3p0.ComboPooledDataSource"
destroy-method=
"close"
>
<property
name=
"driverClass"
value=
"${c3p0.driverClass}"
/>
<property
name=
"driverClass"
value=
"${c3p0.driverClass}"
/>
<property
name=
"jdbcUrl"
value=
"${c3p0.url}"
/>
<property
name=
"jdbcUrl"
value=
"${c3p0.url}"
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment