Diego Lovison created ISPN-12712:
------------------------------------
Summary: Cache created in runtime via CDI configuration is not visible for
Cache Manager
Key: ISPN-12712
URL:
https://issues.redhat.com/browse/ISPN-12712
Project: Infinispan
Issue Type: Bug
Components: CDI
Affects Versions: 12.0.0.Final
Reporter: Diego Lovison
The reproducer for this error is on the PR
https://github.com/infinispan/infinispan/pull/9041
I am pasting here a reference
{code:java}
@Produces
public Configuration defaultCacheConfiguration() {
return new ConfigurationBuilder()
.expiration().lifespan(60000l)
.build();
}
@Produces
@ApplicationScoped
public org.infinispan.manager.EmbeddedCacheManager defaultEmbeddedCacheManager() {
return new DefaultCacheManager();
}
@Inject
private AdvancedCache<Object, Object> greetingCache;
/**
* Creates new {@link DefaultCacheManager}.
* This test will fail if CDI Extension registers and won't set Cache Manager's
name.
*/
@Test
public void testIfCreatingDefaultCacheManagerSucceeds() {
greetingCache.put("test-key", "test-value");
DefaultCacheManager cacheManager = new DefaultCacheManager();
assertEquals("test-value",
cacheManager.getCache("default").get("test-key"));
cacheManager.stop();
}
{code}
--
This message was sent by Atlassian Jira
(v8.13.1#813001)