[infinispan-issues] [JBoss JIRA] (ISPN-2799) Deprecated OverrideDefault annotation is the only way to prevent construction of the default CacheManager

Mircea Markus (JIRA) jira-events at lists.jboss.org
Wed Oct 9 14:40:04 EDT 2013


     [ https://issues.jboss.org/browse/ISPN-2799?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mircea Markus updated ISPN-2799:
--------------------------------

    Fix Version/s:     (was: 6.0.0.Final)

    
> Deprecated OverrideDefault annotation is the only way to prevent construction of the default CacheManager
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: ISPN-2799
>                 URL: https://issues.jboss.org/browse/ISPN-2799
>             Project: Infinispan
>          Issue Type: Bug
>          Components: CDI integration
>    Affects Versions: 5.2.0.Final
>            Reporter: Emond Papegaaij
>            Assignee: Pete Muir
>
> The signature of DefaultEmbeddedCacheManagerProducer.getDefaultEmbeddedCacheManager, with @OverrideDefault, causes the providedDefaultEmbeddedCacheManager to only be satisfied when your producer method is annotated with @OverrideDefault.
> For example:
> {code}
> @Produces
> @ApplicationScoped
> @Default
> @OverrideDefault
> public EmbeddedCacheManager defaultEmbeddedCacheManager() {
>    return new DefaultCacheManager(
>       new GlobalConfigurationBuilder()
>          .globalJmxStatistics().allowDuplicateDomains(true)
>          .cacheManagerName("CDICacheManager").enable().build(),
>       new ConfigurationBuilder().jmxStatistics().disable()
>          .eviction().strategy(EvictionStrategy.LRU)
>          .maxEntries(10000).build());
> }
> {code}
> If I remove @OverrideDefault, my CacheManager is still used as the default CacheManager, but the CacheManager from DefaultEmbeddedCacheManagerProducer is also instantiated. This happens because DefaultCacheResolver iterates over all EmbeddedCacheManagers to check if one of them contains a specific cache.
> The default CacheManager is giving me problems because it conflicts with another CacheManager (probably from JBoss AS) in JMX.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the infinispan-issues mailing list