}
private static String getLocalJndiName(JBossEnterpriseBeanMetaData ejb, Class<?> ejbClass)
{
// See if local binding is explicitly-defined
LocalBinding localBinding = ejbClass.getAnnotation(LocalBinding.class);
// If none specified
if (localBinding == null || (localBinding.jndiBinding() != null && localBinding.jndiBinding().trim().length() == 0))
{
String name = ejb.getLocalJndiName();
return name;
}
// Local Binding was explicitly-specified, use it
else
{
return localBinding.jndiBinding();
}
}