xmlpropertiescluster-computingterracottaehcache-3

it is possible to use a system property to specify cluster url in ehcache 3


It is possible to use a system property in ehcache3.xml when configuring the cluster url? like:

<terracotta:connection url="${ehcache.cluster.server}" />

Solution

  • This is currently not possible as-is because there is an XSD validation on that field, which prevents the value from starting with such characters.

    However, you can trick that XSD validation by doing the following:

    <terracotta:connection url="terracotta://${ehcache.cluster.server}" />
    

    and make sure to not have the terracotta:// in your system prop value.