FileDocCategorySizeDatePackage
ASEjbBCIsCacheOverflowAllowed.javaAPI DocGlassfish v2 API5279Fri May 04 22:35:16 BST 2007com.sun.enterprise.tools.verifier.tests.ejb.ias.beancache

ASEjbBCIsCacheOverflowAllowed

public class ASEjbBCIsCacheOverflowAllowed extends ASEjbBeanCache
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 is-cache-overflow-allowed tag specifies whether the cache overflow will be tolerated or not. Valid values are true or false
author
Irfan Ahmed

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


	Result result = getInitializedResult();
	ComponentNameConstructor compName = new ComponentNameConstructor(descriptor);

        SunEjbJar ejbJar = descriptor.getEjbBundleDescriptor().getIasEjbObject();
        String ejbName = null;
        Ejb testCase = null;
        boolean oneFailed = false;
        if(ejbJar!=null)
        {
            getBeanCache(descriptor,ejbJar);
            if(beanCache!=null)
            {
                String overFlowAllowed = beanCache.getIsCacheOverflowAllowed();
                if(overFlowAllowed!=null)
                {
                    if(overFlowAllowed.length()==0)
                    {
                        result.failed(smh.getLocalString(getClass().getName()+".failed1",
                            "FAILED [AS-EJB bean-cache] : is-cache-overflow-allowed cannot be empty. It can either be true or false"));
                    }
                    else if(!overFlowAllowed.equals("true") && !overFlowAllowed.equals("false"))
                    {
                        result.failed(smh.getLocalString(getClass().getName()+".failed2",
                            "FAILED [AS-EJB bean-cache] : is-cache-overflow-allowed cannot be {0}. It can either be true or false.",
                            new Object[] { overFlowAllowed}));
                    }
                    else
                    {
                        result.passed(smh.getLocalString(getClass().getName()+".passed",
                            "PASSED [AS-EJB bean-cache] : is-cache-overflow-allowed is {0}", new Object[]{overFlowAllowed}));
                    }
                }
                else
                {
                    result.notApplicable(smh.getLocalString(getClass().getName()+".notApplicable",
                    "NOT APPLICABLE [AS-EJB bean-cache] : is-cache-overflow-allowed element not defined"));
                }
            }
            else
            {
                result.notApplicable(smh.getLocalString(getClass().getName()+".notApplicable",
                    "NOT APPLICABLE [AS-EJB] : bean-cache element not defined"));
            }
        }
        else
        {
            result.addErrorDetails(smh.getLocalString
                 (getClass().getName() + ".notRun",
                  "NOT RUN [AS-EJB] : Could not create an SunEjbJar object"));
        }
        return result;