Using Connection Pooling

Overview of 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

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.
Note: Pooling can be used only with SAS Workspace Servers.

What Type 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.
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 that is used for the pools.

Using the Pooled Connection Object

In both COM+ pooling and SAS Integration Technologies pooling, 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 Help for the SAS Object Manager (sasoman.chm).

Using Puddles

Each pool can have any number of puddle objects. The metadata server administrator can partition a pool of connections into several puddles to allow users to have different permissions. 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.