[jira] [Created] (IGNITE-14119) Default JSR-107 Configuration

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (IGNITE-14119) Default JSR-107 Configuration

Anton Vinogradov (Jira)
Jorg Janke created IGNITE-14119:
-----------------------------------

             Summary: Default JSR-107 Configuration
                 Key: IGNITE-14119
                 URL: https://issues.apache.org/jira/browse/IGNITE-14119
             Project: Ignite
          Issue Type: Improvement
          Components: cache
    Affects Versions: 2.9.1
         Environment: AWS Linux 2
            Reporter: Jorg Janke


When requesting a caching provider it is difficult to configure it.
{code:java}
for (final CachingProvider cachingProvider : Caching.getCachingProviders()) {
  final javax.cache.CacheManager cacheManager = cachingProvider.getCacheManager();
...{code}
The biggest issues are:
 * org.apache.ignite.cache.CacheManager defaults to a Server configuration
 * when providing a uri, Spring needs to be installed.

Suggestion:

in CacheManager or CachingProvider create the ability to statically set a default configuration
 * via uri for Spring (irrelevant for me)
 * via providing a default IgniteConfiguration

 
{noformat}
public static void setDefaultConfiguration(IgniteConfiguration cfg) {
  s_defaultConfiguration = cfg;
}
private static IgniteConfiguration s_defaultConfiguration;

// and in the constructor of CacheManager
IgniteConfiguration cfg = s_defaultConfiguration == null ? new IgniteConfiguration() : s_defaultConfiguration;

{noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)