SessionServerConfig.java revision 6e9ce46f56bfb7663e3af5aa571d51e8f61f0240
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync * Copyright (c) 2005 Sun Microsystems Inc. All Rights Reserved
* at opensso/legal/CDDLv1.0.txt.
* $Id: SessionService.java,v 1.37 2010/02/03 03:52:54 bina Exp $
public class SessionServerConfig {
* The server identified varies depending on whether or not this server is running as part of a site:
* - If a site is running, the primary server details refer to the site's primary server (usu. load balancer).
* - If a site hasn't been setup, then the primary server details will match the local server details.
* The server identified varies depending on whether or not this server is running as part of a site:
* - If a site is running, the primary server details refer to the site's primary server (usu. load balancer).
* - If a site hasn't been setup, then the primary server details will match the local server details.
return getLocalServerID(false);
return localServerURL;
return localServerSessionServiceURL;
public boolean isSiteEnabled() {
} catch (Exception e) {
throw new IllegalStateException(e);
if (isSiteEnabled()) {
return null;
if (isSiteEnabled()) {
throw new IllegalStateException(e);
return null;
if (isSiteEnabled()) {
} catch (ServerEntryNotFoundException e) {
throw new IllegalStateException(e);
* Checks if server instance identified by serverID is the primary server for this OpenAM server's site.
* How this check is performed varies depending on whether or not this server is running as part of a site:
* - If a site is running, the primary server details refer to the site's primary server (usu. load balancer).
* - If a site hasn't been setup, then the primary server details will match the local server details.
* This method is called by Session.getLocalServerSessionServiceURL, when routing a request to an individual session host. In
* this case, the SessionID.PRIMARY_ID extension is obtained from the SessionID instance (which corresponds to the
* AM-instance host of the session). WebtopNaming will then be called to turn this serverId (01,02, etc) into a
* URL which will point a PLL client GetSession request. Calling this method is part of insuring that the PLL GetSession
* https://openam.example.com:8080/openam then the resulting URL will be
* e.g. Given the server URL "https://remote.example.com:8080" and the path "GetHttpSession?op=create",
return new URL(server.getProtocol(), server.getHost(), server.getPort(), localServerDeploymentPath + "/" + path);
return serverIDs;
return value;
throws ServerEntryNotFoundException {
// TODO: Investigate this method further - under what circumstances does it actually return results?
} catch (ServerEntryNotFoundException e) {
return localServerID;