/** * Tries to load the class specified. * * @return If there is none returns null. * @param cacheManager */ public final CacheManagerEventListener createCacheManagerEventListener(CacheManager cacheManager) throws CacheException { String className = null; FactoryConfiguration cacheManagerEventListenerFactoryConfiguration = configuration.getCacheManagerEventListenerFactoryConfiguration(); if (cacheManagerEventListenerFactoryConfiguration != null) { className = cacheManagerEventListenerFactoryConfiguration.getFullyQualifiedClassPath(); } if (className == null || className.length() == 0) { LOG.debug("No CacheManagerEventListenerFactory class specified. Skipping..."); return null; } else { CacheManagerEventListenerFactory factory = (CacheManagerEventListenerFactory) ClassLoaderUtil.createNewInstance(loader, className); Properties properties = PropertyUtil.parseProperties(cacheManagerEventListenerFactoryConfiguration.properties, cacheManagerEventListenerFactoryConfiguration.getPropertySeparator()); return factory.createCacheManagerEventListener(cacheManager, properties); } }
/** * Tries to load the class specified otherwise defaults to null */ public Map<String, CacheManagerPeerListener> createCachePeerListeners() { String className = null; Map<String, CacheManagerPeerListener> cacheManagerPeerListeners = new HashMap<String, CacheManagerPeerListener>(); List<FactoryConfiguration> cacheManagerPeerListenerFactoryConfigurations = configuration.getCacheManagerPeerListenerFactoryConfigurations(); boolean first = true; for (FactoryConfiguration factoryConfiguration : cacheManagerPeerListenerFactoryConfigurations) { if (factoryConfiguration != null) { className = factoryConfiguration.getFullyQualifiedClassPath(); } if (className == null) { LOG.debug("No CachePeerListenerFactoryConfiguration specified. Not configuring a CacheManagerPeerListener."); return null; } else { CacheManagerPeerListenerFactory cacheManagerPeerListenerFactory = (CacheManagerPeerListenerFactory) ClassLoaderUtil.createNewInstance(loader, className); Properties properties = PropertyUtil.parseProperties(factoryConfiguration.getProperties(), factoryConfiguration.getPropertySeparator()); CacheManagerPeerListener cacheManagerPeerListener = cacheManagerPeerListenerFactory.createCachePeerListener(cacheManager, properties); cacheManagerPeerListeners.put(cacheManagerPeerListener.getScheme(), cacheManagerPeerListener); } } return cacheManagerPeerListeners; }
/** * Tries to load the class specified otherwise defaults to null * * @return a map of CacheManagerPeerProviders */ public Map<String, CacheManagerPeerProvider> createCachePeerProviders() { String className = null; Map<String, CacheManagerPeerProvider> cacheManagerPeerProviders = new HashMap<String, CacheManagerPeerProvider>(); List<FactoryConfiguration> cachePeerProviderFactoryConfiguration = configuration.getCacheManagerPeerProviderFactoryConfiguration(); for (FactoryConfiguration factoryConfiguration : cachePeerProviderFactoryConfiguration) { if (factoryConfiguration != null) { className = factoryConfiguration.getFullyQualifiedClassPath(); } if (className == null) { LOG.debug("No CachePeerProviderFactoryConfiguration specified. Not configuring a CacheManagerPeerProvider."); return null; } else { CacheManagerPeerProviderFactory cacheManagerPeerProviderFactory = (CacheManagerPeerProviderFactory) ClassLoaderUtil.createNewInstance(loader, className); Properties properties = PropertyUtil.parseProperties(factoryConfiguration.getProperties(), factoryConfiguration.getPropertySeparator()); CacheManagerPeerProvider cacheManagerPeerProvider = cacheManagerPeerProviderFactory.createCachePeerProvider(cacheManager, properties); cacheManagerPeerProviders.put(cacheManagerPeerProvider.getScheme(), cacheManagerPeerProvider); } } return cacheManagerPeerProviders; }
try { Properties properties = PropertyUtil.parseProperties(lookupConfiguration.getProperties(), lookupConfiguration.getPropertySeparator());
private void init() { if (factoryConfiguration == null) { return; } addAttribute(new SimpleNodeAttribute("class", factoryConfiguration.getFullyQualifiedClassPath()).optional(false)); addAttribute(new SimpleNodeAttribute("properties", factoryConfiguration.getProperties()).optional(true)); addAttribute(new SimpleNodeAttribute("propertySeparator", factoryConfiguration.getPropertySeparator()).optional(true)); }
/** * Tries to load the class specified. * * @return If there is none returns null. * @param cacheManager */ public final CacheManagerEventListener createCacheManagerEventListener(CacheManager cacheManager) throws CacheException { String className = null; FactoryConfiguration cacheManagerEventListenerFactoryConfiguration = configuration.getCacheManagerEventListenerFactoryConfiguration(); if (cacheManagerEventListenerFactoryConfiguration != null) { className = cacheManagerEventListenerFactoryConfiguration.getFullyQualifiedClassPath(); } if (className == null || className.length() == 0) { LOG.debug("No CacheManagerEventListenerFactory class specified. Skipping..."); return null; } else { CacheManagerEventListenerFactory factory = (CacheManagerEventListenerFactory) ClassLoaderUtil.createNewInstance(loader, className); Properties properties = PropertyUtil.parseProperties(cacheManagerEventListenerFactoryConfiguration.properties, cacheManagerEventListenerFactoryConfiguration.getPropertySeparator()); return factory.createCacheManagerEventListener(cacheManager, properties); } }
/** * Tries to load the class specified. * * @return If there is none returns null. * @param cacheManager */ public final CacheManagerEventListener createCacheManagerEventListener(CacheManager cacheManager) throws CacheException { String className = null; FactoryConfiguration cacheManagerEventListenerFactoryConfiguration = configuration.getCacheManagerEventListenerFactoryConfiguration(); if (cacheManagerEventListenerFactoryConfiguration != null) { className = cacheManagerEventListenerFactoryConfiguration.getFullyQualifiedClassPath(); } if (className == null || className.length() == 0) { LOG.debug("No CacheManagerEventListenerFactory class specified. Skipping..."); return null; } else { CacheManagerEventListenerFactory factory = (CacheManagerEventListenerFactory) ClassLoaderUtil.createNewInstance(loader, className); Properties properties = PropertyUtil.parseProperties(cacheManagerEventListenerFactoryConfiguration.properties, cacheManagerEventListenerFactoryConfiguration.getPropertySeparator()); return factory.createCacheManagerEventListener(cacheManager, properties); } }
/** * Tries to load the class specified. * * @return If there is none returns null. * @param cacheManager */ public final CacheManagerEventListener createCacheManagerEventListener(CacheManager cacheManager) throws CacheException { String className = null; FactoryConfiguration cacheManagerEventListenerFactoryConfiguration = configuration.getCacheManagerEventListenerFactoryConfiguration(); if (cacheManagerEventListenerFactoryConfiguration != null) { className = cacheManagerEventListenerFactoryConfiguration.getFullyQualifiedClassPath(); } if (className == null || className.length() == 0) { LOG.debug("No CacheManagerEventListenerFactory class specified. Skipping..."); return null; } else { CacheManagerEventListenerFactory factory = (CacheManagerEventListenerFactory) ClassLoaderUtil.createNewInstance(className); Properties properties = PropertyUtil.parseProperties(cacheManagerEventListenerFactoryConfiguration.properties, cacheManagerEventListenerFactoryConfiguration.getPropertySeparator()); return factory.createCacheManagerEventListener(cacheManager, properties); } }
/** * Tries to load the class specified otherwise defaults to null */ public Map<String, CacheManagerPeerListener> createCachePeerListeners() { String className = null; Map<String, CacheManagerPeerListener> cacheManagerPeerListeners = new HashMap<String, CacheManagerPeerListener>(); List<FactoryConfiguration> cacheManagerPeerListenerFactoryConfigurations = configuration.getCacheManagerPeerListenerFactoryConfigurations(); boolean first = true; for (FactoryConfiguration factoryConfiguration : cacheManagerPeerListenerFactoryConfigurations) { if (factoryConfiguration != null) { className = factoryConfiguration.getFullyQualifiedClassPath(); } if (className == null) { LOG.debug("No CachePeerListenerFactoryConfiguration specified. Not configuring a CacheManagerPeerListener."); return null; } else { CacheManagerPeerListenerFactory cacheManagerPeerListenerFactory = (CacheManagerPeerListenerFactory) ClassLoaderUtil.createNewInstance(loader, className); Properties properties = PropertyUtil.parseProperties(factoryConfiguration.getProperties(), factoryConfiguration.getPropertySeparator()); CacheManagerPeerListener cacheManagerPeerListener = cacheManagerPeerListenerFactory.createCachePeerListener(cacheManager, properties); cacheManagerPeerListeners.put(cacheManagerPeerListener.getScheme(), cacheManagerPeerListener); } } return cacheManagerPeerListeners; }
/** * Tries to load the class specified otherwise defaults to null */ public Map<String, CacheManagerPeerListener> createCachePeerListeners() { String className = null; Map<String, CacheManagerPeerListener> cacheManagerPeerListeners = new HashMap<String, CacheManagerPeerListener>(); List<FactoryConfiguration> cacheManagerPeerListenerFactoryConfigurations = configuration.getCacheManagerPeerListenerFactoryConfigurations(); boolean first = true; for (FactoryConfiguration factoryConfiguration : cacheManagerPeerListenerFactoryConfigurations) { if (factoryConfiguration != null) { className = factoryConfiguration.getFullyQualifiedClassPath(); } if (className == null) { LOG.debug("No CachePeerListenerFactoryConfiguration specified. Not configuring a CacheManagerPeerListener."); return null; } else { CacheManagerPeerListenerFactory cacheManagerPeerListenerFactory = (CacheManagerPeerListenerFactory) ClassLoaderUtil.createNewInstance(className); Properties properties = PropertyUtil.parseProperties(factoryConfiguration.getProperties(), factoryConfiguration.getPropertySeparator()); CacheManagerPeerListener cacheManagerPeerListener = cacheManagerPeerListenerFactory.createCachePeerListener(cacheManager, properties); cacheManagerPeerListeners.put(cacheManagerPeerListener.getScheme(), cacheManagerPeerListener); } } return cacheManagerPeerListeners; }
/** * Tries to load the class specified otherwise defaults to null */ public Map<String, CacheManagerPeerListener> createCachePeerListeners() { String className = null; Map<String, CacheManagerPeerListener> cacheManagerPeerListeners = new HashMap<String, CacheManagerPeerListener>(); List<FactoryConfiguration> cacheManagerPeerListenerFactoryConfigurations = configuration.getCacheManagerPeerListenerFactoryConfigurations(); boolean first = true; for (FactoryConfiguration factoryConfiguration : cacheManagerPeerListenerFactoryConfigurations) { if (factoryConfiguration != null) { className = factoryConfiguration.getFullyQualifiedClassPath(); } if (className == null) { LOG.debug("No CachePeerListenerFactoryConfiguration specified. Not configuring a CacheManagerPeerListener."); return null; } else { CacheManagerPeerListenerFactory cacheManagerPeerListenerFactory = (CacheManagerPeerListenerFactory) ClassLoaderUtil.createNewInstance(loader, className); Properties properties = PropertyUtil.parseProperties(factoryConfiguration.getProperties(), factoryConfiguration.getPropertySeparator()); CacheManagerPeerListener cacheManagerPeerListener = cacheManagerPeerListenerFactory.createCachePeerListener(cacheManager, properties); cacheManagerPeerListeners.put(cacheManagerPeerListener.getScheme(), cacheManagerPeerListener); } } return cacheManagerPeerListeners; }
/** * Tries to load the class specified otherwise defaults to null * * @return a map of CacheManagerPeerProviders */ public Map<String, CacheManagerPeerProvider> createCachePeerProviders() { String className = null; Map<String, CacheManagerPeerProvider> cacheManagerPeerProviders = new HashMap<String, CacheManagerPeerProvider>(); List<FactoryConfiguration> cachePeerProviderFactoryConfiguration = configuration.getCacheManagerPeerProviderFactoryConfiguration(); for (FactoryConfiguration factoryConfiguration : cachePeerProviderFactoryConfiguration) { if (factoryConfiguration != null) { className = factoryConfiguration.getFullyQualifiedClassPath(); } if (className == null) { LOG.debug("No CachePeerProviderFactoryConfiguration specified. Not configuring a CacheManagerPeerProvider."); return null; } else { CacheManagerPeerProviderFactory cacheManagerPeerProviderFactory = (CacheManagerPeerProviderFactory) ClassLoaderUtil.createNewInstance(loader, className); Properties properties = PropertyUtil.parseProperties(factoryConfiguration.getProperties(), factoryConfiguration.getPropertySeparator()); CacheManagerPeerProvider cacheManagerPeerProvider = cacheManagerPeerProviderFactory.createCachePeerProvider(cacheManager, properties); cacheManagerPeerProviders.put(cacheManagerPeerProvider.getScheme(), cacheManagerPeerProvider); } } return cacheManagerPeerProviders; }
/** * Tries to load the class specified otherwise defaults to null * * @return a map of CacheManagerPeerProviders */ public Map<String, CacheManagerPeerProvider> createCachePeerProviders() { String className = null; Map<String, CacheManagerPeerProvider> cacheManagerPeerProviders = new HashMap<String, CacheManagerPeerProvider>(); List<FactoryConfiguration> cachePeerProviderFactoryConfiguration = configuration.getCacheManagerPeerProviderFactoryConfiguration(); for (FactoryConfiguration factoryConfiguration : cachePeerProviderFactoryConfiguration) { if (factoryConfiguration != null) { className = factoryConfiguration.getFullyQualifiedClassPath(); } if (className == null) { LOG.debug("No CachePeerProviderFactoryConfiguration specified. Not configuring a CacheManagerPeerProvider."); return null; } else { CacheManagerPeerProviderFactory cacheManagerPeerProviderFactory = (CacheManagerPeerProviderFactory) ClassLoaderUtil.createNewInstance(className); Properties properties = PropertyUtil.parseProperties(factoryConfiguration.getProperties(), factoryConfiguration.getPropertySeparator()); CacheManagerPeerProvider cacheManagerPeerProvider = cacheManagerPeerProviderFactory.createCachePeerProvider(cacheManager, properties); cacheManagerPeerProviders.put(cacheManagerPeerProvider.getScheme(), cacheManagerPeerProvider); } } return cacheManagerPeerProviders; }
/** * Tries to load the class specified otherwise defaults to null * * @return a map of CacheManagerPeerProviders */ public Map<String, CacheManagerPeerProvider> createCachePeerProviders() { String className = null; Map<String, CacheManagerPeerProvider> cacheManagerPeerProviders = new HashMap<String, CacheManagerPeerProvider>(); List<FactoryConfiguration> cachePeerProviderFactoryConfiguration = configuration.getCacheManagerPeerProviderFactoryConfiguration(); for (FactoryConfiguration factoryConfiguration : cachePeerProviderFactoryConfiguration) { if (factoryConfiguration != null) { className = factoryConfiguration.getFullyQualifiedClassPath(); } if (className == null) { LOG.debug("No CachePeerProviderFactoryConfiguration specified. Not configuring a CacheManagerPeerProvider."); return null; } else { CacheManagerPeerProviderFactory cacheManagerPeerProviderFactory = (CacheManagerPeerProviderFactory) ClassLoaderUtil.createNewInstance(loader, className); Properties properties = PropertyUtil.parseProperties(factoryConfiguration.getProperties(), factoryConfiguration.getPropertySeparator()); CacheManagerPeerProvider cacheManagerPeerProvider = cacheManagerPeerProviderFactory.createCachePeerProvider(cacheManager, properties); cacheManagerPeerProviders.put(cacheManagerPeerProvider.getScheme(), cacheManagerPeerProvider); } } return cacheManagerPeerProviders; }
try { Properties properties = PropertyUtil.parseProperties(lookupConfiguration.getProperties(), lookupConfiguration.getPropertySeparator());
try { Properties properties = PropertyUtil.parseProperties(lookupConfiguration.getProperties(), lookupConfiguration .getPropertySeparator()); Class<TransactionManagerLookup> transactionManagerLookupClass = (Class<TransactionManagerLookup>) Class .forName(lookupConfiguration.getFullyQualifiedClassPath());
try { Properties properties = PropertyUtil.parseProperties(lookupConfiguration.getProperties(), lookupConfiguration.getPropertySeparator());
private void init() { if (factoryConfiguration == null) { return; } addAttribute(new SimpleNodeAttribute("class", factoryConfiguration.getFullyQualifiedClassPath()).optional(false)); addAttribute(new SimpleNodeAttribute("properties", factoryConfiguration.getProperties()).optional(true)); addAttribute(new SimpleNodeAttribute("propertySeparator", factoryConfiguration.getPropertySeparator()).optional(true)); }
private void init() { if (factoryConfiguration == null) { return; } addAttribute(new SimpleNodeAttribute("class", factoryConfiguration.getFullyQualifiedClassPath()).optional(false)); addAttribute(new SimpleNodeAttribute("properties", factoryConfiguration.getProperties()).optional(true)); addAttribute(new SimpleNodeAttribute("propertySeparator", factoryConfiguration.getPropertySeparator()).optional(true)); }
private void init() { if (factoryConfiguration == null) { return; } addAttribute(new SimpleNodeAttribute("class", factoryConfiguration.getFullyQualifiedClassPath()).optional(false)); addAttribute(new SimpleNodeAttribute("properties", factoryConfiguration.getProperties()).optional(true)); addAttribute(new SimpleNodeAttribute("propertySeparator", factoryConfiguration.getPropertySeparator()).optional(true)); }