/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
* and Distribution License("CDDL") (collectively, the "License"). You
* may not use this file except in compliance with the License. You can
* obtain a copy of the License at
* or packager/legal/LICENSE.txt. See the License for the specific
* language governing permissions and limitations under the License.
*
* When distributing the software, include this License Header Notice in each
* file and include the License file at packager/legal/LICENSE.txt.
*
* GPL Classpath Exception:
* Oracle designates this particular file as subject to the "Classpath"
* exception as provided by Oracle in the GPL Version 2 section of the License
* file that accompanied this code.
*
* Modifications:
* If applicable, add the following below the License Header, with the fields
* enclosed by brackets [] replaced by your own identifying information:
* "Portions Copyright [year] [name of copyright owner]"
*
* Contributor(s):
* If you wish your version of this file to be governed by only the CDDL or
* only the GPL Version 2, indicate your decision by adding "[Contributor]
* elects to include this software in this distribution under the [CDDL or GPL
* Version 2] license." If you don't indicate a single choice of license, a
* recipient has the option to distribute your version of this file under
* either the CDDL, the GPL Version 2 or to extend the choice of license to
* its licensees as provided above. However, if you add GPL Version 2 code
* and therefore, elected the GPL Version 2 license, then the option applies
* only if the new code is made subject to such option by the copyright
* holder.
*/
public class ServerConfigLookup {
/**
* Get the session manager bean from domain.xml
* return null if not defined or other problem
*/
if (configBean == null) {
return null;
}
if (webContainerBean == null) {
return null;
}
if (sessionConfigBean == null) {
return null;
}
return sessionConfigBean.getSessionManager();
}
/**
* Get the manager properties bean from domain.xml
* return null if not defined or other problem
*/
return null;
}
return smBean.getManagerProperties();
}
/**
* Get the store properties bean from domain.xml
* return null if not defined or other problem
*/
return null;
}
return smBean.getStoreProperties();
}
/**
* Get the session properties bean from server.xml
* return null if not defined or other problem
*/
if (configBean == null) {
return null;
}
if (webContainerBean == null) {
return null;
}
if (sessionConfigBean == null) {
return null;
}
return sessionConfigBean.getSessionProperties();
}
/**
* Get the availability-service element from domain.xml.
* return null if not found
*/
return configBean.getAvailabilityService();
}
/**
* Get the availability-enabled from domain.xml.
* return false if not found
*/
public boolean getAvailabilityEnabledFromConfig() {
}
return false;
}
return false;
} else {
return bool;
}
}
/**
* Get the web-container-availability element from domain.xml.
* return null if not found
*/
}
/**
* Get the String value of the property under web-container-availability
* element from domain.xml whose name matches propName
* return null if not found
* @param propName
*/
}
/**
* Get the String value of the property under web-container-availability
* element from domain.xml whose name matches propName
* return defaultValue if not found
* @param propName
*/
if (wcAvailabilityBean == null) {
return defaultValue;
}
return defaultValue;
}
return value;
}
}
return defaultValue;
}
/**
* Get the availability-enabled for the web container from domain.xml.
* return inherited global availability-enabled if not found
*/
public boolean getWebContainerAvailabilityEnabledFromConfig() {
}
return globalAvailabilityEnabled;
}
return globalAvailabilityEnabled;
} else {
return bool;
}
}
/**
* Get the sso-failover-enabled boolean from domain.xml.
*/
public boolean isSsoFailoverEnabledFromConfig() {
if (webContainerAvailabilityBean == null) {
return false;
}
}
/**
* Get the availability-enabled from domain.xml.
* This takes into account:
* global
* web-container-availability
* return false if not found
*/
public boolean calculateWebAvailabilityEnabledFromConfig() {
// global availability from <availability-service> element
boolean globalAvailability = getAvailabilityEnabledFromConfig();
}
// web container availability from <web-container-availability>
// sub-element
boolean webContainerAvailability =
}
return globalAvailability && webContainerAvailability;
}
/**
* Get the availability-enabled from domain.xml.
* This takes into account:
* global
* web-container-availability
* web-module (if stand-alone)
* return false if not found
*/
boolean waEnabled = calculateWebAvailabilityEnabledFromConfig();
boolean webModuleAvailability = false;
}
}
}
return waEnabled && webModuleAvailability;
}
boolean asyncReplication = true;
}
}
return asyncReplication;
}
/**
* Get the persistenceType from domain.xml.
* return null if not found
*/
if (webContainerAvailabilityBean == null) {
return null;
}
if (persistenceTypeString != null) {
}
if (persistenceType != null) {
}
} else {
}
}
return persistenceType;
}
/**
* Get the persistenceFrequency from domain.xml.
* return null if not found
*/
if (webContainerAvailabilityBean == null) {
return null;
}
}
/**
* Get the persistenceScope from domain.xml.
* return null if not found
*/
if (webContainerAvailabilityBean == null) {
return null;
}
}
public boolean getDisableJreplicaFromConfig() {
if (webContainerAvailabilityBean == null) {
return false;
}
}
/**
* convert the input value to the appropriate Boolean value
* if input value is null, return null
*/
}
}
/**
* Loads the requested class using the Common Classloader
*
* @param className the name of the class to load
*
* @return the loaded class
*/
}
}