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

ApplicationExceptionHandler

public class ApplicationExceptionHandler extends AbstractHandler
Handles @javax.ejb.ApplicationException

Fields Summary
Constructors Summary
public ApplicationExceptionHandler()

    
Methods Summary
public java.lang.ClassgetAnnotationType()

return
the annoation type this annotation handler is handling

        return ApplicationException.class;
    
public com.sun.enterprise.deployment.annotation.HandlerProcessingResultprocessAnnotation(com.sun.enterprise.deployment.annotation.AnnotationInfo ainfo)


        AnnotatedElement ae = ainfo.getAnnotatedElement();
        Annotation annotation = ainfo.getAnnotation();

        AnnotatedElementHandler aeHandler = 
            ainfo.getProcessingContext().getHandler();
        

        if (aeHandler instanceof EjbBundleContext) {
            EjbBundleContext ejbBundleContext = (EjbBundleContext)aeHandler;
            
            EjbBundleDescriptor ejbBundle = ejbBundleContext.getDescriptor();

            ApplicationException appExcAnn = (ApplicationException) annotation;

            EjbApplicationExceptionInfo appExcInfo = new 
                EjbApplicationExceptionInfo();
            Class annotatedClass = (Class) ae;
            appExcInfo.setExceptionClassName(annotatedClass.getName());
            appExcInfo.setRollback(appExcAnn.rollback());

            ejbBundle.addApplicationException(appExcInfo);

        }

        return getDefaultProcessedResult();

     
protected booleansupportTypeInheritance()

        return true;