1 23 package com.sun.enterprise.tools.verifier.app; 24 25 import com.sun.enterprise.deployment.Application; 26 import com.sun.enterprise.deployment.Descriptor; 27 import com.sun.enterprise.tools.verifier.BaseVerifier; 28 import com.sun.enterprise.tools.verifier.CheckMgr; 29 import com.sun.enterprise.tools.verifier.FrameworkContext; 30 31 34 public class ApplicationVerifier extends BaseVerifier { 35 36 private Application application = null; 37 38 public ApplicationVerifier(FrameworkContext frameworkContext, 39 Application application) { 40 this.frameworkContext = frameworkContext; 41 this.application = application; 42 } 43 44 50 public void verify() throws Exception { 51 if (areTestsNotRequired(frameworkContext.isApp()) && 52 areTestsNotRequired(frameworkContext.isPersistenceUnits())) 53 return; 54 preVerification(); 55 if(frameworkContext.isPortabilityMode()) 56 application.setClassLoader(context.getClassLoader()); 57 CheckMgr checkMgrImpl = new AppCheckMgrImpl(frameworkContext); 58 verify(application, checkMgrImpl); 59 } 60 61 public Descriptor getDescriptor() { 62 return application; 63 } 64 65 protected ClassLoader createClassLoader() { 66 return application.getClassLoader(); 67 } 68 69 72 protected String getArchiveUri() { 73 return frameworkContext.getJarFileName(); 74 } 75 76 protected String [] getDDString() { 77 String dd[] = {"META-INF/sun-application.xml", "META-INF/application.xml"}; return dd; 80 } 81 82 protected String getClassPath() { 83 return null; 84 } 85 } 86 | Popular Tags |