Scarab commit: svn commit: r10565 - trunk/src/java/org/tigris/scarab/util/word/IssueSearchFactory.java

[email protected]
Newsgroups gmane.comp.java.scarab.cvs
Message-ID <[email protected]>
Author: hair
Date: 2008-05-07 05:34:17-0700
New Revision: 10565

Modified:
   trunk/src/java/org/tigris/scarab/util/word/IssueSearchFactory.java

Log:
The properties
 scarab.concurrent.search.max
 scarab.concurrent.search.wait
were hardcoded and never read. 
Defaults are as they were.

Modified: trunk/src/java/org/tigris/scarab/util/word/IssueSearchFactory.java
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/java/org/tigris/scarab/util/word/IssueSearchFactory.java?view=diff&rev=10565&p1=trunk/src/java/org/tigris/scarab/util/word/IssueSearchFactory.java&p2=trunk/src/java/org/tigris/scarab/util/word/IssueSearchFactory.java&r1=10564&r2=10565
==============================================================================
--- trunk/src/java/org/tigris/scarab/util/word/IssueSearchFactory.java	(original)
+++ trunk/src/java/org/tigris/scarab/util/word/IssueSearchFactory.java	2008-05-07 05:34:17-0700
@@ -48,6 +48,7 @@
 
 // JDK classes
 
+import org.apache.turbine.Turbine;
 import org.tigris.scarab.om.Issue;
 import org.tigris.scarab.om.IssueType;
 import org.tigris.scarab.om.MITList;
@@ -94,7 +95,8 @@
     int getMaxInstances()
     {
 	// TODO: should be a fraction of the number of connections in the connection pool;
-        return 4;
+        return Turbine.getConfiguration()
+            .getInt("scarab.concurrent.search.max", 4);
     }
 
     /**
@@ -109,10 +111,8 @@
     int getMaxWait()
     {
         // TODO: FIXME: Should be avalon component.
-        // int max = Turbine.getConfiguration()
-        //    .getInt("scarab.concurrent.search.wait", -1);
-        int max = 20; // if for any reason scarab search gets blocked we now get informed on the screen.
-                      // instead of getting a frozen scarab. [HD]
+        int max = Turbine.getConfiguration()
+            .getInt("scarab.concurrent.search.wait", 20);
         max *= 1000;
         return max;         
     }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.