### *** This class provides Binary Compatibility only, not Source Compatibility ***

Package com.sas.iom

# Class WorkspacePoolDriver

java.lang.Object
com.sas.iom.WorkspacePoolDriver

@SASScope("ALL") @BinaryCompatibilityOnly public class WorkspacePoolDriver extends Object
Deprecated.
The methods in this class are ambiguous. Use com.sas.iom.WorkspaceFactory instead. It is not always clear when calling `getPooledWorkspace` if the intent is to create a new connection pool or to get a connection from an existing pool. Furthermore, calls to `closePool` may match more than one pool, and the caller has no way to control which pools should be closed.
The old interface for connection pooling.

See Also:
  - `WorkspaceFactory`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static void`
  `closePool(Hashtable credentials, String searchContext, String sasLogicalName, String userDN)`
  Deprecated.
  Close all unused workspace objects in the appropriate pool(s).
  `static PrintWriter`
  `getLog()`
  Deprecated.
  Messages about all pools operating under this driver are printed on this writer.
  `static WorkspaceConnector`
  `getPooledWorkspace(Hashtable credentials, String searchContext, String sasLogicalName, String userDN, long waitMilliseconds)`
  Deprecated.
  Get a workspace from an appropriate pool.
  `static void`
  `setLog(PrintWriter l)`
  Deprecated.
  Messages about all pools operating under this driver will be printed on this writer.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### getPooledWorkspace

    public static WorkspaceConnector getPooledWorkspace(Hashtable credentials, String searchContext, String sasLogicalName, String userDN, long waitMilliseconds) throws WorkspacePoolException
    Deprecated.
    Get a workspace from an appropriate pool.
    Parameters:
      `credentials` - information that identifies a JNDI directory and specifies how to bind to it. Behavior is undefined if the value of this parameter is `null`.
      `searchContext` - the starting point in the JNDI directory for searches. Behavior is undefined if the value of this parameter is `null`.
      `sasLogicalName` - a logical name that identifies a pool or a set of pools. Behavior is undefined if the value of this parameter is `null`.
      `userDN` - the distinguished name of a user or group of users that is used to determine which, if any, of the the pools identified by `sasLogicalName` can be used to fulfill this request. If the value is `null`, then any of the pools identified by `sasLogicalName` can be used to fulfill this request.
      `waitMilliseconds` - used if the workspace pool has reached its maximum use threshold at the time of this method call. If that is the case, then this method will behave in one of the three following ways based on the value of `waitMilliseconds`:

      greater than zero
        this method will wait up to N milliseconds for workspace pool usage to fall below the threshold (where N is the value of `waitMilliseconds`) before either returning a workspace connector or throwing an exception.
      zero
        this method will wait indefinitely for workspace pool usage to fall below the maximum usage threshold, and will return a workspace connector once it does.
      less than zero
        this method will throw an exception immediately.
    Returns:
      a connector to a workspace
    Throws:
      `WorkspacePoolException` - if the given logical name and user DN do not identify any workspace pools or if the given credentials do not provide sufficient authority to access the workspace pool information in JNDI or if the pool cannot be initialized.

  - ### closePool

    public static void closePool(Hashtable credentials, String searchContext, String sasLogicalName, String userDN) throws WorkspacePoolException
    Deprecated.
    Close all unused workspace objects in the appropriate pool(s). Workspace objects in use at the time of this call will not be closed until they are released by their users. Multiples calls to this method per pool do no harm. Requests for workspaces that occur after the pool that would service the request has been closed result in the pool being reinitialized. Exceptions that occur while closing workspace objects will be reported in the log but will not result in an exception being thrown from this method.
    Parameters:
      `credentials` - information that identifies a JNDI directory and specifies how to bind to it. Behavior is undefined if the value of this parameter is `null`.
      `searchContext` - the starting point in the JNDI directory for searches. Behavior is undefined if the value of this parameter is `null`.
      `sasLogicalName` - a logical name that identifies a pool or a set of pools. Behavior is undefined if the value of this parameter is `null`.
      `userDN` - the distinguished name of a user or group of users that is used to determine which, if any, of the the pools identified by `sasLogicalName` should be closed. If the value is `null`, then all of the pools identified by `sasLogicalName` will be closed.
    Throws:
      `WorkspacePoolException` - if the given logical name and user DN do not identify any workspace pools or if the given credentials do not provide sufficient authority to access the workspace pool information in JNDI.

  - ### setLog

    public static void setLog(PrintWriter l)
    Deprecated.
    Messages about all pools operating under this driver will be printed on this writer.
    Parameters:
      `log` - writer to print messages to.

  - ### getLog

    public static PrintWriter getLog()
    Deprecated.
    Messages about all pools operating under this driver are printed on this writer.
    Returns:
      writer to print messages to.