Object response = invocation.invokeNext();
String clientFamily = (String) invocation.getMetaData(CLUSTERED_REMOTING, CLUSTER_FAMILY);
HATarget target = (HATarget) families.get(clientFamily);
if (target == null)
{
return response;
}
Long clientViewId = (Long) invocation.getMetaData(CLUSTERED_REMOTING, CLUSTER_VIEW_ID);
if (clientViewId == null)
{
// Maybe we're being invoked upon by a non-clustered proxy
return response;
}
if (clientViewId.longValue() != target.getCurrentViewId())
{
invocation.addResponseAttachment("replicants", new ArrayList(target.getReplicants()));
invocation.addResponseAttachment("viewId", new Long(target.getCurrentViewId()));
}
return response;