use of com.google.inject.persist.PersistService in project metacat by Netflix.
the class S3ConnectorFactory method init.
private void init() {
//JPA module
final Map<String, Object> props = Maps.newHashMap(configuration);
props.put("hibernate.connection.datasource", DataSourceManager.get().load(name, configuration).get(name));
final Module jpaModule = new JpaPersistModule("s3").properties(props);
final Module s3Module = new S3Module(name, configuration, infoConverter);
final Injector injector = Guice.createInjector(jpaModule, s3Module);
persistService = injector.getInstance(PersistService.class);
persistService.start();
this.databaseService = injector.getInstance(ConnectorDatabaseService.class);
this.tableService = injector.getInstance(ConnectorTableService.class);
this.partitionService = injector.getInstance(ConnectorPartitionService.class);
}
Aggregations