Directory ApacheDS
  1. Directory ApacheDS
  2. DIRSERVER-740

Re-enable thread pool max size parameter using new MINA executor

    Details

    • Type: Task Task
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0
    • Component/s: None
    • Labels:
      None

      Description

      Looks like there's no more ThreadPoolFilter in MINA and an Executor is used instead. I need to figure out from Trustin just how to set the max thread pool size now. I had to comment out some code in the ServerContextFactory on line 111 which needs to be re-enabled to allow for thread pool size configuration settings to hold.

        Activity

        Hide
        Alex Karasulu added a comment -

        Fixed on committed revision 442813:

        http://svn.apache.org/viewvc?view=rev&revision=442813

        Show
        Alex Karasulu added a comment - Fixed on committed revision 442813: http://svn.apache.org/viewvc?view=rev&revision=442813
        Hide
        Trustin Lee added a comment -

        Here's the example code:

        ThreadPoolExecutor executor = new ThreadPoolExecutor();
        // configure the executor here
        ...

        SocketAcceptorConfig cfg = new SocketAcceptorConfig();
        ...

        ExecutorThreadModel threadModel = ExecutorThreadModel.getInstance("LDAP");
        threadModel.setExecutor( executor );
        cfg.setThreadModel( threadModel );
        ...

        acceptor.bind(new InetSocketAddress(port), handler, cfg);

        You don't need to add any ExecutorFilter by yourself.

        Show
        Trustin Lee added a comment - Here's the example code: ThreadPoolExecutor executor = new ThreadPoolExecutor(); // configure the executor here ... SocketAcceptorConfig cfg = new SocketAcceptorConfig(); ... ExecutorThreadModel threadModel = ExecutorThreadModel.getInstance("LDAP"); threadModel.setExecutor( executor ); cfg.setThreadModel( threadModel ); ... acceptor.bind(new InetSocketAddress(port), handler, cfg); You don't need to add any ExecutorFilter by yourself.

          People

          • Assignee:
            Alex Karasulu
            Reporter:
            Alex Karasulu
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development