Misha,
What is the problem you are trying to solve?
Assuming that your issue is similar to the others in this thread...
Cache configurations defined by the Infinispan subsystem are installed on-demand.
To ensure that a given cache configuration is available to your deployment, you must establish a dependency between your application and a given cache configuration.
This is most easily done by injecting cache instances directly.
e.g.
@Resource(lookup = "java:jboss/infinispan/cache/containerName/default")
Cache<?, ?> defaultNache;
@Resource(lookup = "java:jboss/infinispan/cache/containerName/cacheName")
Cache<?, ?> namedCache;
Alternatively, you could obtain the cache via its cache container, but you must also ensure that the associated cache configuration is installed.
e.g.
Cache<?, ?> namedCache;
Cache<?, ?> defaultCache;
@Resource(lookup = "java:jboss/infinispan/container/containerName")
EmbeddedCacheManager manager;
@Resource(lookup = "java:jboss/infinispan/configuration/containerName/default")
Configuration defaultConfiguration;
@Resource(lookup = "java:jboss/infinispan/configuration/containerName/cacheName")
Configuration namedConfiguration;
@PostConstruct
public void init() {
this.defaultCache = this.manager.getCache();
this.namedCache = this.manager.getCache("cacheName");