1 Reply Latest reply on Sep 23, 2016 5:30 AM by Sebastian Łaskawiec

    CDI User Guide out of date?

    John Ament Master

      Hi,

       

      Looking at this guide: Infinispan 8.2 User Guide

      It seems the contents are a bit out of date.  They specifically point to an infinispan-cdi module, which doesn't seem to be valid any longer (dropped in the 8.1.0 release?).  Its now replaced with separate embedded and remote modules, as seen at infinispan/cdi at master · infinispan/infinispan · GitHub

       

      Personally, the split between embedded and remote is a bit of a pain for me, as I may use an embedded option for local development, and remove for greater environments.  So I guess two questions:

       

      - Can the guide be updated?

      - Is it safe to keep both on the classpath?

       

      John

        • 1. Re: CDI User Guide out of date?
          Sebastian Łaskawiec Apprentice

          Unfortunately the split was required for other features such as Uber Jars (org.infinispan:infinispan-embedded and org.infinispan:infinispan-remote). This adds some additional work for the projects like yours, where both CDI extensions are required.

           

          So answering your questions - yes it is safe to use both but should use so called Small Jars. If you added both org.infinispan:infinispan-embedded and org.infinispan:infinispan-remote to your deployment, you would end up with duplicated classes and in such case there are no guarantees about CDI behavior. You classpath should look like the following:

          • org.infinispan:infinispan-cdi-embedded, which pulls org.infinispan:infinispan-cdi-common and org.infinispan:infinispan-core
          • org.infinispan:infinispan-cdi-remote, which pulls org.infinispan:infinispan-cdi-common (already there because of cdi-embedded) and org.infinispan:infinispan-client-hotrod

           

          I also created [ISPN-7039] Fix CDI Documentation (add information about the split) - JBoss Issue Tracker  for updating documentation.