1 23 package com.sun.enterprise.deployment.annotation.context; 24 25 import java.lang.annotation.ElementType ; 26 import java.lang.reflect.AnnotatedElement ; 27 28 import com.sun.enterprise.deployment.EjbDescriptor; 29 import com.sun.enterprise.deployment.annotation.ProcessingContext; 30 31 32 37 public class EjbsContext extends AnnotationContext 38 implements ComponentContext { 39 40 private EjbContext[] ejbContexts; 41 private String componentClassName; 42 43 public EjbsContext(EjbDescriptor[] ejbDescs, Class ejbClass) { 44 ejbContexts = new EjbContext[ejbDescs.length]; 45 for (int i = 0; i < ejbDescs.length ; i++) { 46 ejbContexts[i] = new EjbContext(ejbDescs[i], ejbClass); 47 } 48 this.componentClassName = ejbClass.getName(); 49 } 50 51 55 public EjbsContext(EjbContext[] ejbContexts) { 56 this.ejbContexts = ejbContexts; 57 this.componentClassName = ejbContexts[0].getComponentClassName(); 58 } 59 60 63 public EjbContext[] getEjbContexts() { 64 return ejbContexts; 65 } 66 67 public void endElement(ElementType type, AnnotatedElement element) { 68 69 if (ElementType.TYPE.equals(type)) { 70 getProcessingContext().popHandler(); 72 } 73 } 74 75 public String getComponentClassName() { 76 return componentClassName; 77 } 78 79 } 80 | Popular Tags |