FileDocCategorySizeDatePackage
ContainerTransactionMethodExists.javaAPI DocGlassfish v2 API3654Fri May 04 22:33:36 BST 2007com.sun.enterprise.tools.verifier.tests.ejb.elements

ContainerTransactionMethodExists

public class ContainerTransactionMethodExists extends MethodsExist implements com.sun.enterprise.tools.verifier.tests.ejb.EjbCheck
Methods used in container-transaction element of the deployment descriptor must be methods defined in the enterprise bean's component and/or home interface.

Fields Summary
Constructors Summary
Methods Summary
public com.sun.enterprise.tools.verifier.Resultcheck(EjbDescriptor descriptor)

param
descriptor the Enterprise Java Bean deployment descriptor
return
Result the results for this assertion

    
        result = getInitializedResult();
        compName = getVerifierContext().getComponentNameConstructor();

        if ((descriptor instanceof EjbSessionDescriptor)  ||
                (descriptor instanceof EjbEntityDescriptor)) {
            Map<MethodDescriptor,
                    ContainerTransaction> transactionalMethods = descriptor.getMethodContainerTransactions();
        
            if (transactionalMethods!=null) {
                for (MethodDescriptor methodDescriptor : transactionalMethods.keySet()) 
                    checkMethodStyles(methodDescriptor, descriptor);
            }
        }

        if(result.getStatus() != Result.FAILED) {
            addGoodDetails(result, compName);
            result.passed(smh.getLocalString
                    (getClass().getName() + ".passed",
                    "Valid container transaction method(s) found."));
        }
        return result;