}
}
}
// invalidation-interval-secs, max-in-memory-sessions
SessionManager sessionManager = runtimeSessionConfig.getSessionManager();
if (sessionManager != null) {
ManagerProperties managerProperties = sessionManager.getManagerProperties();
if (managerProperties != null && managerProperties.sizeWebProperty() > 0) {
for (WebProperty prop : managerProperties.getWebProperty()) {
String name = prop.getAttributeValue(WebProperty.NAME);
String value = prop.getAttributeValue(WebProperty.VALUE);
if (name.equals(REAP_INTERVAL_SECONDS)) {
appendTextChild(scNode,
RuntimeTagNames.INVALIDATION_INTERVAL_SECS, value);
} else if (name.equals(MAX_SESSIONS)) {
appendTextChild(scNode,
RuntimeTagNames.MAX_IN_MEMORY_SESSIONS, value);
}
}
}
}
}
if (sessionConfig != null) {
Set<SessionTrackingMode> trackingModes = sessionConfig.getTrackingModes();
if (trackingModes.contains(SessionTrackingMode.COOKIE)) {
appendTextChild(scNode, RuntimeTagNames.COOKIES_ENABLED, "true");
}
CookieConfig cookieConfig = sessionConfig.getCookieConfig();
if (cookieConfig != null) {
if (cookieConfig.getName() != null && cookieConfig.getName().length() > 0) {
appendTextChild(scNode, RuntimeTagNames.COOKIE_NAME, cookieConfig.getName());
}
if (cookieConfig.getPath() != null) {
appendTextChild(scNode, RuntimeTagNames.COOKIE_PATH, cookieConfig.getPath());
}
if (cookieConfig.getDomain() != null) {
appendTextChild(scNode, RuntimeTagNames.COOKIE_DOMAIN, cookieConfig.getDomain());
}
if (cookieConfig.getComment() != null) {
appendTextChild(scNode, RuntimeTagNames.COOKIE_COMMENT, cookieConfig.getComment());
}
appendTextChild(scNode, RuntimeTagNames.COOKIE_SECURE,
Boolean.toString(cookieConfig.isSecure()));
appendTextChild(scNode, RuntimeTagNames.COOKIE_MAX_AGE_SECS,
Integer.toString(cookieConfig.getMaxAge()));
appendTextChild(scNode, RuntimeTagNames.COOKIE_HTTP_ONLY,
Boolean.toString(cookieConfig.isHttpOnly()));
}
if (trackingModes.contains(SessionTrackingMode.URL)) {
appendTextChild(scNode, RuntimeTagNames.URL_REWRITING_ENABLED, "true");
}
}
if (runtimeSessionConfig != null) {
// persistent-store-dir
SessionManager sessionManager = runtimeSessionConfig.getSessionManager();
if (sessionManager != null) {
StoreProperties storeProperties = sessionManager.getStoreProperties();
if (storeProperties != null && storeProperties.sizeWebProperty() > 0) {
for (WebProperty prop : storeProperties.getWebProperty()) {
String name = prop.getAttributeValue(WebProperty.NAME);
String value = prop.getAttributeValue(WebProperty.VALUE);
if (name.equals(DIRECTORY)) {