-
1. Re: Hi. Several questions to ask about Infinispan and CDI.
seto Dec 7, 2016 2:36 AM (in response to seto)I know the answer to question 1 now, but still have no idea about question 2.
@ConfigureCache("name-cache")
@NameCache
@Produces
public Configuration nameCacheConfig;
@ConfigureCache("id-cache")@IdCache
@Produces
public Configuration idCacheConfig;
@ConfigureCache("local-name-cache")@LocalNameCache
@Produces
public Configuration localNameCacheConfig(){
return localConfig();
}@ConfigureCache("local-id-cache")
@LocalIdCache
@Produces
public Configuration localIdCacheConfig(){
return localConfig();
}private Configuration localConfig()
{
ConfigurationBuilder builder = new ConfigurationBuilder();
builder.clustering().cacheMode(CacheMode.LOCAL);
return builder.build();
} -
2. Re: Hi. Several questions to ask about Infinispan and CDI.
sebastian.laskawiec Dec 7, 2016 5:52 AM (in response to seto)The CDI extension creates an EmbeddedCacheManager for you. All you need to do is to inject it (@Inject EmbeddedCacheManager cacheManager) and invoke cacheManager.getTransport().getMembers() (or getAddress()).
-
3. Re: Hi. Several questions to ask about Infinispan and CDI.
seto Dec 7, 2016 9:24 AM (in response to sebastian.laskawiec)Thank you. That's what I'm finding. It's not mentioned in the documentation.