Uploaded image for project: 'Kogito'
  1. Kogito
  2. KOGITO-6111

Spring Boot Infinispan Persistence Add-On clashes with multiple CacheManagers

XMLWordPrintable

    • False
    • False
    • Hide

      Mark the user's CacheManager as `@Primary`. Although, users would have to figure out this themselves. We should at least document it.

      Show
      Mark the user's CacheManager as `@Primary`. Although, users would have to figure out this themselves. We should at least document it.

      If a user declares `@EnableCaching` in their Spring application while using this add-on, the Infinispan Starter will create a new reference of `SpringRemoteCacheManager`.

      This instance will clash with the user's defined `CacheManager`, ending in an exception during the application bootstrap.

      Ideally, we should either block this bean creation, implement a CacheResolver, or document how users should deal with this scenario. They can either use Infinispan as their application data cache or they can mark their own CacheManager as Primary to use theirs. 

      See: https://infinispan.org/docs/dev/titles/spring_boot/starter.html#enabling-spring-cache_remote

              cnicolai@redhat.com Cristiano Nicolai (Inactive)
              rhn-support-zanini Ricardo Zanini
              Marian Macik Marian Macik
              Marian Macik Marian Macik
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: