@Override public boolean getKeepState() { // for standalone module, get the keep-state value specified in // module glassfish-*.xml if (isVirtual()) { BundleDescriptor bundleDesc = getStandaloneBundleDescriptor(); if (bundleDesc != null) { return bundleDesc.getKeepState(); } } return super.getKeepState(); }
private Map<String, String> getAppLevelComponents(com.sun.enterprise.deployment.Application application, String type, Map<String, String> subComponentsMap) { Map<String, String> subComponentList = new LinkedHashMap<String, String>(); if (application.isVirtual()) { // for standalone module, get servlets or ejbs BundleDescriptor bundleDescriptor = application.getStandaloneBundleDescriptor(); subComponentList = getModuleLevelComponents(bundleDescriptor, type, subComponentsMap); } else { // for ear case, get modules Collection<ModuleDescriptor<BundleDescriptor>> modules = getSubModuleListForEar(application, type); for (ModuleDescriptor module : modules) { StringBuffer sb = new StringBuffer(); String moduleName = module.getArchiveUri(); sb.append("<"); String moduleType = getModuleType(module); sb.append(moduleType); sb.append(">"); subComponentList.put(moduleName, sb.toString()); subComponentsMap.put(module.getArchiveUri(), moduleType); } } return subComponentList; }
@Override public boolean getKeepState() { // for standalone module, get the keep-state value specified in // module glassfish-*.xml if (isVirtual()) { BundleDescriptor bundleDesc = getStandaloneBundleDescriptor(); if (bundleDesc != null) { return bundleDesc.getKeepState(); } } return super.getKeepState(); }
public Application load(DeploymentContext dc) throws IOException { DeployCommandParameters params = dc.getCommandParameters(DeployCommandParameters.class); Application application = processDOL(dc); // write out xml files if needed if (Boolean.valueOf(WRITEOUT_XML)) { saveAppDescriptor(application, dc); } if (application.isVirtual()) { dc.addModuleMetaData(application.getStandaloneBundleDescriptor()); for (RootDeploymentDescriptor extension : application.getStandaloneBundleDescriptor().getExtensionsDescriptors()) { dc.addModuleMetaData(extension); } } addModuleConfig(dc, application); validateKeepStateOption(dc, params, application); return application; }
public static BundleDescriptor getCurrentBundleForContext( DeploymentContext context) { ExtendedDeploymentContext ctx = (ExtendedDeploymentContext)context; Application application = context.getModuleMetaData(Application.class); if (application == null) return null; // this can happen for non-JavaEE type deployment. e.g., issue 15869 if (ctx.getParentContext() == null) { if (application.isVirtual()) { // standalone module return application.getStandaloneBundleDescriptor(); } else { // top level return application; } } else { // a sub module of ear return application.getModuleByUri(ctx.getModuleUri()); } } }
public Application openWith(Application app, ReadableArchive archive) throws IOException, SAXParseException { setManifest(archive.getManifest()); // application archivist will override this method if (app.isVirtual()) { T descriptor = readRestDeploymentDescriptors((T)app.getStandaloneBundleDescriptor(), archive, archive, app); if (descriptor != null) { postOpen(descriptor, archive); } if (descriptor instanceof BundleDescriptor) { ((BundleDescriptor)descriptor).setApplication(app); } } return app; }
public static BundleDescriptor getCurrentBundleForContext( DeploymentContext context) { ExtendedDeploymentContext ctx = (ExtendedDeploymentContext)context; Application application = context.getModuleMetaData(Application.class); if (application == null) return null; // this can happen for non-JavaEE type deployment. e.g., issue 15869 if (ctx.getParentContext() == null) { if (application.isVirtual()) { // standalone module return application.getStandaloneBundleDescriptor(); } else { // top level return application; } } else { // a sub module of ear return application.getModuleByUri(ctx.getModuleUri()); } }
public Application openWith(Application app, ReadableArchive archive) throws IOException, SAXException { setManifest(archive.getManifest()); // application archivist will override this method if (app.isVirtual()) { T descriptor = readRestDeploymentDescriptors((T)app.getStandaloneBundleDescriptor(), archive, archive, app); if (descriptor != null) { postOpen(descriptor, archive); descriptor.setApplication(app); } } return app; }
ModuleDescriptor md = application.getStandaloneBundleDescriptor().getModuleDescriptor(); md.setModuleName(name); ModuleDescriptor md = application.getStandaloneBundleDescriptor().getModuleDescriptor(); md.setModuleName(name); } catch(SAXException e) {