4 Replies Latest reply on Nov 2, 2015 1:19 PM by wdfink

    infinispan cache

    saranya.guna

      Hi All,

      We are infinispan cache. The cache configuration was defined in standalone.xml.But in red hat document, it is mentioned  to define custom cache in xml file inside application artifacts under resources folder.We are using JAVA EE with jboss 7 server . I am new bie to cache and am confused where to define the cache configuration.

        • 1. Re: infinispan cache
          saranya.guna

          There are two ways to declare infinispan cache 1. Either programmatically or 2.By using XML file.We are using infinispan-core.5.2.10.jar. Where should i add the configuration XML file for infinispan?

          • 2. Re: infinispan cache
            wdfink

            Not sure what you try to do.

            I'm not sure whether you run a Infinispan server or a JavaEE application deployed in JBossAS or Wildfly.

             

            In general ISPN5 is out of date. If you use an application deployed to JBossAS/WildFly you should use the Infinispan (7.x or 8) modules for library mode in wildfly.

            In any case the infinispan bits you configure inside of JB/WF servers is not meant to create application caches as this version is for internal purpose only - like session replication or Hibernate (JPA) cache.

             

            You should have a look to the infinispan tutorials.

            1 of 1 people found this helpful
            • 3. Re: infinispan cache
              saranya.guna

              Hi Wolf,

               

              I didn't run infinispan server. I need a application level cache deployed in Jboss AS .

               

              That means i need to migrate to infinispan 7.x or 8 to configure application level caches.

               

              But i have configured infinispan cache programmatically and it was working .

               

              GlobalConfiguration global = new GlobalConfigurationBuilder().clusteredDefault().globalJmxStatistics().allowDuplicateDomains(true).enable().build();

              Configuration c = new ConfigurationBuilder().clustering().cacheMode(CacheMode.REPL_SYNC).sync().locking().isolationLevel(IsolationLevel.READ_COMMITTED).useLockStriping(false).lockAcquisitionTimeout(6000L).transaction().lockingMode(LockingMode.PESSIMISTIC).transactionMode(TransactionMode.TRANSACTIONAL).transactionManagerLookup(new JBossTransactionManagerLookup()).build()

              • 4. Re: infinispan cache
                wdfink

                I don't say it is technical not possible.

                But the JBossAS server ship an old version of ISPN and also restricted to the needs of it. So you might run into issues.

                If you plan to switch to the supported products (EAP and JDG) this cause also problems as it is not supported to use the Infinispan bits of the app-server.

                 

                So if you want to have the ability to have the latest ISPN you need to use it as a module and set a dependency for your app. If so you can add the jgroups and ispn configuration to your app.ear file