flowable EngineConfiguration的作用和继承关系(1)
来源:互联网 发布:巨人网络借壳辽宁成大 编辑:程序博客网 时间:2024/06/03 20:43
EngineConfiguration 是flowable引擎的核心部件。
在 flowable 中,实现引擎配置的顶层类是 AbstractEngineConfiguration
这是一个抽象类。
一、作用
1、第一个作用是配置引擎使用的数据库信息。
protected String databaseType; protected String jdbcDriver = "org.h2.Driver"; protected String jdbcUrl = "jdbc:h2:tcp://localhost/~/flowable"; protected String jdbcUsername = "sa"; protected String jdbcPassword = ""; protected String dataSourceJndiName; protected int jdbcMaxActiveConnections; protected int jdbcMaxIdleConnections; protected int jdbcMaxCheckoutTime; protected int jdbcMaxWaitTime; protected boolean jdbcPingEnabled; protected String jdbcPingQuery; protected int jdbcPingConnectionNotUsedFor; protected int jdbcDefaultTransactionIsolationLevel; protected DataSource dataSource; protected DbSchemaManager dbSchemaManager;
2、第二个作用是提供 数据库表结构初始化状态的行为定义。
public static final String DB_SCHEMA_UPDATE_FALSE = "false"; public static final String DB_SCHEMA_UPDATE_CREATE = "create"; public static final String DB_SCHEMA_UPDATE_CREATE_DROP = "create-drop"; public static final String DB_SCHEMA_UPDATE_DROP_CREATE = "drop-create"; public static final String DB_SCHEMA_UPDATE_TRUE = "true";
3、第三个作用是对mybatis进行封装,提供数据库操作入口
protected DbSqlSessionFactory dbSqlSessionFactory; protected SqlSessionFactory sqlSessionFactory; protected TransactionFactory transactionFactory; protected TransactionContextFactory transactionContextFactory; protected Set<Class<?>> customMybatisMappers; protected Set<String> customMybatisXMLMappers; protected Set<String> dependentEngineMyBatisXmlMappers; protected List<CustomMybatisTypeAliasConfig> dependentEngineMybatisTypeAliasConfigs; protected List<CustomMyBatisTypeHandlerConfig> dependentEngineMybatisTypeHandlerConfigs; protected List<SessionFactory> customSessionFactories; protected Map<Class<?>, SessionFactory> sessionFactories; protected boolean enableEventDispatcher = true; protected FlowableEventDispatcher eventDispatcher; protected List<FlowableEventListener> eventListeners; protected Map<String, List<FlowableEventListener>> typedEventListeners; protected List<EventDispatchAction> additionalEventDispatchActions; protected boolean transactionsExternallyManaged;
4、第四个作用 是提供sql执行上下文环境和执行队列
protected CommandExecutor commandExecutor; protected Collection<? extends CommandInterceptor> defaultCommandInterceptors; protected CommandConfig defaultCommandConfig; protected CommandConfig schemaCommandConfig; protected CommandContextFactory commandContextFactory; protected CommandInterceptor commandInvoker; protected List<CommandInterceptor> customPreCommandInterceptors; protected List<CommandInterceptor> customPostCommandInterceptors; protected List<CommandInterceptor> commandInterceptors;
5、第五个作用是完成引擎内部服务的配置和初始化,并构建引擎实例
通过调用相应的方法,获得每个引擎。
formEngineConfiguration.buildFormEngine();idmEngineConfiguration.buildIdmEngine();dmnEngineConfiguration.buildDmnEngine();contentEngineConfiguration.buildContentEngine();processEngineConfiguration.buildProcessEngine();
当然,在调用这个方法之前,需要进行设定适当的参数。
二、继承关系
三、分类
根据用途分为五类:
1、内容引擎配置
ContentEngineConfiguration
2、流程引擎配置
ProcessEngineConfiguration
3、身份引擎配置
IdmEngineConfiguration
4、决策引擎配置
DmnEngineConfiguration
5、表单引擎配置
FormEngineConfiguration
除了流程引擎配置外,其他的引擎配置类都提供了两种不同的配置,包括支持Spring的引擎配置类和独立的引擎配置类。
独立的引擎配置类又被扩展支持内存类型的引擎配置类。
这些继承了 AbstractEngineConfig 类的引擎配置类,定制不同的数据库使用模式(单租户、多租户、单数据库、多数据库)、mybatis配置文件、事务的处理、资源的获取等。
阅读全文
0 0
- flowable EngineConfiguration的作用和继承关系(1)
- flowable EngineConfiguration的实现分析(2)
- flowable ContentEngine和ContentEngineConfiguration的关系
- Spring 中 bean 之间的关系:parent(继承) 和 depends-on (依赖)作用是什么?
- Rxjava2源码分析(一):Flowable的创建和基本使用过程分析
- 组合和继承的关系
- 协议和继承的关系
- 继承和协议的关系
- 继承和组合的关系
- flowable DmnEngine和DmnEngineConfiguration
- flowable FormEngine和FormEngineConfiguration
- flowable IdmEngine和IdmEngineConfiguration
- flowable ProcessEngine和ProcessEngineConfiguration
- flowable 五个引擎和组成引擎的服务
- rxjava2的Flowable使用方法
- Flowable
- Spring配置--Bean之间的关系(继承和依赖)
- 第12周-多继承、虚基类,继承和组合-项目4-点、圆的关系(1)
- adb 常用命令
- 菜鸟的第三篇日志
- UVA 1586 Molar mass
- Spring-AOP和事务实践(注解方式
- scrapy安装及PyCharm的scrapy配置
- flowable EngineConfiguration的作用和继承关系(1)
- 在线视频解析下载教程合集(值得收藏)
- 【dp】树形dp真好玩,hdu6035多校第一场的 colorful tree
- 单链表的增删查改等操作实现
- 浅谈逻辑回归
- G药--链表--增、删
- poj1191 [NOI1999] 棋盘分割(dp)
- 2、volley 官方教程-发送一个简单的请求
- Linux下g++/gdb的简单安装和vim的配置