]
Mircea Markus updated ISPN-2799:
--------------------------------
Fix Version/s: 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
Fix For: 6.0.0.Final
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: