!--a11y-->
SAPConnectionPool Class 
Connection pooling is a more sophisticated way of managing SAP Connections. In a two-tier deployment we do not recommend to use this as each client has its own connection. In an n-tier deployment where multiple users are using the same connection attributes (for example a web site that is accessed by many users) it may make sense to use connection pooling. Alternatively, consider using the SAPLogin Provider and SAPLogin Form.
|
[C#] public class SAPConnectionPool : System.Object |
Public Constructor
|
public SAPConnectionPool ( ) |
Static object of the SAP .Connector |
Public Methods
|
public static SAP.Connector.SAPConnection GetConnection (System.String connectionString) |
Gets a connection from the connection pool by passing in the connection string |
|
public static void ReturnConnection (SAP.Connector.SAPConnection connection) |
Returns the connection to the connection pool |
Example
The sample application DNCWebServiceSample uses connection pooling.
|
using(proxy.Connection = SAP.Connector.SAPConnectionPool.GetConnection(this.destination1.ConnectionString)) |