Foundation Services
Installing and Running Foundation Services as a Windows Service
With SAS 9.1.3, the Java Service Wrapper from Tanuki Software is provided with SAS Foundation Services. You can use this software to install and run SAS Foundation Services as a Windows service for use with any foundation services-enabled application. The Java Service Wrapper handles user logouts, and it also provides automatic restarts when they are required.
Note: The SAS Web Infrastructure Kit includes a separate implementation of the Java Service Wrapper that enables you to easily install the SAS Services application (which is provided with the SAS Web Infrastructure Kit) as a Windows service. To use this implementation, see Running Remotely Deployed Services as a Windows Service in the
SAS Intelligence Platform: Web Application Administration Guide.
When you install SAS Foundation Services, a Wrapper directory is created in the installation directory. For example, if you use the default installation path, the Wrapper directory is located in C:\Program Files\SAS\SASFoundationServices\1.1. . The Wrapper directory contains the following subdirectories:
bin
- contains the following executable files:
InstallRemoteServices.bat
- a sample of a script that you can use to install remotely deployed foundation services as a Windows service.
StartRemoteServices.bat
- a sample of a script that you can use to run remotely deployed foundation services as a console application.
UninstallRemoteServices.bat
- a sample of a script that you can use to uninstall remotely deployed foundation services as a Windows service.
Wrapper.exe
- an executable file that each of the above scripts calls in order to launch the Java Service Wrapper.
conf
- contains the following configuration files:
wrapper.conf
- the Java Service Wrapper configuration file.
sample.config
- a sample metadata source configuration file, which specifies the location of the deployment configuration for remote foundation services. The location can be either a SAS Metadata Repository or a URL-accessible file.
The file sample.config specifies that the remote service deployment configuration is located in the file sample.xml . If your deployment configuration is in a different location, see Specifying the Location of the Deployment Metadata.
sample.xml
- a sample remote services deployment file. This file contains default service configurations for the core foundation services, except that the services are configured to be remotely accessible.
java.policy
- a sample Java security policy file.
login.config
- a sample Java Authentication and Authorization Service (JAAS) login configuration file.
lib
- contains the following library files:
wrapper.jar
- contains the Java Service Wrapper's integration classes.
Wrapper.dll
- the Java Service Wrapper's Java Native Interface (JNI) library for Windows.
logs
- location of the log files that are written by the Java Service Wrapper.
Configuring the Java Service Wrapper
The file wrapper.conf is the configuration file for the Java Service Wrapper. In most cases, you can use the wrapper.conf file without making any changes. Instead, you can use command-line arguments in the executable scripts to override the configuration settings. The wrapper.conf file contains the following configuration directives:
wrapper.java.mainclass
- specifies the name of the class that will be instantiated by
wrapper.exe . This class must contain a main method and must implement WrapperListener . In the sample configuration file wrapper.conf , this directive specifies a class called com.sas.services.deployment.servicewrapper.ServiceWrapperImpl , which is provided with SAS Foundation Services. When this class is instantiated by Wrapper.exe , it registers itself as an event listener and takes action whenever the native wrapper signals an event. For more information, see the
class documentation.
wrapper.app.parameter.1
- specifies the metadata source configuration file, which specifies the location of the the deployment configuration for remote foundation services. In
wrapper.conf , this directive specifies sample.config as the metadata source configuration file.
-
wrapper.additional.1
- specifies an alternate Java security policy file.
wrapper.additional.2
- specifies an alternate JAAS login configuration file that is used by the SAS Authentication Service.
Setting a Dependency for the Metadata Server Service
If your deployment metadata is stored in a SAS Metadata Repository, and the SAS Metadata Server has been installed as a service on the same machine as the SAS Services application, then you will need to specify a service dependency to ensure that the services start in the correct order. You can specify the service dependency by adding the following line to wrapper.conf :
wrapper.ntservice.dependency.1=Metadata-Service-Name
Changing Timeout Intervals
If the Java Service Wrapper is timing out while starting up or shutting down, it might be necessary to increase the timeout intervals from the default values. Add the following parameters to wrapper.conf as appropriate.
wrapper.startup.timeout
- specifies the startup timeout interval in seconds. The default value is 30.
wrapper.shutdown.timeout
- specifies the shutdown timeout interval in seconds. The default value is 30.
Specifying the Location of the Deployment Metadata
The file sample.config is a sample metadata source configuration file which specifies that the remote service deployment configuration is contained in the file sample.xml . If your deployment configuration is in a different location, then you must update your metadata source configuration file to point to either the appropriate XML file or to the appropriate SAS Metadata Repository. If the deployment configuration is in a SAS Metadata Repository, then use the following syntax in your metadata source configuration file:
software_component=name
deployment_group_1=name
omr_host=fully-qualified machine name
omr_port=port number
omr_user=domain-qualified user ID
omr_password=password
omr_repository=repository name
For more information, see
Using a SAS Metadata Repository Metadata Source
in the Foundation Services class documentation.
Executing the Java Service Wrapper
To use the Java Service Wrapper to install and run SAS Foundation Services as a Windows service, execute the following scripts. In these scripts, you can use command-line arguments to override any of the configuration directives that are contained in the wrapper.conf configuration file.
InstallRemoteServices
- installs SAS Foundation Services as a Windows service.
UninstallRemoteServices
- uninstalls the Windows service after it has been installed.
StartRemoteServices
- executes SAS Foundation Services as a Java Service Wrapper console application.
|