Here is my post on the issue with a solution at the end for TCPPING, probably some parts can be reused for JDBCPING: Infinispan TCPPING discovery in Quarkus distribution - #3 by dasniko
Basically the clustering config is going to cache-ispn.xml:
<infinispan
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:infinispan:config:11.0 http://www.infinispan.org/schemas/infinispan-config-11.0.xsd"
xmlns="urn:infinispan:config:11.0">
<jgroups>
<stack name="tcpping" extends="tcp">
<TCP
external_addr="${env.EXTERNAL_IP}"
stack.combine="COMBINE"
/>
<TCPPING
initial_hosts="${env.INITIAL_HOSTS}"
port_range="0"
stack.combine="REPLACE"
stack.position="MPING"
/>
</stack>
</jgroups>
<cache-container name="keycloak">
<transport lock-timeout="60000" stack="tcpping"/>
...
Which you put into the container under: ADD cache-ispn.xml /opt/keycloak/conf/cache-ispn.xml
And set environment variable: ENV KC_CACHE_CONFIG_FILE="cache-ispn.xml" and the other custom configuration variables you put into the config (like INITIAL_HOSTS and EXTERNAL_IP in my example)
You have to adapt the jgroup stack configuration to JDBC_PING instead of TCPPING and then it should work.