private boolean isStartNeeded(NetworkListener networkListener) { if (networkListener == null) { return false; } return ConfigBeansUtilities.toBoolean(networkListener.getJkEnabled()); } }
/** * Checks if SSO is enabled for this VirtualServer. * * @return The value of the sso-enabled property for this VirtualServer */ private boolean isSSOEnabled(boolean globalSSOEnabled) { String ssoEnabled = "inherit"; if (vsBean != null) { ssoEnabled = vsBean.getSsoEnabled(); } return "inherit".equals(ssoEnabled) && globalSSOEnabled || ConfigBeansUtilities.toBoolean(ssoEnabled); }
/** * Determines whether access logging is enabled for this virtual server. * * @param globalAccessLoggingEnabled The value of the * accessLoggingEnabled property of the http-service element * * @return true if access logging is enabled for this virtual server, * false otherwise. */ boolean isAccessLoggingEnabled(boolean globalAccessLoggingEnabled) { String enabled = vsBean.getAccessLoggingEnabled(); return "inherit".equals(enabled) && globalAccessLoggingEnabled || ConfigBeansUtilities.toBoolean(enabled); }
private boolean isStartNeeded(VirtualServer host) { if (host == null) { return false; } if (ConfigBeansUtilities.toBoolean(host.getAccessLoggingEnabled()) || ConfigBeansUtilities.toBoolean(host.getSsoEnabled())) { return true; } String state = host.getState(); if (state != null && ("disabled".equals(state) || !ConfigBeansUtilities.toBoolean(state))) { return true; } List<Property> props = host.getProperty(); if (props != null && !props.isEmpty()) { return true; } return false; }
if (ConfigBeansUtilities.toBoolean( httpService.getAccessLoggingEnabled()) || ConfigBeansUtilities.toBoolean( httpService.getSsoEnabled())) { return true; String propValue = prop.getValue(); if (AUTH_PASSTHROUGH_ENABLED_PROP.equals(propName)) { if (ConfigBeansUtilities.toBoolean(propValue)) { return true; return true; } else if (TRACE_ENABLED_PROP.equals(propName)) { if (!ConfigBeansUtilities.toBoolean(propValue)) { return true;
/** * Initializes the instance-level session properties (read from * config.web-container.session-config.session-properties in domain.xml). */ private void initInstanceSessionProperties() { SessionProperties spBean = serverConfigLookup.getInstanceSessionProperties(); if (spBean == null || spBean.getProperty() == null) { return; } List<Property> props = spBean.getProperty(); if (props == null) { return; } for (Property prop : props) { String propName = prop.getName(); String propValue = prop.getValue(); if (propName == null || propValue == null) { throw new IllegalArgumentException( rb.getString("webcontainer.nullWebProperty")); } if (propName.equalsIgnoreCase("enableCookies")) { instanceEnableCookies = ConfigBeansUtilities.toBoolean(propValue); } else if (_logger.isLoggable(Level.INFO)) { Object[] params = {propName}; _logger.log(Level.INFO, "webcontainer.notYet", params); } } }
/** * Configures this VirtualServer with its state (on | off | disabled). */ void configureState(){ String stateValue = vsBean.getState(); if (!stateValue.equalsIgnoreCase(ON) && getName().equalsIgnoreCase( org.glassfish.api.web.Constants.ADMIN_VS)){ throw new IllegalArgumentException( "virtual-server " + org.glassfish.api.web.Constants.ADMIN_VS + " state property cannot be modified"); } if (stateValue.equalsIgnoreCase(DISABLED)) { // state="disabled" setIsDisabled(true); } else if (!ConfigBeansUtilities.toBoolean(stateValue)) { // state="off" setIsOff(true); } else { setIsActive(true); } }
loader.setIgnoreHiddenJarFiles(ConfigBeansUtilities.toBoolean(value)); } else { Object[] params = {name, value};
setCrossContext(crossContext); } else if("allowLinking".equalsIgnoreCase(name)) { allowLinking = ConfigBeansUtilities.toBoolean(value); boolean reuse = ConfigBeansUtilities.toBoolean(value); setReuseSessionID(reuse); if (reuse) { boolean flag = ConfigBeansUtilities.toBoolean(value); setEncodeCookies(flag); boolean relativeRedirect = ConfigBeansUtilities.toBoolean(value); setAllowRelativeRedirect(relativeRedirect); setFileEncoding(value); } else if("enableTldValidation".equalsIgnoreCase(name) && ConfigBeansUtilities.toBoolean(value)) { setTldValidation(true); } else if("enableTldNamespaceAware".equalsIgnoreCase(name) && ConfigBeansUtilities.toBoolean(value)) { setTldNamespaceAware(true); } else if("securePagesWithPragma".equalsIgnoreCase(name)) { boolean securePagesWithPragma = ConfigBeansUtilities.toBoolean(value); setSecurePagesWithPragma(securePagesWithPragma); } else if("useMyFaces".equalsIgnoreCase(name)) { setUseMyFaces(ConfigBeansUtilities.toBoolean(value)); } else if("useBundledJsf".equalsIgnoreCase(name)) { setUseMyFaces(ConfigBeansUtilities.toBoolean(value)); } else if(name.startsWith("alternatedocroot_")) {
boolean delegate = ConfigBeansUtilities.toBoolean(value); loader.setDelegate(delegate); if (logger.isLoggable(Level.FINE)) {
globalSSOEnabled = ConfigBeansUtilities.toBoolean(httpService.getSsoEnabled()); globalAccessLoggingEnabled = ConfigBeansUtilities.toBoolean(httpService.getAccessLoggingEnabled()); globalAccessLogWriteInterval = httpService.getAccessLog().getWriteIntervalSeconds(); globalAccessLogBufferSize = httpService.getAccessLog().getBufferSizeBytes(); connector.setConnectionTimeout(Integer.parseInt(propValue)); } else if ("tcpNoDelay".equals(propName)) { connector.setTcpNoDelay(ConfigBeansUtilities.toBoolean(propValue)); } else if ("traceEnabled".equals(propName)) { connector.setAllowTrace(ConfigBeansUtilities.toBoolean(propValue)); } else if ("ssl-session-timeout".equals(propName)) { connector.setSslSessionTimeout(propValue);
public void configHttpProperties(Http http, Transport transport, Ssl ssl) { setAllowTrace(ConfigBeansUtilities.toBoolean(http.getTraceEnabled())); setMaxKeepAliveRequests(Integer.parseInt(http.getMaxConnections())); setKeepAliveTimeoutInSeconds(Integer.parseInt(http.getTimeoutSeconds())); setAuthPassthroughEnabled(ConfigBeansUtilities.toBoolean(http.getAuthPassThroughEnabled())); setMaxPostSize(Integer.parseInt(http.getMaxPostSizeBytes())); setProperty("compression", http.getCompression()); setProperty("compressableMimeType", http.getCompressableMimeType()); if (http.getNoCompressionUserAgents() != null) { setProperty("noCompressionUserAgents", http.getNoCompressionUserAgents()); } setProperty("compressionMinSize", http.getCompressionMinSizeBytes()); if (http.getRestrictedUserAgents() != null) { setProperty("restrictedUserAgents", http.getRestrictedUserAgents()); } setProperty("cometSupport", Boolean.valueOf(ConfigBeansUtilities.toBoolean(http.getCometSupportEnabled())).toString()); setProperty("rcmSupport", Boolean.valueOf(ConfigBeansUtilities.toBoolean(http.getRcmSupportEnabled())).toString()); setConnectionUploadTimeout(Integer.parseInt(http.getConnectionUploadTimeoutMillis())); setDisableUploadTimeout(!ConfigBeansUtilities.toBoolean(http.getUploadTimeoutEnabled())); setURIEncoding(http.getUriEncoding()); setChunkingDisabled(!ConfigBeansUtilities.toBoolean(http.getChunkingEnabled())); configSslOptions(ssl); }
/** * Configure the Grizzly FileCache mechanism * @param fileCache */ public void configureFileCache(FileCache fileCache) { if (fileCache != null) { setLargeFileCacheEnabled(ConfigBeansUtilities.toBoolean( fileCache.getEnabled())); if (fileCache.getMaxAgeSeconds() != null) { setSecondsMaxAge(Integer.parseInt(fileCache.getMaxAgeSeconds())); } if (fileCache.getMaxFilesCount() != null) { setMaxCacheEntries(Integer.parseInt( fileCache.getMaxFilesCount())); } if (fileCache.getMaxCacheSizeBytes() != null) { setMaxLargeCacheSize(Integer.parseInt(fileCache.getMaxCacheSizeBytes())); } } }
String value = clBean.getAttributeValue( com.sun.enterprise.deployment.runtime.web.ClassLoader.DELEGATE); delegate = ConfigBeansUtilities.toBoolean(value);
String value = clBean.getAttributeValue( com.sun.enterprise.deployment.runtime.web.ClassLoader.DELEGATE); delegate = ConfigBeansUtilities.toBoolean(value);
setMaxHttpHeaderSize(Integer.parseInt(http.getSendBufferSizeBytes())); setDefaultHost(http.getDefaultVirtualServer()); setEnableLookups(ConfigBeansUtilities.toBoolean(http.getDnsLookupEnabled()));
/** * Processes an update to the http-service element */ public void updateHttpService(HttpService httpService) throws LifecycleException { if (httpService == null) { return; } /* * Update each virtual server with the sso-enabled and * access logging related properties of the updated http-service */ globalSSOEnabled = ConfigBeansUtilities.toBoolean(httpService.getSsoEnabled()); globalAccessLogWriteInterval = httpService.getAccessLog().getWriteIntervalSeconds(); globalAccessLogBufferSize = httpService.getAccessLog().getBufferSizeBytes(); globalAccessLoggingEnabled = ConfigBeansUtilities.toBoolean(httpService.getAccessLoggingEnabled()); // for availability-service.web-container-availability webContainerFeatureFactory = getWebContainerFeatureFactory(); List<com.sun.enterprise.config.serverbeans.VirtualServer> virtualServers = httpService.getVirtualServer(); for (com.sun.enterprise.config.serverbeans.VirtualServer virtualServer : virtualServers) { final VirtualServer vs = (VirtualServer) getEngine().findChild(virtualServer.getId()); if (vs != null) { vs.configureSingleSignOn(globalSSOEnabled, webContainerFeatureFactory, isSsoFailoverEnabled()); vs.reconfigureAccessLog(globalAccessLogBufferSize, globalAccessLogWriteInterval, habitat, domain, globalAccessLoggingEnabled); updateHost(virtualServer); } } }
constraintField.setCacheOnMatch(ConfigBeansUtilities.toBoolean(value)); ConfigBeansUtilities.toBoolean(value)); value = fieldConfig.getAttributeValue(com.sun.enterprise.deployment.runtime.web.ConstraintField.VALUE, j, com.sun.enterprise.deployment.runtime.web.ConstraintField.CACHE_ON_MATCH); if (value != null) { constraint.setCacheOnMatch(ConfigBeansUtilities.toBoolean(value)); ConfigBeansUtilities.toBoolean(value));
value = cacheConfig.getAttributeValue(Cache.ENABLED); if (value != null) { boolean enabled = ConfigBeansUtilities.toBoolean(value); manager.setEnabled(enabled);