// Determine if a business interface is defined here
boolean hasBusiness = this.hasBusiness(name, referenceAddresses);
// Cast
ServiceProxyFactory sFactory = null;
try
{
sFactory = this.getProxyFactoryClass().cast(proxyFactory);
}
catch (ClassCastException cce)
{
throw new RuntimeException(ProxyFactory.class.getSimpleName() + " used in "
+ ServiceProxyFactory.class.getSimpleName() + " must be of type " + ServiceProxyFactory.class.getName()
+ " but was instead " + proxyFactory, cce);
}
// If bound to business
if (hasBusiness)
{
// Use a general-purpose proxy for all business interfaces
proxy = sFactory.createProxyDefault();
log.debug("Created Proxy of type " + proxy.getClass().getSimpleName() + ".");
}
// No valid type is bound here
else