private void transactionManagerLookup(final Config conf) { eh.addTransactionManagerLookup( newFactory("ehcache.transactionManagerLookup", conf, FactoryConfiguration::new) ); }
/** * Builder to add a transaction manager lookup class to the cache manager, only one of these can be added. * * @param transactionManagerLookupParameter * the transaction manager lookup class to use * @return this configuration instance * @throws ObjectExistsException * if the transaction manager lookup has already been configured */ public final Configuration transactionManagerLookup(FactoryConfiguration transactionManagerLookupParameter) throws ObjectExistsException { addTransactionManagerLookup(transactionManagerLookupParameter); return this; }
/** * Builder to add a transaction manager lookup class to the cache manager, only one of these can be added. * * @param transactionManagerLookupParameter * the transaction manager lookup class to use * @return this configuration instance * @throws ObjectExistsException * if the transaction manager lookup has already been configured */ public final Configuration transactionManagerLookup(FactoryConfiguration transactionManagerLookupParameter) throws ObjectExistsException { addTransactionManagerLookup(transactionManagerLookupParameter); return this; }
/** * Builder to add a transaction manager lookup class to the cache manager, only one of these can be added. * * @param transactionManagerLookupParameter * the transaction manager lookup class to use * @return this configuration instance * @throws ObjectExistsException * if the transaction manager lookup has already been configured */ public final Configuration transactionManagerLookup(FactoryConfiguration transactionManagerLookupParameter) throws ObjectExistsException { addTransactionManagerLookup(transactionManagerLookupParameter); return this; }
/** * Builder to add a transaction manager lookup class to the cache manager, only one of these can be added. * * @param transactionManagerLookupParameter * the transaction manager lookup class to use * @return this configuration instance * @throws ObjectExistsException * if the transaction manager lookup has already been configured */ public final Configuration transactionManagerLookup(FactoryConfiguration transactionManagerLookupParameter) throws ObjectExistsException { addTransactionManagerLookup(transactionManagerLookupParameter); return this; }
private void transactionManagerLookup(final Config conf) { eh.addTransactionManagerLookup( newFactory("ehcache.transactionManagerLookup", conf, FactoryConfiguration::new) ); }
@Override public void start() { try { final Configuration configuration = ConfigurationFactory.parseConfiguration( config.getUrl() ); if ( jtaPlatform != null ) { OgmTransactionManagerLookupDelegate.transactionManager = jtaPlatform.retrieveTransactionManager(); final FactoryConfiguration transactionManagerLookupParameter = new FactoryConfiguration(); transactionManagerLookupParameter.setClass( OgmTransactionManagerLookupDelegate.class.getName() ); configuration.addTransactionManagerLookup( transactionManagerLookupParameter ); } cacheManager = CacheManager.create( config.getUrl() ); } catch (Exception e) { // Wrap Exception in a ServiceException to make the stack trace more friendly // Otherwise a generic unable to request service is thrown throw logger.unableToStartDatastoreProvider( e ); } }