use of edu.uiuc.ncsa.security.delegation.storage.impl.TransactionMemoryStore in project OA4MP by ncsa.
the class AbstractConfigurationLoader method getTSP.
protected Provider<TransactionStore> getTSP() {
if (tsp == null) {
final DSTransactionProvider tp = new DSTransactionProvider<OA4MPServiceTransaction>();
TransactionConverter<OA4MPServiceTransaction> tc = new TransactionConverter(tp, getTokenForgeProvider().get(), (ClientStore<? extends Client>) getCSP().get());
MultiDSTransactionStoreProvider storeProvider = new MultiDSTransactionStoreProvider(cn, isDefaultStoreDisabled(), loggerProvider.get(), tp);
storeProvider.addListener(new DSSQLTransactionStoreProvider(cn, getMySQLConnectionPoolProvider(), OA4MPConfigTags.MYSQL_STORE, getCSP(), tp, getTokenForgeProvider(), tc));
storeProvider.addListener(new DSSQLTransactionStoreProvider(cn, getMariaDBConnectionPoolProvider(), OA4MPConfigTags.MARIADB_STORE, getCSP(), tp, getTokenForgeProvider(), tc));
storeProvider.addListener(new DSSQLTransactionStoreProvider(cn, getPgConnectionPoolProvider(), OA4MPConfigTags.POSTGRESQL_STORE, getCSP(), tp, getTokenForgeProvider(), tc));
storeProvider.addListener(new DSFSTransactionStoreProvider(cn, tp, getTokenForgeProvider(), tc));
storeProvider.addListener(new TypedProvider<TransactionStore>(cn, OA4MPConfigTags.MEMORY_STORE, OA4MPConfigTags.TRANSACTIONS_STORE) {
@Override
public Object componentFound(CfgEvent configurationEvent) {
if (checkEvent(configurationEvent)) {
return get();
}
return null;
}
@Override
public TransactionStore get() {
return new TransactionMemoryStore(tp);
}
});
tsp = storeProvider;
}
return tsp;
}
Aggregations