use of com.dangdang.ddframe.rdb.transaction.soft.datasource.impl.RdbTransactionLogDataSource in project sharding-jdbc by dangdangdotcom.
the class TransactionLogStorageFactoryTest method assertCreateRdbTransactionLogStorageFactory.
@Test
public void assertCreateRdbTransactionLogStorageFactory() {
DataSource dataSource = mock(DataSource.class);
TransactionLogDataSource transactionLogDataSource = new RdbTransactionLogDataSource(dataSource);
assertThat(TransactionLogStorageFactory.createTransactionLogStorage(transactionLogDataSource), instanceOf(TransactionLogStorage.class));
}
use of com.dangdang.ddframe.rdb.transaction.soft.datasource.impl.RdbTransactionLogDataSource in project sharding-jdbc by dangdangdotcom.
the class BestEffortsDeliveryJobFactory method init.
/**
* 初始化作业.
*/
public void init() {
CoordinatorRegistryCenter regCenter = new ZookeeperRegistryCenter(createZookeeperConfiguration(bedConfig));
regCenter.init();
JobScheduler jobScheduler = new JobScheduler(regCenter, createBedJobConfiguration(bedConfig));
jobScheduler.setField("bedConfig", bedConfig);
jobScheduler.setField("transactionLogStorage", TransactionLogStorageFactory.createTransactionLogStorage(new RdbTransactionLogDataSource(bedConfig.getDefaultTransactionLogDataSource())));
jobScheduler.init();
}
Aggregations