/** * validates the DOL Objects associated with this archivist, usually * it requires that a class loader being set on this archivist or passed * as a parameter */ @Override public void validate(ClassLoader aClassLoader) { ClassLoader cl = aClassLoader; if (cl==null) { cl = classLoader; } if (cl==null) { return; } descriptor.setClassLoader(cl); descriptor.visit((ApplicationVisitor) new ApplicationValidator()); }
/** * Loads a previously prepared application in its execution environment and * return a ContractProvider instance that will identify this environment in * future communications with the application's container runtime. * @param container in which the application will reside * @param context of the deployment * @return an ApplicationContainer instance identifying the running application */ public U load(T container, DeploymentContext context) { // reset classloader on DOL object before loading so we have a // valid classloader set on DOL Application app = context.getModuleMetaData(Application.class); if (app != null) { app.setClassLoader(context.getClassLoader()); } return null; }
/** * validates the DOL Objects associated with this archivist, usually * it requires that a class loader being set on this archivist or passed * as a parameter */ @Override public void validate(ClassLoader aClassLoader) { ClassLoader cl = aClassLoader; if (cl==null) { cl = classLoader; } if (cl==null) { return; } descriptor.setClassLoader(cl); descriptor.visit((ApplicationVisitor) new ApplicationValidator()); }
/** * This method populates the rest of the Application object from the * previous standard deployment descriptor reading * @param archive the archive for the application */ public Application openWith(Application application, ReadableArchive archive, Archivist archivist) throws IOException, SAXException { archivist.openWith(application, archive); // validate if (application.isVirtual()) { application.setClassLoader(archivist.getClassLoader()); application.visit((ApplicationVisitor) new ApplicationValidator()); } return application; }
/** * This method populates the rest of the Application object from the * previous standard deployment descriptor reading * @param archive the archive for the application */ public Application openWith(Application application, ReadableArchive archive, Archivist archivist) throws IOException, SAXParseException { archivist.openWith(application, archive); // validate if (application.isVirtual()) { application.setClassLoader(archivist.getClassLoader()); application.visit((ApplicationVisitor) new ApplicationValidator()); } return application; }
application.setClassLoader(archivist.getClassLoader()); application.visit(new ApplicationValidator());
application.setClassLoader(archivist.getClassLoader()); application.visit((ApplicationVisitor) new ApplicationValidator());