Dispatcher.singleton.registerTarget(objectId, obj);
}
else
{
clazz = obj.getClass();
ClassProxy proxy = ClassProxyFactory.newInstance(obj.getClass());
advisor = proxy._getInstanceAdvisor();
advisor.insertInterceptor(new ForwardingInterceptor(obj));
Dispatcher.singleton.registerTarget(objectId, proxy);
}
families = (Map) advisor.getMetaData().getMetaData(CLUSTERED_REMOTING, CLUSTER_FAMILIES);
if (families != null)
{
target = (HATarget) families.get(proxyFamilyName);
if (target == null)
{
target = new HATarget(partition, proxyFamilyName, locator, HATarget.ENABLE_INVOCATIONS);
ClusteringTargetsRepository.initTarget(proxyFamilyName, target.getReplicantList());
families.put(proxyFamilyName, target);
}
}
else
{
families = new HashMap();
target = new HATarget(partition, proxyFamilyName, locator, HATarget.ENABLE_INVOCATIONS);
ClusteringTargetsRepository.initTarget(proxyFamilyName, target.getReplicantList());
families.put(proxyFamilyName, target);
advisor.insertInterceptor(0, new ReplicantsManagerInterceptor(families));
}
ClassProxy proxy = ClassProxyFactory.newInstance(clazz);
InstanceAdvisor proxyAdvisor = proxy._getInstanceAdvisor();
proxyAdvisor.insertInterceptor(IsLocalInterceptor.singleton);
advisor.insertInterceptor(SecurityClientInterceptor.singleton);
advisor.insertInterceptor(ClientTxPropagationInterceptor.singleton);
proxyAdvisor.insertInterceptor(MergeMetaDataInterceptor.singleton);
proxyAdvisor.insertInterceptor(ClusterChooserInterceptor.singleton);