1 23 24 package com.sun.enterprise.tools.verifier.tests.ejb.ias.beancache; 25 26 import com.sun.enterprise.tools.verifier.tests.ejb.EjbTest; 27 import java.util.*; 28 import com.sun.enterprise.deployment.EjbDescriptor; 29 import com.sun.enterprise.deployment.EjbSessionDescriptor; 30 import com.sun.enterprise.tools.verifier.*; 31 import com.sun.enterprise.tools.verifier.tests.*; 32 33 import com.sun.enterprise.tools.common.dd.ejb.*; 34 35 48 public class ASEjbBCIsCacheOverflowAllowed extends ASEjbBeanCache 49 { 50 51 public Result check(EjbDescriptor descriptor) 52 { 53 54 Result result = getInitializedResult(); 55 ComponentNameConstructor compName = new ComponentNameConstructor(descriptor); 56 57 SunEjbJar ejbJar = descriptor.getEjbBundleDescriptor().getIasEjbObject(); 58 String ejbName = null; 59 Ejb testCase = null; 60 boolean oneFailed = false; 61 if(ejbJar!=null) 62 { 63 getBeanCache(descriptor,ejbJar); 64 if(beanCache!=null) 65 { 66 String overFlowAllowed = beanCache.getIsCacheOverflowAllowed(); 67 if(overFlowAllowed!=null) 68 { 69 if(overFlowAllowed.length()==0) 70 { 71 result.failed(smh.getLocalString(getClass().getName()+".failed1", 72 "FAILED [AS-EJB bean-cache] : is-cache-overflow-allowed cannot be empty. It can either be true or false")); 73 } 74 else if(!overFlowAllowed.equals("true") && !overFlowAllowed.equals("false")) 75 { 76 result.failed(smh.getLocalString(getClass().getName()+".failed2", 77 "FAILED [AS-EJB bean-cache] : is-cache-overflow-allowed cannot be {0}. It can either be true or false.", 78 new Object [] { overFlowAllowed})); 79 } 80 else 81 { 82 result.passed(smh.getLocalString(getClass().getName()+".passed", 83 "PASSED [AS-EJB bean-cache] : is-cache-overflow-allowed is {0}", new Object []{overFlowAllowed})); 84 } 85 } 86 else 87 { 88 result.notApplicable(smh.getLocalString(getClass().getName()+".notApplicable", 89 "NOT APPLICABLE [AS-EJB bean-cache] : is-cache-overflow-allowed element not defined")); 90 } 91 } 92 else 93 { 94 result.notApplicable(smh.getLocalString(getClass().getName()+".notApplicable", 95 "NOT APPLICABLE [AS-EJB] : bean-cache element not defined")); 96 } 97 } 98 else 99 { 100 result.addErrorDetails(smh.getLocalString 101 (getClass().getName() + ".notRun", 102 "NOT RUN [AS-EJB] : Could not create an SunEjbJar object")); 103 } 104 return result; 105 106 } 107 } 108 109 | Popular Tags |