Revision: 5431
http://geonetwork.svn.sourceforge.net/geonetwork/?rev=5431&view=revAuthor: heikkidoeleman
Date: 2009-11-04 10:28:44 +0000 (Wed, 04 Nov 2009)
Log Message:
-----------
Force cleanup of resources after search -- maybe alleviate Too Many Open Files error
Modified Paths:
--------------
branches/2.4.x/src/org/fao/geonet/kernel/search/LuceneSearcher.java
Modified: branches/2.4.x/src/org/fao/geonet/kernel/search/LuceneSearcher.java
===================================================================
--- branches/2.4.x/src/org/fao/geonet/kernel/search/LuceneSearcher.java 2009-11-04 10:27:17 UTC (rev 5430)
+++ branches/2.4.x/src/org/fao/geonet/kernel/search/LuceneSearcher.java 2009-11-04 10:28:44 UTC (rev 5431)
@@ -115,14 +115,17 @@
public void search(ServiceContext srvContext, Element request, ServiceConfig config)
throws Exception
{
- computeQuery(srvContext, request, config);
- performQuery(request, srvContext!=null?true:false);
- initSearchRange(srvContext);
-
- _hits = null;
- _searcher.close();
- _searcher = null;
- setValid(false);
+ try {
+ computeQuery(srvContext, request, config);
+ performQuery(request, srvContext!=null?true:false);
+ initSearchRange(srvContext);
+ }
+ finally {
+ _hits = null;
+ _searcher.close();
+ _searcher = null;
+ setValid(false);
+ }
}
//--------------------------------------------------------------------------------
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.
http://p.sf.net/sfu/bobj-july_______________________________________________
GeoNetwork-commit mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-commit