throw new RuntimeException("Unable to create a remoting proxy for ProxyFactory " + proxyFactoryKey
+ " with remoting url " + remotingUrl, mue);
}
ProxyClusteringInfo bci = registry.getBeanClusteringInfo(proxyFactoryKey);
if (bci == null)
{
throw new IllegalStateException("Cannot find " + ProxyClusteringInfo.class.getSimpleName()
+ " for proxyFactoryKey " + proxyFactoryKey);
}
String partitionName = bci.getPartitionName();
assert partitionName != null && !partitionName.trim().equals("") : " Partition name is required, but is not available in ProxyClusteringInfo";
String lbpClass = bci.getHomeLoadBalancePolicy().getName();
assert lbpClass != null && !lbpClass.trim().equals("") : LoadBalancePolicy.class.getSimpleName()
+ " class name is required, but is not available in ProxyClusteringInfo";
LoadBalancePolicy loadBalancePolicy;
try
{
log.debug("Instantiating loadbalancer policy " + lbpClass + " for remote proxyfactory bound at key "
+ proxyFactoryKey);
loadBalancePolicy = (LoadBalancePolicy) cl.loadClass(lbpClass).newInstance();
}
catch (Exception e)
{
throw new RuntimeException("Could not load loadbalancer policy " + lbpClass
+ " while creating a proxy to remote proxyfactory", e);
}
FamilyWrapper wrapper = bci.getFamilyWrapper();
FamilyClusterInfo familyClusterInfo = wrapper.get();
log.debug("Remote proxyfactory for key " + proxyFactoryKey + " will be associated with family name "
+ familyClusterInfo.getFamilyName() + " view id " + familyClusterInfo.getCurrentViewId()
+ " with available targets " + familyClusterInfo.getTargets());