FileDocCategorySizeDatePackage
ASEjbBeanCache.javaAPI DocGlassfish v2 API4965Fri May 04 22:34:06 BST 2007com.sun.enterprise.tools.verifier.tests.ejb.runtime.beancache

ASEjbBeanCache

public class ASEjbBeanCache extends com.sun.enterprise.tools.verifier.tests.ejb.EjbTest implements com.sun.enterprise.tools.verifier.tests.ejb.EjbCheck
ejb [0,n] bean-cache ? max-cache-size ? [String] is-cache-overflow-allowed ? [String] cache-idle-timout-in-seconds ? [String] removal-timeout-in-seconds ? [String] victim-selection-policy ? [String] The bean-cache element specifies the bean cache properties for the bean. This is valid only for entity beans and stateful session beans
author
Irfan Ahmed

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

        Result result = getInitializedResult();
	    ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();
        String beanCache = null;
        try{
            beanCache = getXPathValue("/sun-ejb-jar/enterprise-beans/ejb[ejb-name=\""+descriptor.getName()+"\"]/bean-cache");
            if(beanCache!=null)
            {
                if(descriptor instanceof EjbEntityDescriptor
                        || (descriptor instanceof EjbSessionDescriptor
                        && ((EjbSessionDescriptor)descriptor).getSessionType().equals(EjbSessionDescriptor.STATEFUL)))
                {
                    addGoodDetails(result, compName);
                    result.passed(smh.getLocalString(getClass().getName()+".passed",
                                "PASSED [AS-EJB ejb] : bean-cache Element parsed"));
                }
                else
                {
                    addWarningDetails(result, compName);
                    result.warning(smh.getLocalString(getClass().getName()+".warning1",
                            "WARNING [AS-EJB ejb] : bean-cache should be defined only for Stateful Session and Entity Beans"));
                }
            }
            else
            {
                addNaDetails(result, compName);
                result.notApplicable(smh.getLocalString(getClass().getName()+".notApplicable",
                        "NOT APPLICABLE [AS-EJB ejb] : bean-cache element not defined"));
            }
        }catch(Exception ex)
        {
            addErrorDetails(result, compName);
            result.addErrorDetails(smh.getLocalString
                    (getClass().getName() + ".notRun",
                            "NOT RUN [AS-EJB] : Could not get a beanCache object"));
        }
        return result;