Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-1322

Cache configuration not registered if producer return null

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 5.1.0.ALPHA1, 5.1.0.FINAL
    • 5.0.0.CR8, 5.0.0.FINAL
    • CDI
    • None

    Description

      The following thing is allowed by the CDI extension.

      class Config { 
          @Infinispan("greeting-cache")
          @GreetingCache
          @Produces
          Configuration greetingCacheConfiguration;
      }
      

      If the cache configuration is not provided by an external mechanism (e.g. with an XML configuration file) the cache configuration is not registered. When this cache will be injected the default configuration of the corresponding cache manager will be used (see behavior of CacheContainer#getCache(name)).

      To be consistent the cache configuration must be registered with a clone of the default configuration. In this case the EmbeddedCacheManager#getCacheNames return will reflect the "Config" class content.

      Attachments

        Activity

          People

            kevinpollet Kévin Pollet (Inactive)
            kevinpollet Kévin Pollet (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: