Windows Clients
Using a Metadata Server with the SAS Object ManagerIf you are using a metadata server, the first step in developing and running a client program is to make sure you have access to a properly configured server.
After the IOM server has been configured, you can begin developing a Windows client for the server. Connecting to MetadataBefore you can use server metadata, you must first connect to a metadata server using metadata configuration files. If you created your configuration files using the ITConfig utility, the SAS Object Manager will connect to the metadata server automatically when you call a method or interface that requires metadata. If your configuration files are not in the default location and the location is not stored in the Windows registry, you must specify the location using the SetMetadataFile method. The SetMetadataFile method has three parameters: the full path to the system configuration file, the full path to the user configuration file (optional), and a flag that indicates whether to store the file path values in the registry. Note: An application should call the SetMetadataFile method one time only. To create a new metadata server connection, use the CreateOMRConnection method. Metadata CachingWhen a metadata server connection is established, the metadata is read from the server and stored by the SAS Object Manager in a cache. The cached metadata is used when you call CreateObjectByLogicalName, ServerDefs, or LoginDefs. You can use the SetRepository method to refresh the metadata from the current metadata repository or read metadata from a new repository. For details about the SetRepository method, see the SAS Object Manager reference documentation (sasoman.chm). For multi-threaded applications, using the metadata cache in the SAS Object Manager causes performance issues. The CreateObjectByOMR method enables you to read metadata from the server without caching the metadata. Object DefinitionsThere are three definitions that are useful for defining IOM objects. These definitions can be created either in the source code or on the metadata server:
For each type of definition, there is a container interface that enables you to manage the definitions. For example, ServerDef objects are managed using the ServerDefs interface. You can retrieve definitions by name using the Item method. For LDAP, you can store new definitions on the metadata server using the Add method. Security Considerations
|