Using COM+ Pooling
To obtain a PooledObject object, create a new PooledObject object using COM. The COM+ interceptors detect this creation and take care of pooling the PooledObject objects. The PooledObject object has been written to support the COM+ pooling mechanism.
See using COM+ pooling for an example.
Administering COM+ Pooling
To administer a COM+ pool, use the COM+ Component Services administrative tool, which is a standard Microsoft Management Console (MMC) plug-in that ships with Windows 2000.
You can configure COM+ pools in two different ways:
- Library application each process has its own pool.
- Server application the pool is shared by all processes on the same machine.
To create a new COM+ server application:
- Start the Component Services administrative tool: select Start Programs Administrative Tools Component Services.
- Expand Component Services Computer COM+ Applications. Right-click COM+ Applications and select New Application. This starts a wizard. Click Next.
- Select Create an Empty Application.
- Enter a name of your choice, and select Server application as the Activation Type. Click Next.
- Specify an identity, and click Next.
- Click Finish.
To add the PooledObject component to the application:
- In the tree view, expand the application you previously created in order to see Components and Roles.
- Right-click Components and select New Component, which brings up a wizard.
- Click Next, then click Import components that are already registered.
- Select SASObjectManager.PooledObject.1, then click Next and Finish.
To administer the pooling properties:
- Right-click SASObjectManager.PooledObject.1 under the Components node of the application you created and select Properties from the pop-up menu.
- Select the Activation tab.
- Select the Enable object pooling check box. Enter the properties.
- You can also enter a constructor string, which allows you to specify which machine SAS should run on. For more information, see Constructor Strings.
Note: If you do not specify a constructor string, the SAS Object Manager will create workspaces on the local machine using COM. It is only necessary to configure a metadata server with pooling metadata if you specify a logicalName.
The constructor string is a single string that specifies the parameters that are used to initially create the pool. The SAS Object Manager (or Version 8 SAS Workspace Manager) requires that the constructor string contain a set of name/value pairs, with the names separated from the values by an equals sign(=), and the pairs separated by a semi-colon (;). If no parameters are specified, then a pool consisting of SAS servers running on the local machine will be created. You should never use quotation marks (") in the constructor string. The constructor string contains the only attributes specific to SAS.
If errors occur when creating a workspace, the SAS Object Manager (or Version 8 SAS Workspace Manager) writes entries to the Event Log.
Constructor Parameters Used to Connect with Metadata
- Specifies which sasServer objects to use when creating objects in the pool.
- Specifies the login to use for authentication. This is only necessary for an IOM Bridge connection. For the SAS Metadata Server, specifying only the logicalName parameter will set the value of referencedn as the identity of the user that is specified in the metadata configuration file.
Here is an example of a valid constructor string for LDAP:
Here is an example of a valid constructor string for a SAS Metadata Server:
Constructor Parameters Used to Connect without Metadata
- specifies the class ID number. For example,
2887E7D7-4780-11D4-879F-00C04F38F0DB specifies a SAS Metadata Server. The default value is
440196D4-90F0-11D0-9F41-00A024BB830C, which specifies a SAS Workspace Server.
- specifies the name of the machine to connect to.
- can be either com or bridge.
- specifies the port number of a server to connect to. (This should only be specified for an IOM Bridge connection.)
- used to resolve a TCP/IP service to a port number. This should only be specified for an IOM Bridge connection. Only one of the port or serviceName parameters should be specified.
- specifies the user ID to use when connecting to a SAS server. This should only be specified for an IOM Bridge connection.
- defines the password that authenticates the loginName. This should only be specified for an IOM Bridge connection.