RemoteBinding binding = this.getBinding();
InvokerLocator locator = this.getLocator();
SessionContainer container = this.getContainer();
String partitionName = container.getPartitionName();
proxyFamilyName = container.getDeploymentQualifiedName() + locator.getProtocol() + partitionName;
HAPartition partition = HAPartitionLocator.getHAPartitionLocator().getHAPartition(partitionName, container.getInitialContextProperties());
hatarget = new HATarget(partition, proxyFamilyName, locator, HATarget.ENABLE_INVOCATIONS);
ClusteringTargetsRepository.initTarget(proxyFamilyName, hatarget.getReplicants());
container.getClusterFamilies().put(proxyFamilyName, hatarget);
if (clustered.loadBalancePolicy() == null || clustered.loadBalancePolicy().equals(ClusteredDefaults.LOAD_BALANCE_POLICY_DEFAULT))
{
lbPolicy = new FirstAvailable();
}
else
{
String policyClass = clustered.loadBalancePolicy();
try
{
RemoteProxyFactoryRegistry registry = container.getDeployment().getRemoteProxyFactoryRegistry();
Class<LoadBalancePolicy> policy = registry.getLoadBalancePolicy(policyClass);
policyClass = policy.getName();
}
catch (LoadBalancePolicyNotRegisteredException e){}
lbPolicy = (LoadBalancePolicy)Thread.currentThread().getContextClassLoader().loadClass(policyClass)
.newInstance();
}
wrapper = new FamilyWrapper(proxyFamilyName, hatarget.getReplicants());
this.drm = partition.getDistributedReplicantManager();
drm.registerListener(proxyFamilyName, this);
super.start();
Class<?>[] interfaces = {ProxyFactory.class};