2 Replies Latest reply on Sep 24, 2013 7:02 PM by Faustas.Zilinskas

    How to make Coherence throw an exception when the cache clients are improperly initilized?


      As a cache server developer I'm providing an API for the cache clients that behind scenes uses Coherence API to get caches and data from the cluster. However, sometimes (usually in the beginning) some clients' JVMs are started without proper config files specified (people usually omit -Dtangosol.coherence.cacheconfig=... property). When this happens, the Coherence starts as if nothing wrong happened. It even returns the instances of the distributed caches without any complaint. The problem is that instead of read-though access to any object, I get nulls.


      This is misleading, since my API seems to behave normally, but fails to find the data that should be there. Problem is that there was no requirement to have the proper initialization done.

      How can I ensure in my code that the Coherence is initialized using proper config file and that the caches that I'm dependent on are really there?