ConfigurationBuilder builder = new ConfigurationBuilder();
//the recovery cache should not participate in main cache's transactions, especially because removals
// from this cache are executed in the context of a finalised transaction and cause issues.
builder.transaction().transactionMode(TransactionMode.NON_TRANSACTIONAL);
builder.clustering().cacheMode(CacheMode.LOCAL);
builder.expiration().lifespan(DEFAULT_EXPIRY);
builder.transaction().recovery().disable();
return builder.build();
}
private RecoveryManager buildRecoveryManager(String cacheName, String recoveryCacheName, EmbeddedCacheManager cm, boolean isDefault) {