/** * @return true if this module is a standalone deployment unit */ public boolean isStandalone() { return application.isVirtual(); }
/** * @return true if this module is a standalone deployment unit */ public boolean isStandalone() { return application.isVirtual(); }
/** * return whether the bean is a "virtual" app - i.e. a stand-alone * ejb module */ private boolean isVirtualApplication() { Application application = _ejbDescriptor.getApplication(); return application.isVirtual(); }
/** * if this application object is virtual, return the standalone * bundle descriptor it is wrapping otherwise return null * * @return the wrapped standalone bundle descriptor */ public BundleDescriptor getStandaloneBundleDescriptor() { if (isVirtual()) { if (getModules().size()>1) { // this is an error, the application is virtual, // which mean a wrapper for a standalone module and // it seems I have more than one module in my list... throw new IllegalStateException("Virtual application contains more than one module"); } return getModules().iterator().next().getDescriptor(); } else { return null; } }
@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(); }
@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(); }
/** Calculate module name from a bundle. * @return module name. */ public static String getModuleName(EjbBundleDescriptor bundle) { String moduleName = null; Application application = bundle.getApplication(); if (application.isVirtual()) { // Stand-alone module is deployed. moduleName = application.getRegistrationName(); } else { // Module is deployed as a part of an Application. String jarName = bundle.getModuleDescriptor().getArchiveUri(); int l = jarName.length(); // Remove ".jar" from the bundle's jar name. moduleName = jarName.substring(0, l - 4); } return moduleName; }
public String getUniqueName() { if(uniqueName == null) { BundleDescriptor bundle = getEjbBundleDescriptor(); Application application = bundle.getApplication(); // Add ejb name and application name. StringBuffer rc = new StringBuffer(). append(getName()). append(NAME_CONCATENATOR). append(application.getRegistrationName()); // If it's not just a module, add a module name. if (!application.isVirtual()) { rc.append(NAME_CONCATENATOR). append(bundle.getModuleDescriptor().getArchiveUri()); } uniqueName = getBaseName(getEjbClassName()) + getUniqueNumber(rc.toString()); } return uniqueName; }
public String getUniqueName() { if(uniqueName == null) { BundleDescriptor bundle = getEjbBundleDescriptor(); Application application = bundle.getApplication(); // Add ejb name and application name. StringBuffer rc = new StringBuffer(). append(getName()). append(NAME_CONCATENATOR). append(application.getRegistrationName()); // If it's not just a module, add a module name. if (!application.isVirtual()) { rc.append(NAME_CONCATENATOR). append(bundle.getModuleDescriptor().getArchiveUri()); } uniqueName = getBaseName(getEjbClassName()) + getUniqueNumber(rc.toString()); } return uniqueName; }
@SuppressWarnings("unchecked") private Properties getActionReportProperties(DeploymentContext deployContext) { if (!wmInfo.getDescriptor().getApplication().isVirtual()) { deployContext = ((ExtendedDeploymentContext)deployContext).getParentContext(); } return deployContext.getActionReport().getExtraProperties(); }
public String getModuleName() { String moduleName = null; // for standalone jars, return its registration name // for applications, return the module uri if (getApplication().isVirtual()) { moduleName = getApplication().getRegistrationName(); } else { moduleName = getModuleDescriptor().getArchiveUri(); } return moduleName; }
public String getModuleName() { String moduleName = null; // for standalone jars, return its registration name // for applications, return the module uri if (getApplication().isVirtual()) { moduleName = getApplication().getRegistrationName(); } else { moduleName = getModuleDescriptor().getArchiveUri(); } return moduleName; }
/** * 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; }
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; }
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 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; }
/** * @return the module ID for this module descriptor */ public String getModuleID() { if (moduleID == null) { moduleID = getModuleDescriptor().getArchiveUri(); } if (getModuleDescriptor().isStandalone()) { return moduleID; } if (application != null && !application.isVirtual()) { return application.getRegistrationName() + "#" + getModuleDescriptor().getArchiveUri(); } else { return moduleID; } }
CallFlowInfoImpl(BaseContainer container, EjbDescriptor descriptor, ComponentType compType) { this.container = container; this.ejbDescriptor = descriptor; this.appName = (ejbDescriptor.getApplication().isVirtual()) ? null : ejbDescriptor.getApplication().getRegistrationName(); String archiveuri = ejbDescriptor.getEjbBundleDescriptor() .getModuleDescriptor().getArchiveUri(); this.modName = com.sun.enterprise.util.io.FileUtils .makeFriendlyFilename(archiveuri); this.ejbName = ejbDescriptor.getName(); this.componentType = compType; }
CallFlowInfoImpl(BaseContainer container, EjbDescriptor descriptor, ComponentType compType) { this.container = container; this.ejbDescriptor = descriptor; this.appName = (ejbDescriptor.getApplication().isVirtual()) ? null : ejbDescriptor.getApplication().getRegistrationName(); String archiveuri = ejbDescriptor.getEjbBundleDescriptor() .getModuleDescriptor().getArchiveUri(); this.modName = com.sun.enterprise.util.io.FileUtils .makeFriendlyFilename(archiveuri); this.ejbName = ejbDescriptor.getName(); this.componentType = compType; }