2 Replies Latest reply on Dec 12, 2013 11:08 AM by rstrazza

    Infinispan 6 server on tomcat 7

    rstrazza Newbie

      Hi, I'm new to Infinispan and currently researching to see if we could use it in one project. The first requirement is to have the cache server (infinispan) running on Tomcat 7. Is that possible ? How could I setup Infinispan 6 in server mode (or perhaps only in distributed mode) that way? Would that support Hot Rod ?



        • 1. Re: Infinispan 6 server on tomcat 7
          Tristan Tarrant Master

          Sure it is possible:


          just pull the infinispan-server-hotrod jar (and all its transitive deps) into your WAR and configure/start/stop the hotrod server in a servletcontextlistener.


          Why are you not considering using the infinispan-server distro ? Unless you also want to directly access the embedded caches, it is a much more convenient and robust solution.



          • 2. Re: Infinispan 6 server on tomcat 7
            rstrazza Newbie

            I'm actually doing exactly that and this is the code on the contextInitialized to start the cache manager in cluster mode:


                      cacheManager = new DefaultCacheManager("infinispan.xml");



            and was looking to try something as explained below), so all named caches are started and join the cluster, is that still the right approach ?



            The reason for Tomcat is because it would be a dedicated cache server (multiple nodes) running only Infinispan - sort of many app nodes in cluster on distributed mode with a cache server cluster running on separated infra. I know this is very high level, but wondering if you would you have any suggestions.


            Thanks a lot!