1 23 package com.sun.enterprise.deployment.annotation.handlers; 24 25 import java.lang.annotation.Annotation ; 26 import java.lang.annotation.ElementType ; 27 import java.lang.reflect.AnnotatedElement ; 28 import java.lang.reflect.Method ; 29 import java.util.ArrayList ; 30 import java.util.List ; 31 32 import javax.ejb.EJB ; 33 import javax.ejb.EJBs ; 34 35 import com.sun.enterprise.deployment.annotation.HandlerProcessingResult; 36 import com.sun.enterprise.deployment.annotation.AnnotationInfo; 37 import com.sun.enterprise.deployment.annotation.AnnotationProcessorException; 38 import com.sun.enterprise.deployment.annotation.HandlerProcessingResult; 39 import com.sun.enterprise.deployment.annotation.context.ResourceContainerContext; 40 41 45 public class EJBsHandler extends EJBHandler { 46 47 public EJBsHandler() { 48 } 49 50 53 public Class <? extends Annotation > getAnnotationType() { 54 return EJBs .class; 55 } 56 57 58 protected HandlerProcessingResult processAnnotation(AnnotationInfo ainfo, 59 ResourceContainerContext[] rcContexts) 60 throws AnnotationProcessorException { 61 62 EJBs ejbsAnnotation = (EJBs ) ainfo.getAnnotation(); 63 64 EJB [] ejbAnnotations = ejbsAnnotation.value(); 65 List <HandlerProcessingResult> results = new ArrayList <HandlerProcessingResult>(); 66 67 for(EJB ejb : ejbAnnotations) { 68 results.add(processEJB(ainfo, rcContexts, ejb)); 69 } 70 71 return getOverallProcessingResult(results); 72 } 73 74 } 75 | Popular Tags |