3 Replies Latest reply on May 16, 2013 8:59 AM by mgencur

    Configuring infinispan on JBoss AS and non-jboss clients

    defunkt

      Hello,

       

      I'm new to Infinispan and JBoss AS (using infinispan 5.1.2 and JBossAS7.1.1), ive been trying to setup an environment where I have a distributed cache that is distributed on both the application server and the clients (clients are running jboss-client and infinispan-core jars), however I haven't been able to do so thus far -- I've only been able to run instances of a distributed cache on both the server (using standalone-full-ha.xml) and separate clients (using another .xml of course), however haven't succeeded in synchronizing them (ive been using map.size() to check this, is this a good way to check?).

       

      I've been using the default JGroups settings (haven't specified any in my xml configuration), perhaps this is related? (I'm not currently able to copy the contents of my configuration xmls into here, sorry..)

      I defined both their <transport> attributes with the same cluster name, the named cache also has the same name, both I've defined as not transactional and synchronized. Are there any other configuration changes I need to make in order for this to work?

       

      Also, I've noticed that the infinispan:1.2 xsd file does not allow for defining the rack, machine and site attributes within transport, although these attributes do exist in the management and in the standard infinispan distribution package - is this intended?

       

      Thanks for any help,

      Gilad Ber

        • 1. Re: Configuring infinispan on JBoss AS and non-jboss clients
          mgencur

          Hello Gilad,

          not sure I remember anyone who tried to set this up and succeeded. This is generally not recommended way to cluster Infinispan instances. The Infinispan subsystem of JBossAS is configured in a different way (some ISPN attributes were squashed, some were removed) so it's quite hard to get those configurations equivalent without looking into the code. The problem that ISPN instances can't find each other has probably to do with different settings for JGroups. If you really want to make this work, you should make sure the configurations of JGroups for the standalone ISPN  for  JBossAS's are compatible.

           

          What is the reason you're trying to cluster standalone ISPN with ISPN in JBossAS? There might be a different configuration that suites your needs better.

           

          Btw, if you cannot find rack, machine, site in the JBossAS's configuration in the Infinispan's section, it will be in JGroups section.

           

          Martin

          • 2. Re: Configuring infinispan on JBoss AS and non-jboss clients
            defunkt

            Hi Martin,

             

            I am adding infinispan into an existing application (replacing a different in-memory data grid product which has become irrelevant). It simply seemed to me a convenient way of deploying infinispan both to the server machine and to the other machines which need to share the same data (this is the way the application was set up previously). I suppose it would be easier to simply run another infinispan instance in the same machine as the server, simply not in the jbossAS container.

             

            Perhaps it should be mentioned somewhere in the documentation that this is not a recommended way to setup infinispan -- from reading the documentation i had no idea it should be difficult or not recommended.

             

            Thanks for your help!

            • 3. Re: Configuring infinispan on JBoss AS and non-jboss clients
              mgencur

              No problem Gilad:)

               

              I agree that this should be documented somewhere as an increasing number of people try to directly use the cache embedded in the Infinispan subsystem of JBossAS even though the main goal of the cache is to server internal purposes of AS (clustering and second-level cache).

               

              AFAIK, mixing of "library" mode and "server" mode should be working in ISPN 5.3. But here we're not talking about JBossAS for the server but rather ISPN server which is quite similar to AS but users cannot deploy to it (https://github.com/infinispan/infinispan-server)

               

              Martin