}
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 || (localBinding.jndiBinding() != null && localBinding.jndiBinding().trim().length() == 0))
{
JBossSessionBeanMetaData smd = (JBossSessionBeanMetaData)container.getXml();
String name = smd.getLocalJndiName();
// 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();
}
}