I'm using Xindice in Tomcat Servlet environement. I logged elapsed time for connection with XML:DB API. The result is ~750ms for first connection. But next connections takes between 20-40ms.I do not use any connection pooling mechanism so every request to servlet try to reconnect to Xindice.
We were discussing something similar in the Cocoon mailing list.
Apparently Cocoon does not use any Connection Pool for its connections
to XIndice and there may in fact be a memory leak with opening up new connections each time.
However let me make a guess....
I think the XML:DB protocol is based upon an http connection request and response. http 1.0 by does not keep any connection alive between separate requests. However I think that http1.1 does. This means that subsequent requests may be faster than the first one.
I'm not expert in this but that might give you a few leads to be getting on with.
Other possibilities are that there are services in XINdice which only start up when they are requested - but that is a big guess. You can test that by automatically making a request when you start up the server....
Alex McLintock
Openweb Analysts Ltd, London: Software For Complex Websites http://www.OWAL.co.uk/
Free Consultancy for London Companies thinking of Open Source Software.
