> Perhaps I'm missing something, but why not co-locate the seatrch engine with
> the web service? Create it in Servlet.init() and dispose of it in
> Servlet.destroy(); (As far as I know, there's no equivalent of
> Servlet.init() in .NET; it allows you to perform initiialization when the
> container starts up, as opposed to when the first request is received.)
Nit: The init() method is not called when the container starts up,
necessarily, but
> ... by the servlet container to indicate to a servlet that the servlet is being placed into service.
For non-single-instance servlets, that could be multiple times as I read the
Javadocs.

Signature
Lew
Mike Schilling - 19 Oct 2007 15:20 GMT
>> Perhaps I'm missing something, but why not co-locate the seatrch
>> engine with the web service? Create it in Servlet.init() and dispose
[quoted text clipped - 8 lines]
>> ... by the servlet container to indicate to a servlet that the
>> servlet is being placed into service.
Right. I was assuming that the servlet would be started at container
startup, but this is a per-servlet configuration option.
> For non-single-instance servlets, that could be multiple times as I
> read the Javadocs.
That's true. This is an unusual case, though; servlets can have multiple
instances only if they implement SingleThreadModel, and that's deprecated in
Servlet 2.4.
Lew - 19 Oct 2007 20:30 GMT
> ... servlets can have multiple
> instances only if they implement SingleThreadModel, and that's deprecated in
> Servlet 2.4.
Rrr? I thought it was up to the servlet container how many instances it fires up.

Signature
Lew
Mike Schilling - 19 Oct 2007 20:55 GMT
>> ... servlets can have multiple
>> instances only if they implement SingleThreadModel, and that's
>> deprecated in Servlet 2.4.
>
> Rrr? I thought it was up to the servlet container how many instances
> it fires up.
Not acording to the spec. See
http://jcp.org/aboutJava/communityprocess/final/jsr154/index.html, where you
can download it; I can't find it online.