* @return the name within the global name space.
*/
protected String getGlobalJNDIName(Class<?> businessInterface)
{
JavaEEModule module = bean.getModule();
JavaEEApplication app = module.getApplication();
// EJB 3.1 4.4.1 <app-name> only applies if the session bean is packaged within an .ear file.
String appName = app.isEnterpriseApplicationArchive() ? app.getName() : null;
return (appName != null ? appName + "/" : "") + getAppJNDIName(businessInterface);
}