With the assumption you are actually running Keycloak, refer to this guide -https://www.keycloak.org/server/caching - where you find out that switching the JGroups stack for Infinispan is done by --cache-stack=tcp.
--cache-stack=tcp