@Test public void camundaDataSourceTest() { DataSource camundaDatasourceMock = mock(DataSource.class); defaultDatasourceConfiguration.camundaDataSource = camundaDatasourceMock; defaultDatasourceConfiguration.dataSource = mock(DataSource.class); defaultDatasourceConfiguration.preInit(configuration); assertSame(camundaDatasourceMock, getDataSourceFromConfiguration()); }
@Override public void preInit(SpringProcessEngineConfiguration configuration) { final DatabaseProperty database = camundaBpmProperties.getDatabase(); configuration.setTransactionManager(transactionManager); if (camundaDataSource == null) { configuration.setDataSource(dataSource); } else { configuration.setDataSource(camundaDataSource); } configuration.setDatabaseType(database.getType()); configuration.setDatabaseSchemaUpdate(database.getSchemaUpdate()); if (!StringUtils.isEmpty(database.getTablePrefix())) { configuration.setDatabaseTablePrefix(database.getTablePrefix()); } if(!StringUtils.isEmpty(database.getSchemaName())) { configuration.setDatabaseSchema(database.getSchemaName()); } configuration.setJdbcBatchProcessing(database.isJdbcBatchProcessing()); }
DefaultDatasourceConfiguration extends AbstractCamundaConfiguration implements CamundaDatasourceConfiguration { @Override public void preInit(SpringProcessEngineConfiguration configuration) { final DatabaseProperty database = camundaBpmProperties.getDatabase(); configuration.setTransactionManager(transactionManager); if (camundaDataSource == null) { configuration.setDataSource(dataSource); } else { configuration.setDataSource(camundaDataSource); } configuration.setDatabaseType(database.getType()); configuration.setDatabaseSchemaUpdate(database.getSchemaUpdate()); if (!StringUtils.isEmpty(database.getTablePrefix())) { configuration.setDatabaseTablePrefix(database.getTablePrefix()); } if(!StringUtils.isEmpty(database.getSchemaName())) { configuration.setDatabaseSchema(database.getSchemaName()); } configuration.setJdbcBatchProcessing(database.isJdbcBatchProcessing()); } }
DefaultDatasourceConfiguration extends AbstractCamundaConfiguration implements CamundaDatasourceConfiguration { @Override public void preInit(SpringProcessEngineConfiguration configuration) { final DatabaseProperty database = camundaBpmProperties.getDatabase(); configuration.setTransactionManager(transactionManager); if (camundaDataSource == null) { configuration.setDataSource(dataSource); } else { configuration.setDataSource(camundaDataSource); } configuration.setDatabaseType(database.getType()); configuration.setDatabaseSchemaUpdate(database.getSchemaUpdate()); if (!StringUtils.isEmpty(database.getTablePrefix())) { configuration.setDatabaseTablePrefix(database.getTablePrefix()); } if(!StringUtils.isEmpty(database.getSchemaName())) { configuration.setDatabaseSchema(database.getSchemaName()); } configuration.setJdbcBatchProcessing(database.isJdbcBatchProcessing()); }  }
DefaultDatasourceConfiguration extends AbstractCamundaConfiguration implements CamundaDatasourceConfiguration { @Override public void preInit(SpringProcessEngineConfiguration configuration) { final DatabaseProperty database = camundaBpmProperties.getDatabase(); configuration.setTransactionManager(transactionManager); if (camundaDataSource == null) { configuration.setDataSource(dataSource); } else { configuration.setDataSource(camundaDataSource); } configuration.setDatabaseType(database.getType()); configuration.setDatabaseSchemaUpdate(database.getSchemaUpdate()); if (!StringUtils.isEmpty(database.getTablePrefix())) { configuration.setDatabaseTablePrefix(database.getTablePrefix()); } if(!StringUtils.isEmpty(database.getSchemaName())) { configuration.setDatabaseSchema(database.getSchemaName()); } configuration.setJdbcBatchProcessing(database.isJdbcBatchProcessing()); }  @Override void preInit(SpringProcessEngineConfiguration configuration); PlatformTransactionManager getTransactionManager(); void setTransactionManager(PlatformTransactionManager transactionManager); DataSource getDataSource(); void setDataSource(DataSource dataSource); DataSource getCamundaDataSource(); void setCamundaDataSource(DataSource camundaDataSource); }
DefaultDatasourceConfiguration extends AbstractCamundaConfiguration implements CamundaDatasourceConfiguration { @Override public void preInit(SpringProcessEngineConfiguration configuration) { final DatabaseProperty database = camundaBpmProperties.getDatabase(); configuration.setTransactionManager(transactionManager); if (camundaDataSource == null) { configuration.setDataSource(dataSource); } else { configuration.setDataSource(camundaDataSource); } configuration.setDatabaseType(database.getType()); configuration.setDatabaseSchemaUpdate(database.getSchemaUpdate()); if (!StringUtils.isEmpty(database.getTablePrefix())) { configuration.setDatabaseTablePrefix(database.getTablePrefix()); } if(!StringUtils.isEmpty(database.getSchemaName())) { configuration.setDatabaseSchema(database.getSchemaName()); } configuration.setJdbcBatchProcessing(database.isJdbcBatchProcessing()); }  @Override void preInit(SpringProcessEngineConfiguration configuration); PlatformTransactionManager getTransactionManager(); void setTransactionManager(PlatformTransactionManager transactionManager); DataSource getDataSource(); void setDataSource(DataSource dataSource); DataSource getCamundaDataSource(); void setCamundaDataSource(DataSource camundaDataSource);  }