J'ai un service Web Resteasy annotés avec @Cache déployé sur JBoss wildfly-8.1.0:Utilisation de sous-système Infinispan pour Resteasy Cache sous JBoss wildfly-8.1.0
@Cache
@Path("/commercialStructures")
@ApplicationScoped
public class CommercialStructureResource extends
@GET
@Path("/listGeoRegions")
@Produces(value = { APPLICATION_XML, APPLICATION_JSON })
public List<GeographicRegion> listByParentId(@QueryParam("parentId") Long parentId) {
(...)
Selon Resteasy docs que je dois ajouter org.jboss.resteasy.plugins.cache.server.ServerCacheFeature
à JAX-RS application et le changement web.xml:
<web-app>
<context-param>
<param-name>server.request.cache.infinispan.config.file</param-name>
<param-value>infinispan.xml</param-value>
</context-param>
<context-param>
<param-name>server.request.cache.infinispan.cache.name</param-name>
<param-value>MyCache</param-value>
</context-param>
</web-app>
questions:
Comment les noms de fichiers infinispan.xml et de cache sont-ils liés aux configurations de sous-systèmes infinispan sur standalone.xml?
Est-ce la façon correcte de configurer le cache REST sous Wildfly?
Merci!