public void start() throws Exception
{
String clientBindUrl = ProxyFactoryHelper.getClientBindUrl(binding);
locator = new InvokerLocator(clientBindUrl);
StatelessContainer container = (StatelessContainer) getContainer();
String partitionName = container.getPartitionName();
proxyFamilyName = container.getDeploymentQualifiedName() + locator.getProtocol() + partitionName;
HAPartition partition = HAPartitionLocator.getHAPartitionLocator().getHAPartition(partitionName, container.getInitialContextProperties());
drm = partition.getDistributedReplicantManager();
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 RandomRobin();
}
else
{
String policyClass = clustered.loadBalancePolicy();
try
{
RemoteProxyFactoryRegistry registry = container.getDeployment().getRemoteProxyFactoryRegistry();
Class<LoadBalancePolicy> policy = registry.getLoadBalancePolicy(policyClass);
policyClass = policy.getName();
}
catch (LoadBalancePolicyNotRegisteredException e){}