Skip to Content
author's profile photo
Former Member

Connection Pooling with SAP.NET connector


I'm using the connectionpool class of the SAP.NET connector...


where BPartnerProxy is the proxy object. Â

BPartnerProxy.Connection = SAP.Connector.SAPConnectionPool.GetConnection(ConfigurationSettings.AppSettings("SAPConnectionString"))Â Â

and then the code to return the connection after the RFC call is made:Â Â

SAP.Connector.SAPConnectionPool.ReturnConnection(BPartnerProxy.Connection)Â Â

How do you manage the pool i.e. create a pool of x number of connections or see how many connections are left in the pool...?


Nick Wright

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Posted on Oct 23, 2003 at 12:01 PM

    Hello Nick,

    the connection pool is configured using the  app.config / web.config file of you application.

    Here's an example:

    Statistic about the connection pool is currently not available. This feature will be added in next version.


    Add comment
    10|10000 characters needed characters exceeded

    • Hello Edwin,

      the connection pool is not made to limit concurrent ACTIVE connections; it's made to reuse NON-ACTIVE connections.

      There is no featuere to limit active connections in NCo, but you can easily add it by your own: Whenever you creae a connection (or fetch it from the pool), you increase a counter. When you close it or return it to pool, you decrease the counter. When the counter reaches a limit during creation of a connection, you block.