use of org.activiti.engine.impl.persistence.GenericManagerFactory in project Activiti by Activiti.
the class ProcessEngineConfigurationImpl method initSessionFactories.
// session factories ////////////////////////////////////////////////////////
protected void initSessionFactories() {
if (sessionFactories == null) {
sessionFactories = new HashMap<Class<?>, SessionFactory>();
if (dbSqlSessionFactory == null) {
dbSqlSessionFactory = new DbSqlSessionFactory();
}
dbSqlSessionFactory.setDatabaseType(databaseType);
dbSqlSessionFactory.setIdGenerator(idGenerator);
dbSqlSessionFactory.setSqlSessionFactory(sqlSessionFactory);
dbSqlSessionFactory.setDbIdentityUsed(isDbIdentityUsed);
dbSqlSessionFactory.setDbHistoryUsed(isDbHistoryUsed);
dbSqlSessionFactory.setDatabaseTablePrefix(databaseTablePrefix);
dbSqlSessionFactory.setTablePrefixIsSchema(tablePrefixIsSchema);
dbSqlSessionFactory.setDatabaseCatalog(databaseCatalog);
dbSqlSessionFactory.setDatabaseSchema(databaseSchema);
dbSqlSessionFactory.setBulkInsertEnabled(isBulkInsertEnabled, databaseType);
dbSqlSessionFactory.setMaxNrOfStatementsInBulkInsert(maxNrOfStatementsInBulkInsert);
addSessionFactory(dbSqlSessionFactory);
addSessionFactory(new GenericManagerFactory(AttachmentEntityManager.class));
addSessionFactory(new GenericManagerFactory(CommentEntityManager.class));
addSessionFactory(new GenericManagerFactory(DeploymentEntityManager.class));
addSessionFactory(new GenericManagerFactory(ModelEntityManager.class));
addSessionFactory(new GenericManagerFactory(ExecutionEntityManager.class));
addSessionFactory(new GenericManagerFactory(HistoricActivityInstanceEntityManager.class));
addSessionFactory(new GenericManagerFactory(HistoricDetailEntityManager.class));
addSessionFactory(new GenericManagerFactory(HistoricProcessInstanceEntityManager.class));
addSessionFactory(new GenericManagerFactory(HistoricVariableInstanceEntityManager.class));
addSessionFactory(new GenericManagerFactory(HistoricTaskInstanceEntityManager.class));
addSessionFactory(new GenericManagerFactory(HistoricIdentityLinkEntityManager.class));
addSessionFactory(new GenericManagerFactory(IdentityInfoEntityManager.class));
addSessionFactory(new GenericManagerFactory(IdentityLinkEntityManager.class));
addSessionFactory(new GenericManagerFactory(JobEntityManager.class));
addSessionFactory(new GenericManagerFactory(ProcessDefinitionEntityManager.class));
addSessionFactory(new GenericManagerFactory(ProcessDefinitionInfoEntityManager.class));
addSessionFactory(new GenericManagerFactory(PropertyEntityManager.class));
addSessionFactory(new GenericManagerFactory(ResourceEntityManager.class));
addSessionFactory(new GenericManagerFactory(ByteArrayEntityManager.class));
addSessionFactory(new GenericManagerFactory(TableDataManager.class));
addSessionFactory(new GenericManagerFactory(TaskEntityManager.class));
addSessionFactory(new GenericManagerFactory(VariableInstanceEntityManager.class));
addSessionFactory(new GenericManagerFactory(EventSubscriptionEntityManager.class));
addSessionFactory(new GenericManagerFactory(EventLogEntryEntityManager.class));
addSessionFactory(new DefaultHistoryManagerSessionFactory());
addSessionFactory(new UserEntityManagerFactory());
addSessionFactory(new GroupEntityManagerFactory());
addSessionFactory(new MembershipEntityManagerFactory());
}
if (customSessionFactories != null) {
for (SessionFactory sessionFactory : customSessionFactories) {
addSessionFactory(sessionFactory);
}
}
}
Aggregations