• Print  |
  • Feedback  |

FOCUS AREAS

Developer Resources

Products

Technologies

API Reference

SAS AppDev Studio 3.0 Developer's Site

SAS Foundation Services Support Templates

Overview
Templates

Overview

The templates found in the Foundation Services Support content type differ from other typical content type templates which provide starter files that you are expected to modify. Instead they provide ready to use files that serve a specific support function related to SAS Foundation Services. In addition, when adding one of these templates, updates are made to the project's webapp.properties file to record the presence of its support function in the Web application, regardless of the name given to the file. Example templates that need various support functions won't attempt to add additional files for support functions that are already present, even if the file names differ.

Templates

The various sections below contain details about the templates in the Foundation Services Support content type.

Context Listener For Default Services Template

This template provides support for destroying default Foundation Services. It should be added to Web applications that don't need to deploy any services, but make use of classes that instantiate default Foundation Logging or Discovery services. Destruction of these services in necessary for proper Web application clean up when the Web application is shutdown. This template will modify the Web application's web.xml file to declare the listener.

Default project files:

File Location Purpose
FoundationServicesContextListener.java <webappbase>/WEB-INF/classes/listeners A ServletContextListener template that just destroys default Foundation Services.


Context Listener For Local Services Template

This template provides support for deploying and destroying local Foundation Services. The local services are specified using a properties file which supplies information for logging into an OMR server and reading the services metadata to deploy. This template will modify the Web application's web.xml file to declare the listener and to add a context parameter that specifies the services metadata properties file.

Default project files:

File Location Purpose
FoundationServicesContextListener.java <webappbase>/WEB-INF/classes/listeners A ServletContextListener template that just destroys default Foundation Services.
java.webapp.policy root project directory A minimal security policy file for use without a security manager. See the Server Policy File without Security Manager template for details.
sas_metadata_source_omr.properties <webappbase>/WEB-INF/conf The properties file that defines metadata and local foundation service information.

NOTE: The sas_metadata_source_omr.properties file must be modified to use the appropriate password.


Context Listener For Remote and Local Services Template

This template provides support for deploying and destroying local and remote Foundation Services. The local and remote services are specified using properties files which supply information for logging into an OMR server and reading the services metadata to deploy. This template will modify the Web application's web.xml file to declare the listener and to add a context parameters that specify the services metadata properties files.

Default project files:

File Location Purpose
FoundationServicesContextListener.java <webappbase>/WEB-INF/classes/listeners A ServletContextListener template that just destroys default Foundation Services.
java.webapp.policy root project directory A minimal security policy file for use without a security manager. See the Server Policy File without Security Manager template for details.
sas_metadata_source_omr.properties <webappbase>/WEB-INF/conf The properties file that defines metadata and local foundation service information.
sas_remote_metadata_source_omr.properties <webappbase>/WEB-INF/conf The properties file that defines metadata and remote foundation service information.

NOTE: The sas_metadata_source_omr.properties and sas_remote_metadata_source_omr.properties files must be modified to use the appropriate password.


JAAS Login Configuration File

This template provides a JAAS login configuration file that authenticates against a SAS Metadata server. This configuration file is enabled by setting the "java.security.auth.login.config" System property to the location of this file. This is done automatically when this template is added to the Web application project.

Default project files:

File Location Purpose
login.config root project directory A JAAS login configuration file for authenticating against a SAS Metadata server. The value of the JVM System property, java.security.auth.login.config, will be set to the location of this file.


Logging Service Configuration File

This template provides a Logging Service configuration file for the SAS Foundation Services. This configuration file is enabled by calling the com.sas.services.logging.LoggingService.setConfigurationURL() method with a URL that references this file. This must be done prior to deploying a Logging Service.

All of the Foundation Services Support Context Listener templates and those present in the example templates provide this functionality. They use a "logging.service.configuration" context parameter specified in the Web application's web.xml file to obtain the URL needed. This content parameter is set automatically when you add this template to the Web application project.

For additional details, refer to comments in the logging configuration file. To disable this logging configuration, comment out the "logging.service.configuration" context parameter in the web.xml file.

Default project files:

File Location Purpose
LoggingServiceConfig.xml <webappbase>/WEB-INF A Logging Services configuration file to control logging from SAS Foundation Services. A "logging.service.configuration" context parameter will be set to the location of this file in the web.xml file.


Server Policy File with Security Manager

This template provides a policy file necessary for using SAS Foundation Services when a security manager is present. It includes the standard permissions for the Tomcat Catalina server as well as permissions for the project's Web application.

The policy file uses System properties to provide some configurability to the permissions without requiring the policy file be edited. Default values are added to the project's startup settings. If a value is already present for one of the System properties, it is not changed. For details, see the comments in the policy file under "SAS AppDev Studio Web Application Permissions."

Default project files:

File Location Purpose
java.webapp.policy root project directory A standard security policy file for use with a security manager. The value of the JVM System property, java.security.policy, will be set to the location of this file.


Server Policy File without Security Manager

This template provides a policy file necessary for using SAS Foundation Services when a security manager is not present. The permissions in this policy are needed to satisfy some hard coded permission checks related to UserContexts. These checks occur even when a security manager has not been enabled.

Default project files:

File Location Purpose
java.webapp.policy root project directory A minimal security policy file for use without a security manager. The value of the JVM System property, java.security.policy, will be set to the location of this file.