From b36e17ea1568aa0fec926bac4f75e2dd8b6d8c51 Mon Sep 17 00:00:00 2001 From: Juan Carlos Luciani Date: Wed, 31 May 2006 17:47:45 +0000 Subject: [PATCH] Added the capability to specify the location of the service conf folder path via a system property. --- auth_token/server/AuthTokenSvc/README | 8 ++++++-- .../src/com/novell/casa/authtoksvc/Rpc.java | 16 ++++++++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/auth_token/server/AuthTokenSvc/README b/auth_token/server/AuthTokenSvc/README index ba8cad3e..2fd7774d 100644 --- a/auth_token/server/AuthTokenSvc/README +++ b/auth_token/server/AuthTokenSvc/README @@ -53,6 +53,9 @@ configuration is contained within the "conf" folder under the WEB-INF folder of application. For an example configuration setup for the AuthTokenSvc see the sampleConf folder. +The location of the AuthTokenSvc configuration folder can be over-ridden by specifying +a different path via the com.novell.casa.authtoksvc.config system property. + CONFIGURING THE BASE SERVICE The ATS base settings are configured in the svc.settings file under the conf folder. @@ -88,8 +91,9 @@ Note the following about the sample svc.settings file: settng will be optional. - The startSearchContext setting specifies the begin location for initiating - context searches. This setting or an equivalent setting will be moved to the - identity abstraction configuration file where it belongs. Once this is done, + context searches. The absence of this setting will result in searches ocurring + from the root of the tree. This setting or an equivalent setting will be moved + to the identity abstraction configuration file where it belongs. Once this is done, the setting will no longer be recognized within the svc.settings file. CONFIGURING SERVICES TO CONSUME CASA AUTHENTICATION TOKENS diff --git a/auth_token/server/AuthTokenSvc/src/com/novell/casa/authtoksvc/Rpc.java b/auth_token/server/AuthTokenSvc/src/com/novell/casa/authtoksvc/Rpc.java index 2ca062c4..8c3cb53e 100644 --- a/auth_token/server/AuthTokenSvc/src/com/novell/casa/authtoksvc/Rpc.java +++ b/auth_token/server/AuthTokenSvc/src/com/novell/casa/authtoksvc/Rpc.java @@ -68,13 +68,25 @@ public class Rpc extends javax.servlet.http.HttpServlet implements javax.servlet try { + // Get the path to our configuration folder + // + // First check if it has been specified via a system property + String configFolder; ServletContext context = config.getServletContext(); + configFolder = System.getProperty("com.novell.casa.authtoksvc.config"); + if (configFolder == null) + { + // The path to the svc config folder was not specified via a system + // property, assume that it's location is off the WEB-INF folder for + // our web application. + configFolder = context.getRealPath(File.separator) + "WEB-INF/conf"; + } // Read service configuration - SvcConfig svcConfig = new SvcConfig(context.getRealPath(File.separator), context.getRealPath(File.separator) + "WEB-INF/conf"); + SvcConfig svcConfig = new SvcConfig(context.getRealPath(File.separator), configFolder); // Read enabled services configuration - EnabledSvcsConfig enabledSvcsConfig = new EnabledSvcsConfig(context.getRealPath(File.separator) + "WEB-INF/conf"); + EnabledSvcsConfig enabledSvcsConfig = new EnabledSvcsConfig(configFolder); // Create a map to keep track of the Rpc methods m_methodsMap = new HashMap();