If you want the cache (or the caches) to be available from different JVMs you will need Terracotta; ehCache alone cannot do that.
EhCache is not a distributed solution. So you need to use it with Terracotta to obtain the result you want.
You can use Hazelcast, but also Infinispan to obtain this result
a. Add the following jar files