Commit c84872ba authored by Matt Tucker's avatar Matt Tucker Committed by matt

Improved thread pool settings. Needs to be tested to verify correctness.


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@1515 b35dd754-fafc-0310-a699-88a17e54d16e
parent a3ada19c
......@@ -14,9 +14,9 @@ package org.jivesoftware.util;
import java.security.Security;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.ArrayBlockingQueue;
import javax.mail.Address;
import javax.mail.*;
......@@ -87,8 +87,8 @@ public class EmailService {
* Constructs a new EmailService instance.
*/
private EmailService() {
executor = new ThreadPoolExecutor(1, 5, 60,
TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>());
executor = new ThreadPoolExecutor(1, Integer.MAX_VALUE, 60,
TimeUnit.SECONDS, new ArrayBlockingQueue<Runnable>(5));
host = JiveGlobals.getProperty("mail.smtp.host", "localhost");
port = JiveGlobals.getIntProperty("mail.smtp.port", 25);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment