if(_logger.isLoggable(Level.FINEST)) {
_logger.finest("Web App Distributable (" + getApplicationId(_ctx)
+ "): " + isAppDistributable);
}
PersistenceType persistence = PersistenceType.MEMORY;
String persistenceFrequency = null;
String persistenceScope = null;
//added code - check global availability-enabled
//if availability-enabled set global ha defaults
ServerConfigLookup serverConfigLookup = null;
if(dynamicConfigContext != null) {
serverConfigLookup = new ServerConfigLookup(dynamicConfigContext);
} else {
serverConfigLookup = new ServerConfigLookup();
}
boolean isAvailabilityEnabled =
serverConfigLookup.calculateWebAvailabilityEnabledFromConfig(_ctx);
if(_logger.isLoggable(Level.FINEST)) {
_logger.finest("AvailabilityGloballyEnabled = " + isAvailabilityEnabled);
}
if(isAvailabilityEnabled) {
//these are the global defaults if nothing is
//set at domain.xml or sun-web.xml
persistence = PersistenceType.HA;
persistenceFrequency = "time-based";
persistenceScope = "session";
}
//added code - if domain.xml default exists, then use that
PersistenceType serverDefaultPersistenceType =
serverConfigLookup.getPersistenceTypeFromConfig();
if(serverDefaultPersistenceType != null) {
persistence = serverDefaultPersistenceType;
persistenceFrequency = serverConfigLookup.getPersistenceFrequencyFromConfig();