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

EntityManagerFactoryReferencesHandler

public class EntityManagerFactoryReferencesHandler extends EntityManagerFactoryReferenceHandler
This handler is responsible for handling the javax.persistence.PersistenceUnits annotation.

Fields Summary
Constructors Summary
public EntityManagerFactoryReferencesHandler()

    
Methods Summary
public java.lang.ClassgetAnnotationType()

return
the annoation type this annotation handler is handling

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


        PersistenceUnits annotation = (PersistenceUnits) ainfo.getAnnotation();
        
        PersistenceUnit[] emfRefAnnotations = annotation.value();
        List<HandlerProcessingResult> results = new ArrayList<HandlerProcessingResult>();

        for(PersistenceUnit emfRef : emfRefAnnotations) {
            results.add(processEmfRef(ainfo, rcContexts, emfRef));
        }

        return getOverallProcessingResult(results);