lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bryan LaPlante" <>
Subject Re: Using MultiSearcher
Date Sat, 24 May 2003 08:22:25 GMT
Ok I found my problem, it was the ArrayList() I used to hold all of the
string values for each index to be searched prior to creating an
IndexSearcher[] array to be passed to the MultiSearcher.

In researching this problem I have uncovered a more serious problem
concerning tag pooling in Tomcat where a tag handler class gets reused for
many instances of the tag in a jsp page.

Tag pooling is designed to enhance performance by reusing the same instance
of a tag handler class for multiple tags on the page. The problem is that
the values passed to these tags is also cached with the instance in the tag
pool. If you try to change the value and reuse the tag it will not pass the
new value unless the jsp page is changed in some way or Tomcat is restarted.

The administrative answer to this problem is to turn off tag pooling for all
jsp pages and not take advantage of the tag pooling. I intend to join the
Tomcat discussion and discuss this issue. It has been my experience that
other platforms such as JRun do not have this particular problem and still
achieve tag pooling, so there must be a solution that will not require an
admin to loose this benefit when using custom tags.

To change the tag pooling behavior in Tomcat do the following:


  a.. From: Bill Barker
  b.. Subject: Re: HELP:Tagpool sharing problems
  c.. Date: Mon, 28 Apr 2003 22:20:20 -0700


In $CATALINA_HOME/conf/web.xml, locate the <servlet-name>jsp</servlet-name>
servlet, and add:

This will turn off tag-pooling.  You'll also need to clear out
$CATALINA_HOME/work so that the JSP pages get re-compiled.

If you just want it turned off for one context, then you can place the
definition of the jsp servlet in your own web.xml.

If you are using:
then you also need to add the enablePooling init-param to your servlet's

----- Original Message -----
From: "Bryan LaPlante" <>
To: <>
Sent: Friday, May 23, 2003 4:02 PM
Subject: Using MultiSearcher

> Hi,
> I am have a problem using MultiSearcher and I want to ask if I am using it
> properly. Every other run of my jsp page throws an exception on the
>; line of code, otherwise it runs ok.
> the error:
> javax.servlet.ServletException:
> Bad file descriptor
> the code:
> /**
> * There is a method that creates the IndexSearcher[] called idx,
> * try/catch blocks have been removed for clarity.
> * idx looks like {new
> IndexSearcher("opt/lucene/index")),new
> IndexSearcher("search/lucene/index"))}
> */
> msearcher = new MultiSearcher(idx);
> analyzer = new StopAnalyzer();
> query = QueryParser.parse(criteria, "contents", analyzer);
> hits =;
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message