String home = null;
String localHome = null;
//first check for annotations
if (!MetadataCompleteMarker.isMetadataComplete(deploymentUnit)) {
final EEModuleClassDescription clazz = applicationClasses.getClassByName(description.getComponentClassName());
//we only care about annotations on the bean class itself
if (clazz != null) {
final ClassAnnotationInformation<LocalHome, String> localAnnotations = clazz.getAnnotationInformation(LocalHome.class);
if (localAnnotations != null) {
if (!localAnnotations.getClassLevelAnnotations().isEmpty()) {
localHome = localAnnotations.getClassLevelAnnotations().get(0);
if (description.getEjbLocalView() == null) {
//If the local home is specified via annotation then the corresponding business interface is implied
//by the signature of the create method
//See EJB 3.1 21.4.5
final String localClassName = this.inferLocalInterfaceFromLocalHome(localHome, module, deploymentReflectionIndex, description);
description.addEjbLocalObjectView(localClassName);
}
}
}
final ClassAnnotationInformation<RemoteHome, String> remoteAnnotations = clazz.getAnnotationInformation(RemoteHome.class);
if (remoteAnnotations != null) {
if (!remoteAnnotations.getClassLevelAnnotations().isEmpty()) {
home = remoteAnnotations.getClassLevelAnnotations().get(0);
if (description.getEjbRemoteView() == null) {
//If the remote home is specified via annotation then the corresponding business interface is implied