Flowable 6.6.0 BPMN用户指南-(2)配置 - 2.9 作业执行器/2.10 作业执行器激活

Flowable 6.6.0 用户指南相关文档下载


《Flowable 6.6.0 BPMN用户指南》

2. 配置

有关Flowable文档的其他资料,参见:

《Flowable文档大全》

2.9 作业执行器(Job Executor)(从6.0.0版起)

The async executor of Flowable v5 is the only available job executor in Flowable V6, as it is a more performant and more database friendly way of executing asynchronous jobs in the Flowable engine. The old job executor of Flowable 5 is no longer available in V6. More information can be found in the advanced section of the user guide.

Additionally, if running under Java EE 7, JSR-236 compliant ManagedAsyncJobExecutor can be used for letting the container manage the threads. In order to enable them, the thread factory should be passed in the configuration as follows:

Flowable V5的异步执行器(async executor)是Flowable V6中唯一可用的作业执行器,因为它是在Flowable引擎中执行异步作业的更高性能和数据库更友好的方式。Flowable 5旧的作业执行器在V6中不再可用。更多信息可在用户指南的高级部分找到。

另外,如果运行在Java EE 7下,JSR-236兼容的ManagedAsyncJobExecutor可用于让容器管理线程。为了启用ManagedAsyncJobExecutor,应该在配置中传递线程工厂(thread factory),如下所示:

<bean id="threadFactory" class="org.springframework.jndi.JndiObjectFactoryBean">
   <property name="jndiName" value="java:jboss/ee/concurrency/factory/default" />
</bean>

<bean id="customJobExecutor" class="org.flowable.engine.impl.jobexecutor.ManagedAsyncJobExecutor">
   <!-- ... -->
   <property name="threadFactory" ref="threadFactory" />
   <!-- ... -->
</bean>

The managed implementations fall back to their default counterparts if the thread factory is not specified.

如果未指定线程工厂,则被管实现将返回到其默认的对应实现。

2.10 作业执行器激活(Job executor activation)

The AsyncExecutor is a component that manages a thread pool to fire timers and other asynchronous tasks. Other implementations are possible (for example using a message queue, see the advanced section of the user guide).

By default, the AsyncExecutor is not activated and not started. With the following configuration the async executor can be started together with the Flowable Engine.

The property asyncExecutorActivate instructs the Flowable engine to start the Async executor at startup.
AsyncExecutor是一个组件(component),它管理一个线程池以激发定时器和其他异步任务。也存在其他实现方式(例如使用消息队列,请参阅用户指南的高级部分)。

默认情况下,AsyncExecutor不会被激活也不会启动。通过以下配置,异步执行器可以与Flowable Engine一起启动。

属性asyncExecutorActivate指示Flowable引擎在启动(startup)时启动异步执行器。

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

月满闲庭

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值