FileDocCategorySizeDatePackage
EntityManagerReferencesHandler.javaAPI DocGlassfish v2 API3716Fri May 04 22:31:34 BST 2007com.sun.enterprise.deployment.annotation.handlers

EntityManagerReferencesHandler

public class EntityManagerReferencesHandler extends EntityManagerReferenceHandler
This handler is responsible for handling the javax.persistence.PersistenceContexts annotation.

Fields Summary
Constructors Summary
public EntityManagerReferencesHandler()

    
Methods Summary
public java.lang.ClassgetAnnotationType()

return
the annoation type this annotation handler is handling

        return PersistenceContexts.class;
    
protected com.sun.enterprise.deployment.annotation.HandlerProcessingResultprocessAnnotation(com.sun.enterprise.deployment.annotation.AnnotationInfo ainfo, com.sun.enterprise.deployment.annotation.context.ResourceContainerContext[] rcContexts)


        PersistenceContexts annotation = (PersistenceContexts) 
            ainfo.getAnnotation();
        
        PersistenceContext[] emRefAnnotations = annotation.value();
        List<HandlerProcessingResult> results = new ArrayList<HandlerProcessingResult>();

        for(PersistenceContext emRef : emRefAnnotations) {
            results.add(processEmRef(ainfo, rcContexts, emRef));
        }

        return getOverallProcessingResult(results);