Coherence “directed query not supported”

Oracle claims that the Coherence API is the same whether or not during runtime it is a full member of the grid or it is an Extend client:

Coherence*ExtendTM clients provide the same rich API support as the standard Coherence API without being full data members of the cluster.ref

While strictly speaking that is true, I am learning the API usage may differ. The latest example I have is the following code, which works fine when run inside (as a full member of) the grid:

InvocationService invocationService = getInvocationService();
Set members = invocationService.getCluster().getMemberSet();
Map<Member, CoherenceMember> memberResults = invocationService.query(  
    new MyCacheDistributionQueryInvocable(), members);

However, when run as an Extend client, this code gives an error that Google as yet can shed no light on:

java.lang.IllegalArgumentException : directed query not supported; the specified Member set must be null

So, the second parameter to InvocationService#query() has to be null, if run as an Extend client. So, the question is now: how do I get information about the individual members of the grid from the Extend client? Or is it even possible? This post may end up being helpful.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.