/** * Set runtime default value for EjbDescriptor. */ private void computeRuntimeDefault(EjbDescriptor ejb) { String intfName = null; if ((ejb.getJndiName() == null) || (ejb.getJndiName().length() == 0)) { if (ejb.isRemoteInterfacesSupported() && ejb.isRemoteBusinessInterfacesSupported()) { // can't use a default. } else if (ejb.isRemoteInterfacesSupported()) { // For 2.x view, use the Home as the basis for the default intfName = ejb.getHomeClassName(); } else if (ejb.isRemoteBusinessInterfacesSupported()) { Set<String> classNames = ejb.getRemoteBusinessClassNames(); if (classNames.size() == 1) { intfName = (String)classNames.iterator().next(); } } } if( intfName != null ) { String jndiName = getDefaultEjbJndiName(intfName); ejb.setJndiName(jndiName); } if (!ejb.getUsesCallerIdentity()) { computeRunAsPrincipalDefault( ejb.getRunAsIdentity(), ejb.getApplication()); } }