Added the capability to specify the location of the service conf folder

path via a system property.
This commit is contained in:
Juan Carlos Luciani 2006-05-31 17:47:45 +00:00
parent c5cf7bcc88
commit b36e17ea15
2 changed files with 20 additions and 4 deletions

View File

@ -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 application. For an example configuration setup for the AuthTokenSvc see the
sampleConf folder. 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 CONFIGURING THE BASE SERVICE
The ATS base settings are configured in the svc.settings file under the conf folder. 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. settng will be optional.
- The startSearchContext setting specifies the begin location for initiating - The startSearchContext setting specifies the begin location for initiating
context searches. This setting or an equivalent setting will be moved to the context searches. The absence of this setting will result in searches ocurring
identity abstraction configuration file where it belongs. Once this is done, 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. the setting will no longer be recognized within the svc.settings file.
CONFIGURING SERVICES TO CONSUME CASA AUTHENTICATION TOKENS CONFIGURING SERVICES TO CONSUME CASA AUTHENTICATION TOKENS

View File

@ -68,13 +68,25 @@ public class Rpc extends javax.servlet.http.HttpServlet implements javax.servlet
try 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(); 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 // 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 // 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 // Create a map to keep track of the Rpc methods
m_methodsMap = new HashMap(); m_methodsMap = new HashMap();