Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-6285

Use factory method to create thread pool for timed login

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 10.10.1.1
    • 10.11.1.1
    • JDBC
    • None
    • Normal

    Description

      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.

      Attachments

        1. derby-6285-1a.diff
          2 kB
          Knut Anders Hatlen

        Activity

          People

            knutanders Knut Anders Hatlen
            knutanders Knut Anders Hatlen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: