Java Clients
Using Connection PoolingPooling enables you to create a pool of connections to IOM servers. These connections are then shared and reused among multiple client applications. 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 PoolingNote: 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 JavaServer Pages (JSPs). 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 in applications that use connections for an extended period of time. Locations for Specifying Pooling ParametersFor Java clients using an IOM Bridge connection, specify pool parameters in one of the following locations:
Using Pooled ConnectionsWhen a request for a connection arrives, the request is handled as follows:
Users must notify the factory when they are finished with the connection so that it can be returned to the pool or destroyed. The factory might have a limit on the number of connections it is allowed to create and manage at a time. If a factory has already allocated all of the connections that it can manage and a new connection request arrives, the factory cannot serve the request immediately. You can specify how long to wait for another user to return a connection to the factory's pool. For details about waiting for connections, see Waiting for Connections to Become Available. Waiting for Connections to Become AvailableAt the time of a client's request for an object, it is possible that all of the available connections in a connection pool will be already allocated to other clients. For example, the Java Connection Factory might not be able to make an additional connection to a server because it would violate thesasMaxClients value that has been set for the server. In such cases, the client's request cannot be fulfilled until one of the other clients is finished with its object.
To indicate what action you want the Java Connection Factory to take when a request cannot be fulfilled immediately, you can use a
|