mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Matthew Swift
30.58.2014 997a9d0f979f42af0010fadd192c896043781b19
Partial fix for OPENDJ-1500: upgrade SDK to Grizzly 2.3.14
2 files modified
19 ■■■■ changed files
opendj-ldap-sdk/src/main/java/com/forgerock/opendj/ldap/DefaultTCPNIOTransport.java 17 ●●●● patch | view | raw | blame | history
pom.xml 2 ●●● patch | view | raw | blame | history
opendj-ldap-sdk/src/main/java/com/forgerock/opendj/ldap/DefaultTCPNIOTransport.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2010 Sun Microsystems, Inc.
 *      Portions copyright 2011-2013 ForgeRock AS
 *      Portions copyright 2011-2014 ForgeRock AS
 */
package com.forgerock.opendj.ldap;
@@ -36,6 +36,7 @@
import org.glassfish.grizzly.nio.transport.TCPNIOTransportBuilder;
import org.glassfish.grizzly.strategies.SameThreadIOStrategy;
import org.glassfish.grizzly.strategies.WorkerThreadIOStrategy;
import org.glassfish.grizzly.threadpool.ThreadPoolConfig;
import com.forgerock.opendj.util.ReferenceCountedObject;
@@ -54,7 +55,7 @@
    @Override
    protected void destroyInstance(final TCPNIOTransport instance) {
        try {
            instance.stop();
            instance.shutdownNow();
        } catch (final IOException e) {
            DEBUG_LOG.log(Level.WARNING,
                    "An error occurred while shutting down the Grizzly transport", e.getMessage());
@@ -102,9 +103,9 @@
            selectorThreadCount =
                    useWorkerThreadStrategy ? Math.max(2, cpus / 4) : Math.max(5, (cpus / 2) - 1);
        }
        builder.getSelectorThreadPoolConfig().setCorePoolSize(selectorThreadCount).setMaxPoolSize(
                selectorThreadCount).setPoolName("OpenDJ LDAP SDK Grizzly selector thread");
        builder.setSelectorThreadPoolConfig(ThreadPoolConfig.defaultConfig().setCorePoolSize(
                selectorThreadCount).setMaxPoolSize(selectorThreadCount).setPoolName(
                "OpenDJ LDAP SDK Grizzly selector thread"));
        // Calculate the number of worker threads.
        if (builder.getWorkerThreadPoolConfig() != null) {
@@ -116,9 +117,9 @@
            } else {
                workerThreadCount = useWorkerThreadStrategy ? Math.max(5, (cpus * 2)) : 0;
            }
            builder.getWorkerThreadPoolConfig().setCorePoolSize(workerThreadCount).setMaxPoolSize(
                    workerThreadCount).setPoolName("OpenDJ LDAP SDK Grizzly worker thread");
            builder.setWorkerThreadPoolConfig(ThreadPoolConfig.defaultConfig().setCorePoolSize(
                    workerThreadCount).setMaxPoolSize(workerThreadCount).setPoolName(
                    "OpenDJ LDAP SDK Grizzly worker thread"));
        }
        // Parse IO related options.
pom.xml
@@ -106,7 +106,7 @@
    <sdkDocTargetVersion>2.6.7</sdkDocTargetVersion>
    <siteDistributionURL>scp://forgerock.org/var/www/vhosts/opendj.forgerock.org/httpdocs</siteDistributionURL>
    <i18nFrameworkVersion>1.4.0</i18nFrameworkVersion>
    <grizzlyFrameworkVersion>2.3.4</grizzlyFrameworkVersion>
    <grizzlyFrameworkVersion>2.3.14</grizzlyFrameworkVersion>
    <forgerockRestVersion>2.0.2</forgerockRestVersion>
    <gaId>UA-23412190-8</gaId>
    <!-- OSGi bundles properties -->