Author: ozeigermann
Date: Wed Apr 11 08:59:18 2007
New Revision: 527546

URL: http://svn.apache.org/viewvc?view=rev&rev=527546
Log:
Quick hack to prevent spawning of innumerous threads when there is 
no correct check for a connected store

Modified:
    jakarta/slide/trunk/src/stores/org/apache/slide/index/lucene/Index.java

Modified: 
jakarta/slide/trunk/src/stores/org/apache/slide/index/lucene/Index.java
URL: 
http://svn.apache.org/viewvc/jakarta/slide/trunk/src/stores/org/apache/slide/index/lucene/Index.java?view=diff&rev=527546&r1=527545&r2=527546
==============================================================================
--- jakarta/slide/trunk/src/stores/org/apache/slide/index/lucene/Index.java 
(original)
+++ jakarta/slide/trunk/src/stores/org/apache/slide/index/lucene/Index.java Wed 
Apr 11 08:59:18 2007
@@ -171,11 +171,19 @@
 
        public void start() {
                if (configuration.indexAsynchron) {
-                       this.indexThread = new JobRunner();
-                       this.indexThread
-                                       .setName("Indexing Thread (" + 
this.indexName + ")");
-                       
this.indexThread.setPriority(configuration.getPriority());
-                       this.indexThread.start();
+            if (this.indexThread != null) {
+                // this really should be WARNING, but this can get called so
+                // many times
+/*                getLogger().log(
+                        "Indexing thread has already been started! Not 
starting a new one!",
+                        Logger.WARNING);
+*/
+            } else {
+                this.indexThread = new JobRunner();
+                this.indexThread.setName("Indexing Thread (" + this.indexName 
+ ")");
+                this.indexThread.setPriority(configuration.getPriority());
+                this.indexThread.start();
+            }
                }
        }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to