Application Server Solutions for Microsoft IIS and ASP.NET
       solutions   products   partners   company   support   downloads         store
ServletExec Self-Help: FAQ
Back to Search >  Back to Search Results

Faq ID 206
Product ServletExec
Category Connection Pooling
Question How can I turn off Connection Pooling with SE AS ?
Answer Firstly, we should point out that when this FAQ says "Connection Pooling" this has absolutely nothing to do with JDBC or any sort of Database or DataSource.
By Connection Pooling we mean a pool of sockets that are created by the SE AS native adapter for use in communicating with a particular SE AS Java Instance. If you are using SE ISAPI or SE NSAPI then this information does not apply to your configuration in any way whatsoever.
Connection pooling for SE AS between its native adapter and its Java instance is a feature that was added in ServletExec 4.0b1 (5/4/01). And it is only reusing multiple connections when SE AS is running on Windows with (IIS, iWS, or Apache), or if it is running on Unix with iWS.
If you are using SE AS with Apache on Unix then you should know that Apache on Unix maintains its own pool of server processes (where the SE AS native adapter is loaded into each Apache process). Each Apache Virtual Server has it's own pool of processes. Because of the fact that Apache on Unix works this way, the SE AS native adapter for Apache on Unix uses a connection pool of size = 1. So the "pooling" is at the Apache "process" level, and the single connection in each pool is reused.
The following information tells how to turn off this connection pool so that no connection is ever re-used:

  • For all SE AS native adapters except for Apache on Unix:
    The SE Installation Guide discusses how to tweak the settings of this connection pool.
    For example in the SE 4.2 Installation Guide, section is just one place where this feature and its configurability are discussed.

    In summary:
    To turn it off you'd need to edit the appropriate configuration file depending on your version of SE, and your webserver brand, to set the following 2 SE native adapter parameters to the given values:
    • pool-max-idle=0
    • pool-increment=1

    These parameters are described in the appropriate SE Installation Guide (whichever version of SE you are using).
    The Installation Guide is freely downloadable from:

    NOTE: If you are using SE 5.x AS or higher, then you'd set those parameters in the file.

    Here are examples of the syntax for setting those parameters for SE 4.x (not 5.x or higher):
    • If using iWS 4.1 or 6.0, you would edit obj.conf to pass these parameters to the ServletExecInit function like this (for example):
      Init fn="ServletExecInit" <instance-name>.instances="" <instance-name>.pool-max-idle=0 <instance-name>.pool-increment=1
      all one line with a single space between each <instance-name> property
    • For SE AS with Apache on Unix:
      You must edit the mod_servletexec.c file and then rebuilt it using apxs.
      Look in the mod_servletexec.c source file to find the following:

      /* Apache 1.x on Unix isn't multi-threaded so we need only one connection per process */
      #define DEFAULT_POOL_MAX_IDLE 1

      You'll need to edit the DEFAULT_POOL_MAX_IDLE value to be zero. To learn how to rebuild the adapter follow the steps given at the bottom of the SE 5.0 patch ReadMe.txt file (even if you aren't using SE 5.0, the concept for rebuilding the adapter is the same)

company media information terms of use privacy policy contact us