}
private static String getLocalJndiName(EJBContainer container, boolean conflictCheck)
{
// See if local binding is explicitly-defined
LocalBinding localBinding = container.getAnnotation(LocalBinding.class);
// If none specified
if (localBinding == null)
{
// Get JNDI name from policy
String name = ProxyFactoryHelper.getJndiBindingPolicy(container).getDefaultLocalJndiName(
ProxyFactoryHelper.getDeploymentSummaryFromContainer(container));
// If we should check for naming conflict
if (conflictCheck){
// Check
ProxyFactoryHelper.checkForJndiNamingConflict(container);
}
// Return
return name;
}
// Local Binding was explicitly-specified, use it
else
{
return localBinding.jndiBinding();
}
}