{
// Initialize
Advisor advisor = (Advisor) container;
// See if local binding is explicitly-defined
LocalBinding localBinding = (LocalBinding) advisor.resolveAnnotation(LocalBinding.class);
// If none specified
if (localBinding == null)
{
// Get JNDI name from policy
String name = ProxyFactoryHelper.getJndiBindingPolicy(container).getDefaultLocalJndiName(
ProxyFactoryHelper.getDeploymentSummaryFromContainer(container));
if (conflictCheck)
checkForJndiNamingConflict(container);
return name;
}
// Local Binding was explicitly-specified, use it
else
{
return localBinding.jndiBinding();
}
}