RemoteBinding[] list = remoteBindings.value();
for(RemoteBinding binding : list)
{
assert binding.jndiBinding().length() != 0 : "jndiBinding not set on binding " + binding;
RemoteProxyFactory factory;
String factoryImplementationRegistryKey = binding.factory();
if (factoryImplementationRegistryKey.equals(RemoteBindingDefaults.PROXY_FACTORY_DEFAULT))
{
//TODO Only used in @Service now, this whole class is @Deprecated
factory = ((ServiceContainer)container).getProxyFactoryForService(binding);
}
else
{
Class<? extends RemoteProxyFactory> remoteFactoryClass = container.getDeployment().getRemoteProxyFactoryRegistry().getProxyFactoryClass(binding.factory());
Constructor<? extends RemoteProxyFactory> constructor = getConstructor(remoteFactoryClass, container.getClass(), RemoteBinding.class);
factory = constructor.newInstance(container, binding);
}
factory.start();
proxyFactories.put(binding,factory);
}
}
if (localBinding != null)
{
ProxyFactory factory = container.getProxyFactory(localBinding);
factory.start();
proxyFactories.put(localBinding,factory);
}
}