[infinispan-issues] [JBoss JIRA] Created: (ISPN-1322) Cache configuration not registered if producer return null

Kevin Pollet (JIRA) jira-events at lists.jboss.org
Mon Aug 8 18:00:24 EDT 2011


Cache configuration not registered if producer return null
----------------------------------------------------------

                 Key: ISPN-1322
                 URL: https://issues.jboss.org/browse/ISPN-1322
             Project: Infinispan
          Issue Type: Bug
          Components: CDI integration
    Affects Versions: 5.0.0.FINAL, 5.0.0.CR8
            Reporter: Kevin Pollet
            Assignee: Kevin Pollet
             Fix For: 5.1.0.BETA1, 5.1.0.FINAL


The following thing is allowed by the CDI extension.

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

If the cache configuration is not provided by an external mechanism (e.g. with an XML configuration file) the cache 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)}} when the cache is not defined).

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.





--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the infinispan-issues mailing list