Previous Topic: Application Server Configuration for Database Connection PoolingNext Topic: JBoss Application Server


Enable LDAP Connection Pooling

It covers the configuration steps for the following application servers.

Apache Tomcat

To create a LDAP connection pool, do the following steps:

  1. Install the Apache Tomcat application server and test the installation by using the following URL:
    http://localhost:8080/
    
  2. Navigate to the following location:
    <TOMCAT-HOME>\conf\
    
  3. Open the catalina.properties file in a text editor.
  4. Add the following entries to the file:
  5. Save and close the file.
  6. Restart the application server.

IBM WebSphere

Perform the following steps to create a LDAP connection pool:

  1. Log in to WebSphere Administration Console.
  2. Navigate to Servers, Server Types, WebSphere application servers.
  3. Click the Server that you want to configure.
  4. In the Server Infrastructure section, click Java and Process Management.
  5. Click the Process Definition link.
  6. In the Additional Properties section, click Java Virtual Machine.
  7. In the Additional Properties section, click Custom Properties.
  8. Click New to add custom properties.
  9. Add the configurations listed in the following table as name-value pairs in the General Properties section. You have to repeat the process for every name-value pair.

Name

Value

com.sun.jndi.ldap.connect.pool.maxsize

64

com.sun.jndi.ldap.connect.pool.prefsize

32

com.sun.jndi.ldap.connect.pool.initsize

8

com.sun.jndi.ldap.connect.pool.timeout

240000

com.sun.jndi.ldap.connect.pool.protocol

plain ssl

com.sun.jndi.ldap.connect.pool.authentication

simple

  1. Click Apply.
  2. Restart WebSphere.

Oracle WebLogic

Include LDAP Options in Startup Script

This section provides the steps to include the LDAP connection pool parameters in WebLogic server startup script:

  1. Log in to the system
  2. Create a backup copy of the WebLogic Server startup script. This script is available at the following location:
    domain-name\bin\startWebLogic.cmd
    
  3. Open the script in a text editor.
  4. Add the following entries in the section that is used to start the WebLogic server.

    The following code snippet shows a sample script with LDAP connection pool parameters:

    @REM START WEBLOGIC
    echo starting weblogic with Java version:
    %JAVA_HOME%\bin\java %JAVA_VM% -version
    if "%WLS_REDIRECT_LOG%"=="" (
    echo Starting WLS with line:
    echo %JAVA_HOME%\bin\java %JAVA_VM% %MEM_ARGS% %JAVA_OPTIONS% -Dweblogic.Name=%SERVER_NAME% -Djava.security.policy=%WL_HOME%\server\lib\weblogic.policy %PROXY_SETTINGS% %SERVER_CLASS%
    %JAVA_HOME%\bin\java %JAVA_VM% %MEM_ARGS% %JAVA_OPTIONS% -Dcom.sun.jndi.ldap.connect.pool.maxsize=64 -Dcom.sun.jndi.ldap.connect.pool.prefsize=32 -Dcom.sun.jndi.ldap.connect.pool.initsize=8 -Dcom.sun.jndi.ldap.connect.pool.timeout=240000 -Dcom.sun.jndi.ldap.connect.pool.protocol="plain ssl" -Dcom.sun.jndi.ldap.connect.pool.authentication=simple -Dweblogic.Name=%SERVER_NAME% -Djava.security.policy=%WL_HOME%\server\lib\weblogic.policy %PROXY_SETTINGS% %SERVER_CLASS%
    ) else (
    echo Redirecting output from WLS window to %WLS_REDIRECT_LOG%
    %JAVA_HOME%\bin\java %JAVA_VM% %MEM_ARGS% %JAVA_OPTIONS% -Dweblogic.Name=%SERVER_NAME% -Djava.security.policy=%WL_HOME%\server\lib\weblogic.policy %PROXY_SETTINGS% %SERVER_CLASS% >"%WLS_REDIRECT_LOG%" 2>&1
    )
    
  5. Save and close the file.
  6. Restart WebLogic Server.

Specify LDAP Pool Options Using Managed Server

  1. Log in to WebLogic Administration Console.
  2. Click the Lock & Edit button, if it is not done.
  3. In the Domain Structure pane, navigate to Environment, Servers.
  4. Click the server you want to configure.
  5. In the right pane, click Server Start.
  6. In the Arguments field, include the following space-separated JVM options:
  7. Click Save and then Activate Changes.
  8. Restart WebLogic Server.