2 Replies Latest reply on Aug 13, 2012 8:02 AM by Hendy Irawan

    Infinispan CDI on WAR project and dependency libraries

    Hendy Irawan Newbie

      Hi Infinispan developers,

       

      i'm having an issue with Infinispan CDI.

       

      The project is a WAR project will several sub-projects as JAR dependencies. e.g. commerce (war) depends on commerce-core (jar).

       

      I put the cache interceptor declarations on the WAR's WEB-INF/beans.xml.

       

      It works perfectly for classes on the WAR project. However, classes on the dependency JAR (commerce-core.jar) are not having cache enabled.

       

      In order for caching on commerce-core.jar to be enabled, I have to edit commerce-core's META-INF/beans.xml and add cache interceptors there.

       

      Given that caching should be a deployment configuration concern, it seems out of place to need to modify inner JARs in order to configure caching.

       

      Is this a bug or there is a better way?

       

      I'm using JBoss AS 7.1.1 on Ubuntu 12.04 64-bit, Infinispan CDI 5.1.4, and AS7-bundled Infinispan 5.1.2.

       

      Thank you.