use of com.dangdang.ddframe.job.event.JobEventConfiguration in project elastic-job by dangdangdotcom.
the class JavaMain method main.
// CHECKSTYLE:OFF
public static void main(final String[] args) throws IOException {
// CHECKSTYLE:ON
EmbedZookeeperServer.start(EMBED_ZOOKEEPER_PORT);
CoordinatorRegistryCenter regCenter = setUpRegistryCenter();
JobEventConfiguration jobEventConfig = new JobEventRdbConfiguration(setUpEventTraceDataSource());
setUpSimpleJob(regCenter, jobEventConfig);
setUpDataflowJob(regCenter, jobEventConfig);
setUpScriptJob(regCenter, jobEventConfig);
}
use of com.dangdang.ddframe.job.event.JobEventConfiguration in project loc-framework by lord-of-code.
the class LocElasticJobAutoConfiguration method init.
private void init() {
LocElasticJobProperties elasticJobProperties = resolverJobProperties();
String[] jobs = this.applicationContext.getBeanNamesForAnnotation(LocElasticJob.class);
ZookeeperRegistryCenter registryCenter = registerCenter(elasticJobProperties);
JobEventConfiguration jobEventConfiguration = Optional.ofNullable(Strings.emptyToNull(elasticJobProperties.getDataSource())).map(s -> new JobEventRdbConfiguration(applicationContext.getBean(s + "Ds", DataSource.class))).orElse(null);
createBean(registryCenter, jobEventConfiguration, jobs);
}
Aggregations