use of org.springframework.context.annotation.Bean in project Activiti by Activiti.
the class ActivitiEngineConfiguration method processEngineConfiguration.
@Bean(name = "processEngineConfiguration")
public ProcessEngineConfigurationImpl processEngineConfiguration() {
SpringProcessEngineConfiguration processEngineConfiguration = new SpringProcessEngineConfiguration();
processEngineConfiguration.setDataSource(dataSource());
processEngineConfiguration.setDatabaseSchemaUpdate(ProcessEngineConfiguration.DB_SCHEMA_UPDATE_TRUE);
processEngineConfiguration.setTransactionManager(annotationDrivenTransactionManager());
processEngineConfiguration.setJobExecutorActivate(false);
processEngineConfiguration.setAsyncExecutorEnabled(true);
processEngineConfiguration.setAsyncExecutorActivate(false);
processEngineConfiguration.setHistoryLevel(HistoryLevel.FULL);
return processEngineConfiguration;
}
use of org.springframework.context.annotation.Bean in project Activiti by Activiti.
the class ActivitiEngineConfiguration method dataSource.
@Bean
public DataSource dataSource() {
SimpleDriverDataSource ds = new SimpleDriverDataSource();
ds.setDriverClass(org.h2.Driver.class);
// Connection settings
ds.setUrl("jdbc:h2:mem:activiti;DB_CLOSE_DELAY=1000");
ds.setUsername("sa");
return ds;
}
use of org.springframework.context.annotation.Bean in project Activiti by Activiti.
the class DatabaseConfiguration method dataSource.
@Bean
public DataSource dataSource() {
SimpleDriverDataSource ds = new SimpleDriverDataSource();
ds.setDriverClass(org.h2.Driver.class);
// Connection settings
ds.setUrl("jdbc:h2:mem:activiti;DB_CLOSE_DELAY=1000");
ds.setUsername("sa");
return ds;
}
use of org.springframework.context.annotation.Bean in project Activiti by Activiti.
the class DatabaseConfiguration method annotationDrivenTransactionManager.
@Bean(name = "transactionManager")
public PlatformTransactionManager annotationDrivenTransactionManager() {
JpaTransactionManager transactionManager = new JpaTransactionManager();
transactionManager.setEntityManagerFactory(entityManagerFactory());
return transactionManager;
}
use of org.springframework.context.annotation.Bean in project Activiti by Activiti.
the class DatabaseInititializer method dataSourceInitializer.
@Bean
public DataSourceInitializer dataSourceInitializer() {
DataSourceInitializer initializer = new DataSourceInitializer();
initializer.setDataSource(dataSource);
initializer.setDatabasePopulator(databasePopulator());
return initializer;
}
Aggregations