You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Knut Anders Hatlen (JIRA)" <ji...@apache.org> on 2013/07/01 17:07:20 UTC

[jira] [Created] (DERBY-6285) Use factory method to create thread pool for timed login

Knut Anders Hatlen created DERBY-6285:
-----------------------------------------

             Summary: Use factory method to create thread pool for timed login
                 Key: DERBY-6285
                 URL: https://issues.apache.org/jira/browse/DERBY-6285
             Project: Derby
          Issue Type: Improvement
          Components: JDBC
    Affects Versions: 10.10.1.1
            Reporter: Knut Anders Hatlen
            Assignee: Knut Anders Hatlen
            Priority: Trivial


InternalDriver creates a thread pool for running timed logins like this:

    private static final ThreadPoolExecutor _executorPool =
            new ThreadPoolExecutor(0, Integer.MAX_VALUE, 60L, TimeUnit.SECONDS,
                                   new SynchronousQueue<Runnable>());
    static {
        _executorPool.setThreadFactory(new DaemonThreadFactory());
    }

The java.util.concurrent.Executors class has factory methods that create thread pools and hide the details such as choosing keep-alive time and which kind of queue to use.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira