1 Oct 2011 02:48
Re: DataImportHandler using new connection on each query
Chris Hostetter <hossman_lucene <at> fucit.org>
2011-10-01 00:48:14 GMT
2011-10-01 00:48:14 GMT
: > Noble? Shalin? what's the point of throwing away a connection that's been : > in use for more then 10 seconds? : Hoss, as others have noted, DIH throws away connections which have been idle : for more than the timeout value (10 seconds). The jdbc standard way of : checking for a valid connection is not implemented or incorrectly : implemented by many drivers. So, either you can execute a query and get an : exception and try to determine if the exception was a case of an invalid : connection (which again is sometimes different from driver to driver) or : take the easy way out and throw away connections idle for more than 10 : seconds, which is what we went for. Hmmm... a) at a minimum this seems like it should be a config option -- why punish people using "good" jdbc drivers? b) you keep refering to this time out in relation to connections being *idle* longer then 10 seconds, but unless i'm missing something that's not what it's doing at all. The only time connLastUsed is assigned to is when getConnection() is called - so even if a connection has only been idle for 1 pico-second, it will still be closed/reopened if the total amount of time it was used before being idle was more then 1 second -- that was the scenerio described in the first message of this thread... second 000: app starts second 006: ResultSetIterator constructed on queryA(Continue reading)
But the design of the index creation mechanism is still a little bit
confusing and we are unsure what is the "best" strategy to set up an index
correctly.
The main framework for our webapps is spring with all submodules like
springbatch.
What is the proper way to setup an index from different datasources?
Should we create a special springbased dataimporthandler that does all the
logic and has access to three differenct datasources (database, webservice,
file) or should we implement the business logic outside solr and send
searchdocuments afterwards to solr?
We prefer the first proposed version with the dataimporthandler, but I did
not find any example to integrate spring into a dataimporthandler.
Can you provide some hints how to integrate spring?
Thank you.
Best regards.
RSS Feed