/** * Read all Java EE deployment descriptors and annotations * * @return the initialized descriptor */ private T readDeploymentDescriptors(ReadableArchive descriptorArchive, ReadableArchive contentArchive, Application app) throws IOException, SAXException { // read the standard deployment descriptors T descriptor = readStandardDeploymentDescriptor(descriptorArchive); descriptor.setApplication(app); ModuleDescriptor newModule = createModuleDescriptor(descriptor); newModule.setArchiveUri(contentArchive.getURI().getSchemeSpecificPart()); return readRestDeploymentDescriptors(descriptor, descriptorArchive, contentArchive, app); }
/** * receives notification of the value for a particular tag * * @param element the xml element * @param value it's associated value */ public void setElementValue(XMLElement element, String value) { ModuleDescriptor descriptor = (ModuleDescriptor) getDescriptor(); if (element.getQName().equals(ApplicationTagNames.WEB_URI)) { descriptor.setModuleType(DOLUtils.warType()); descriptor.setArchiveUri(value); } else if (element.getQName().equals(ApplicationTagNames.EJB)) { descriptor.setModuleType(DOLUtils.ejbType()); descriptor.setArchiveUri(value); } else if (element.getQName().equals(ApplicationTagNames.CONNECTOR)) { descriptor.setModuleType(DOLUtils.rarType()); descriptor.setArchiveUri(value); } else if (element.getQName().equals(ApplicationTagNames.APPLICATION_CLIENT)) { descriptor.setModuleType(DOLUtils.carType()); descriptor.setArchiveUri(value); } else if (element.getQName().equals(ApplicationTagNames.WEB)) { descriptor.setModuleType(DOLUtils.warType()); } else super.setElementValue(element, value); }
EjbBundleDescriptor bundleDesc = (EjbBundleDescriptor) eddf.read(is); ModuleDescriptor moduleDesc = bundleDesc.getModuleDescriptor(); moduleDesc.setArchiveUri(fileName); moduleName = moduleDesc.getModuleName(); } else {
name.endsWith(".war")))) { ModuleDescriptor<BundleDescriptor> md = new ModuleDescriptor<BundleDescriptor>(); md.setArchiveUri(uri); md.setModuleType(DOLUtils.warType()); name.endsWith(".rar")))) { ModuleDescriptor<BundleDescriptor> md = new ModuleDescriptor<BundleDescriptor>(); md.setArchiveUri(uri); md.setModuleType(DOLUtils.rarType()); app.addModule(md); md.setArchiveUri(uri); md.setModuleType(DOLUtils.carType()); md.setManifest(subArchive.getManifest()); md.setArchiveUri(uri); md.setModuleType(DOLUtils.ejbType()); app.addModule(md); md.setArchiveUri(uri); md.setModuleType(DOLUtils.ejbType()); app.addModule(md);
/** * This method creates an Application object from reading the * standard deployment descriptor. * @param archive the archive for the application */ public Application createApplicationFromStandardDD( ReadableArchive archive, String archiveType) throws IOException, SAXException { Archivist archivist = archivistFactory.getArchivist(archiveType, null); String xmlValidationLevel = dasConfig.getDeployXmlValidation(); archivist.setXMLValidationLevel(xmlValidationLevel); if (xmlValidationLevel.equals("none")) { archivist.setXMLValidation(false); } BundleDescriptor desc = archivist.readStandardDeploymentDescriptor(archive); Application application = null; if (desc instanceof Application) { application = (Application)desc; } else { ModuleDescriptor newModule = archivist.createModuleDescriptor(desc); newModule.setArchiveUri(archive.getURI().getSchemeSpecificPart()); String moduleName = newModule.getModuleName(); application = Application.createVirtualApplication(moduleName, newModule); } return application; }
newModule.setArchiveUri(in.getURI().getSchemeSpecificPart()); application = Application.createVirtualApplication(appName,newModule);
descriptor.getModuleDescriptor().setArchiveUri( aModule.getArchiveUri()); aModule.setModuleName(
newModule.setArchiveUri(untaggedName); if (newModule.getDescriptor() != null) { newModule.getDescriptor().setApplication(application);