private String getAppId() { return wbd.getApplication().getRegistrationName(); }
private String getAppId() { return wbd.getApplication().getRegistrationName(); }
public Application getApplication() { if (getWebBundleDescriptor() != null) { return getWebBundleDescriptor().getApplication(); } return null; }
public static String getContextID(WebBundleDescriptor wbd) { String cid = null; if (wbd != null ) { //String moduleId = wbd.getUniqueFriendlyId(); cid = VersioningUtils.getRepositoryName(wbd.getApplication().getRegistrationName()) + '/' + wbd.getUniqueFriendlyId(); } return cid; }
public static String getContextID(WebBundleDescriptor wbd) { String cid = null; if (wbd != null ) { //String moduleId = wbd.getUniqueFriendlyId(); cid = VersioningUtils.getRepositoryName(wbd.getApplication().getRegistrationName()) + '/' + wbd.getUniqueFriendlyId(); } return cid; }
private String getWebDir(String baseDir) { if (baseDir == null) { return null; } StringBuilder dir = new StringBuilder(baseDir); dir.append(File.separator); com.sun.enterprise.deployment.Application app = _wbd.getApplication(); if (app != null && !app.isVirtual()) { dir.append(FileUtils.makeFriendlyFilename( app.getRegistrationName())); dir.append(File.separator); dir.append(FileUtils.makeFriendlyFilename( _wbd.getModuleDescriptor().getArchiveUri())); } else { dir.append(FileUtils.makeLegalNoBlankFileName( _wbd.getModuleID())); } return dir.toString(); } }
private boolean isKeepState(DeploymentContext deployContext, boolean isDeploy) { Boolean keepState = null; if (isDeploy) { DeployCommandParameters dcp = deployContext.getCommandParameters(DeployCommandParameters.class); if (dcp != null) { keepState = dcp.keepstate; } } else { UndeployCommandParameters ucp = deployContext.getCommandParameters(UndeployCommandParameters.class); if (ucp != null) { keepState = ucp.keepstate; } } if (keepState == null) { String keepSessionsString = deployContext.getAppProps().getProperty(DeploymentProperties.KEEP_SESSIONS); if (keepSessionsString != null && keepSessionsString.trim().length() > 0) { keepState = Boolean.valueOf(keepSessionsString); } else { keepState = getDescriptor().getApplication().getKeepState(); } } return ((keepState != null) ? keepState : false); }
/** * 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) { if (element.getQName().equals(RuntimeTagNames.CONTEXT_ROOT)) { // only set the context root for standalone war; // for embedded war, the context root will be set // using the value in application.xml Application app = descriptor.getApplication(); if ( (app == null) || app.isVirtual() ) { descriptor.setContextRoot(value); } } else { super.setElementValue(element, value); } }
/** * 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) { if (element.getQName().equals(RuntimeTagNames.CONTEXT_ROOT)) { // only set the context root for standalone war; // for embedded war, the context root will be set // using the value in application.xml Application app = descriptor.getApplication(); if ( (app == null) || (app!=null && app.isVirtual()) ) { descriptor.setContextRoot(value); } } else if (element.getQName().equals(RuntimeTagNames.KEEP_STATE)) { descriptor.setKeepState(value); } else if (element.getQName().equals(RuntimeTagNames.VERSION_IDENTIFIER)) { } else super.setElementValue(element, value); }
Application app = webDesc.getApplication();
private Application getApplicationFromEnv(JndiNameEnvironment env) { Application app = null; if (env instanceof EjbDescriptor) { // EJB component EjbDescriptor ejbEnv = (EjbDescriptor) env; app = ejbEnv.getApplication(); } else if ( env instanceof EjbBundleDescriptor ) { EjbBundleDescriptor ejbBundle = (EjbBundleDescriptor) env; app = ejbBundle.getApplication(); } else if (env instanceof WebBundleDescriptor) { WebBundleDescriptor webEnv = (WebBundleDescriptor) env; app = webEnv.getApplication(); } else if (env instanceof ApplicationClientDescriptor) { ApplicationClientDescriptor appEnv = (ApplicationClientDescriptor) env; app= appEnv.getApplication(); } else if ( env instanceof ManagedBeanDescriptor ) { ManagedBeanDescriptor mb = (ManagedBeanDescriptor) env; app = mb.getBundle().getApplication(); } else if ( env instanceof Application ) { app = ((Application)env); } else { throw new IllegalArgumentException("IllegalJndiNameEnvironment : env"); } return app; }
com.sun.enterprise.deployment.Application app = wbd.getApplication(); if (app == null || app.isVirtual()) {
@SuppressWarnings("unchecked") private Properties getActionReportProperties(DeploymentContext deployContext) { if (!wmInfo.getDescriptor().getApplication().isVirtual()) { deployContext = ((ExtendedDeploymentContext)deployContext).getParentContext(); } return deployContext.getActionReport().getExtraProperties(); }
public static Application getApplicationFromEnv(JndiNameEnvironment env) { Application app = null; if (env instanceof EjbDescriptor) { // EJB component EjbDescriptor ejbEnv = (EjbDescriptor) env; app = ejbEnv.getApplication(); } else if (env instanceof EjbBundleDescriptor) { EjbBundleDescriptor ejbBundle = (EjbBundleDescriptor) env; app = ejbBundle.getApplication(); } else if (env instanceof WebBundleDescriptor) { WebBundleDescriptor webEnv = (WebBundleDescriptor) env; app = webEnv.getApplication(); } else if (env instanceof ApplicationClientDescriptor) { ApplicationClientDescriptor appEnv = (ApplicationClientDescriptor) env; app = appEnv.getApplication(); } else if (env instanceof ManagedBeanDescriptor) { ManagedBeanDescriptor mb = (ManagedBeanDescriptor) env; app = mb.getBundle().getApplication(); } else if (env instanceof Application) { app = ((Application) env); } else { throw new IllegalArgumentException("IllegalJndiNameEnvironment : env"); } return app; }
classpath.append(ASClassLoaderUtil.getModuleClassPath( sc.getDefaultHabitat(), wbd.getApplication().getName(), dc.getCommandParameters( DeployCommandParameters.class).libraries)); } catch (DeploymentException de) { String msg = rb.getString("webdeployer.jspc"); msg = MessageFormat.format(msg, wbd.getApplication().getName()); logger.log(Level.SEVERE, msg, de); throw de;
if (wbd != null && wbd.getApplication() != null && wbd.getApplication().isVirtual()) { wbd.setClassLoader(webModule.getLoader().getClassLoader()); wbd.visit(new WebValidatorWithCL());
String appName = wbd.getApplication().getName(); boolean delegate = true; com.sun.enterprise.deployment.runtime.web.ClassLoader clBean =
public WebSecurityManager createManager(WebBundleDescriptor wbd, boolean register, ServerContext context) { String ctxId = WebSecurityManager.getContextID(wbd); WebSecurityManager manager = null; if (register) { manager = getManager(ctxId, null,false); } if (manager == null || !register) { try { probeProvider.securityManagerCreationStartedEvent(wbd.getModuleID()); manager = new WebSecurityManager(wbd, context, this, register); probeProvider.securityManagerCreationEndedEvent(wbd.getModuleID()); if (register) { String appName = wbd.getApplication().getRegistrationName(); addManagerToApp(ctxId, null, appName, manager); probeProvider.securityManagerCreationEvent(ctxId); } } catch (javax.security.jacc.PolicyContextException e) { logger.log(Level.FINE, "[Web-Security] FATAL Exception. Unable to create WebSecurityManager: " + e.getMessage()); throw new RuntimeException(e); } } return manager; } }
public WebSecurityManager createManager(WebBundleDescriptor wbd, boolean register, ServerContext context) { String ctxId = WebSecurityManager.getContextID(wbd); WebSecurityManager manager = null; if (register) { manager = getManager(ctxId, null,false); } if (manager == null || !register) { try { probeProvider.securityManagerCreationStartedEvent(wbd.getModuleID()); manager = new WebSecurityManager(wbd, context, this, register); probeProvider.securityManagerCreationEndedEvent(wbd.getModuleID()); if (register) { String appName = wbd.getApplication().getRegistrationName(); addManagerToApp(ctxId, null, appName, manager); probeProvider.securityManagerCreationEvent(ctxId); } } catch (javax.security.jacc.PolicyContextException e) { logger.log(Level.FINE, "[Web-Security] FATAL Exception. Unable to create WebSecurityManager: " + e.getMessage()); throw new RuntimeException(e); } } return manager; } }
id = webEnv.getApplication().getName() + ID_SEPARATOR + webEnv.getContextRoot(); _logger.finer("ComponentEnvManagerImpl: " + id = webEnv.getApplication().getName() + ID_SEPARATOR + webEnv.getContextRoot(); } else if (env instanceof ApplicationClientDescriptor) {