FileDocCategorySizeDatePackage
EjbJarScanner.javaAPI DocGlassfish v2 API4436Fri May 04 22:31:34 BST 2007com.sun.enterprise.deployment.annotation.impl

EjbJarScanner

public class EjbJarScanner extends ModuleScanner
Implementation of the Scanner interface for Ejb jar.
author
Shing Wai Chan

Fields Summary
Constructors Summary
public EjbJarScanner(File archiveFile, com.sun.enterprise.deployment.EjbBundleDescriptor desc)

        this(archiveFile, desc, null);
    
public EjbJarScanner(File archiveFile, com.sun.enterprise.deployment.EjbBundleDescriptor desc, ClassLoader classLoader)
This scanner will scan the archiveFile for annotation processing.

param
archiveFile
param
classLoader

        if (AnnotationUtils.getLogger().isLoggable(Level.FINE)) {
            AnnotationUtils.getLogger().fine("archiveFile is " + archiveFile);
            AnnotationUtils.getLogger().fine("classLoader is " + classLoader);
        }
        this.archiveFile = archiveFile;
        this.classLoader = classLoader;
        if (archiveFile.isDirectory()) {
            addScanDirectory(archiveFile);

            // always add session beans, message driven beans,
            // interceptor classes that are defined in ejb-jar.xml r
            // regardless of they have annotation or not
            for (Iterator ejbs = desc.getEjbs().iterator(); ejbs.hasNext();) {
                EjbDescriptor ejbDesc = (EjbDescriptor)ejbs.next();
                if (ejbDesc instanceof EjbSessionDescriptor || 
                    ejbDesc instanceof EjbMessageBeanDescriptor) {
                    addScanClassName(ejbDesc.getEjbClassName());
                }
            }

            for (Iterator interceptors = desc.getInterceptors().iterator(); 
                interceptors.hasNext();) {
                EjbInterceptor interceptor = 
                    (EjbInterceptor)interceptors.next();
                addScanClassName(interceptor.getInterceptorClassName());
            }

        } // else in app client jar

    
Methods Summary