* Created a new config file as application-coherence-override.xml with below content to enable persistence for cluster:
<coherence xmlns="http://xmlns.oracle.com/coherence/coherence-operational-config">
<cluster-config>
<persistence-environments>
<persistence-environment id="mytestPersistenceEnvironment">
<persistence-mode>active</persistence-mode>
<active-directory>/tmp/persistance/active</active-directory>
<snapshot-directory>/tmp/persistance/snapshot</snapshot-directory>
<trash-directory>/tmp/persistance/trash</trash-directory>
</persistence-environment>
</persistence-environments>
</cluster-config>
</coherence>
* Here my application-cache-config.xml, if comment out <persistence> then cluster getting started and cache was working, but we are losing cache whenever cluser gets bounced, hence we planning to enable persistence to restore the data whenever cluster get down and restarted. Here we are facing the issue pasted below, we looking for active or on-demand, but active means then cluster not at all starting and failing with the stated error below, if its on-demand then cluster just starting but its not taking snapshot and restoring whenever we restart the cluster.
<cache-config>
<caching-scheme-mapping>
<cache-mapping>
<cache-name>mytest-*</cache-name>
<scheme-name>mytest</scheme-name>
</cache-mapping>
</caching-scheme-mapping>
<caching-schemes>
<class-scheme>
<scheme-name>mytestStore</scheme-name>
<class-name>com.myproj.test.coherence.mytestStore</class-name>
<init-params>
<init-param>
<param-type>java.lang.String</param-type>
<param-value>{cache-name}</param-value>
</init-param>
<init-param>
<param-type>java.lang.String</param-type>
<param-value>/tmp/mytest/</param-value>
</init-param>
</init-params>
</class-scheme>
<local-scheme>
<scheme-name>MyLocalCache</scheme-name>
<unit-calculator>binary</unit-calculator>
<high-units>400m</high-units>
<eviction-policy>HYBRID</eviction-policy>
<expiry-delay>36h</expiry-delay>
</local-scheme>
<distributed-scheme>
<scheme-name>mytest</scheme-name>
<service-name>mytest-cache-cluster</service-name>
<lease-granularity>member</lease-granularity>
<thread-count>5</thread-count>
<backing-map-scheme>
<read-write-backing-map-scheme>
<internal-cache-scheme>
<local-scheme>
<scheme-ref>MyLocalCache</scheme-ref>
</local-scheme>
</internal-cache-scheme>
<cachestore-scheme>
<class-scheme>
<scheme-ref>mytestStore</scheme-ref>
</class-scheme>
</cachestore-scheme>
</read-write-backing-map-scheme>
</backing-map-scheme>
<persistence>
<environment>mytestPersistenceEnvironment</environment>
</persistence>
<autostart>true</autostart>
</distributed-scheme>
</caching-schemes>
</cache-config>
* Error Info:
INFO Logger@9223767 12.2.1.3.8: 2022-01-11 06:42:24.482/2.230 Oracle Coherence GE 12.2.1.3.8 <Info> (thread=DistributedCache:mytest-cache-cluster, member=65): "/tmp/persistance/active/mytestcache/mytest-cache-cluster" appears to reference a remote file-system and as such Coherence pers istence is enabling "coherence.distributed.persistence.bdb.je.log.useODSYNC" in order ensure the integrity of remote commits. As this may impact write performance you may explicitly set the system property to "false" to override this decision; though this is only recommended if the location is actually a local file-system.
ERROR Logger@9223767 12.2.1.3.8: 2022-01-11 06:42:24.486/2.234 Oracle Coherence GE 12.2.1.3.8 <Error> (thread=DistributedCache:mytest-cache-cluster, member=65) : Incompatible PersistenceActiveFailureMode implementation: this node is configured to use stop-service, but the service senior is using none; stopping the service.