20.2. Configuration of LDAP connection

20.2.1. Connection Pooling

JBoss Portal uses connection pooling provided by JNDI, and is enabled by default. Use the following options to configure connection pooling settings:
<datasource>
   <name>LDAP</name>
   <config>
      ...
      <!-- com.sun.jndi.ldap.connect.pool -->
      <option>
         <name>pooling</name>
         <value>true</value>
      </option>

      <!-- com.sun.jndi.ldap.connect.pool.protocol -->
      <option>
         <name>poolingProtocol</name>
         <value>plain ssl</value>
      </option>

      <!-- com.sun.jndi.ldap.connect.pool.timeout -->
      <option>
         <name>poolingTimeout</name>
         <value>300000</value>
      </option>

      <!-- com.sun.jndi.ldap.connect.pool.debug -->
      <option>
         <name>pooling</name>
         <value> ... </value>
      </option>

      <!-- com.sun.jndi.ldap.connect.pool.initsize -->
      <option>
         <name>poolingInitsize</name>
         <value> ... </value>
      </option>

      <!-- com.sun.jndi.ldap.connect.pool.maxsize -->
      <option>
         <name>poolingMaxsize</name>
         <value> ... </value>
      </option>

      <!-- com.sun.jndi.ldap.connect.pool.prefsize -->
      <option>
         <name>poolingPrefsize</name>
         <value> ... </value>
      </option>

      ...
   </config>
</datasource>
Remember, as it is described in the JNDI documentation, these options are system properties, not environment properties, and as such, they affect all connection pooling requests in the Java runtime environment™.