SAS 9.1.3 Integration Technologies » Developer's Guide


Developing Windows Clients
Client Requirements
Client Installation
Security
Selecting a Windows Programming Language
Programming with Visual Basic
Programming in the .NET Environment
Using VBScript
Programming with Visual C++
Using the Object Manager
Creating an Object
Object Manager Interfaces
Using a Metadata Server with the Object Manager
Metadata Configuration Files
Error Reporting
Code Samples
Using Connection Pooling
Choosing Integration Technologies or COM+ Pooling
Using Integration Technologies Pooling
Using Com+ Pooling
Pooling Samples
Using the IOM Data Provider
Using the Workspace Manager
Class Documentation
Windows Clients

Using Connection Pooling

Pooling enables you to create a pool of connections to IOM servers. The connection pool can be shared between multiple connection requests within the same process, and the connections can be reused. Pooling improves the efficiency of connections between clients and servers because clients use the connections only when they need to process a transaction.

When to Use Pooling

Note: Pooling can only be used with SAS Workspace Servers.

Pooling is most useful for applications that require the use of an IOM server for a short period of time. Because pooling reduces the wait that an application incurs when establishing a connection to SAS, pooling can reduce connection times in environments where one or more client applications make frequent but brief requests for IOM services. For example, pooling is useful for Web applications, such as Active Server Pages (ASP).

Pooling is least useful for applications that acquire an IOM server and use the server for a long period of time. A pooled connection does not offer any advantage to applications that use connections for an extended period of time.

What Kind of Pooling to Use

The SAS Object Manager supports two different pooling mechanisms: SAS Integration Technologies pooling and COM+ pooling. The most noticeable difference between the two mechanisms is the way in which the pools are administered. The two pooling mechanisms also differ in the way the programmer makes the call to get the pooled object connection. 

For Windows clients, you can choose between SAS Integration Technologies and COM+ pooling. For information, see Choosing SAS Integration Technologies or COM+ Pooling.

Note: Java applications and COM applications cannot share the same pool, but they can share the administration model used for the pools.

Using the Pooled Connection Object

In both the COM+ case and the SAS Integration Technologies case, the ObjectManager represents a pooled connection with the PooledObject COM object. The PooledObject COM object has the 'SASObject' property, which holds the interface pointer to the object actually being pooled. It also has the ReturnToPool() method to allow the object to be reused.

When a PooledObject object is obtained, the calling application keeps a reference to the PooledObject object for as long as it needs to use the object. You can use ReturntoPool to release the PooledObject connection and return the associated connection to the pool. Returning the PooledObject connection to the pool also causes the object to be cleaned up so that no further calls can be made on the object.

For more information about the client-side coding for pooling, see the online Help shipped with the SAS Object Manager.

Using Puddles

Each pool can have any number of puddle objects. The metadata server administrator can choose to partition a pool of connections into several puddles in order to allow different users connecting to the pool different permissions when running in SAS. For example, one user might be granted access to a puddle that can access summary data sets within SAS; another executive user might be granted access to a different puddle that can access more detailed data.