Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
We have a few doubts regarding Aperture
1.While crawling a datasource (File Server) which order is followed (for instance.,by size, lastmodifieddate of the file etc..)
2. What is the best method to dispose a data object. Should we use object.dispose() method to dispose?
If the dispose function is disposing all the data objects. then, i assume that it is utilizing all the memory allocated by creating new dataobject for each file without disposing the created objects, and when it has utilized all the memory it throws a warning 'Data object has not been disposed'. We get this warning inspite of including the dispose method inside the finally clause.. Please let me know if my understanding is right?
For your Information,
1.We dont get any exceptions or OutofMemoryErrors..
2.The crawler is running in a seperate thread. It does not halt the entire application, only the crawling stops.
3.The file types which we crawl are pdf,text files,html,MS Office files.
The warning which we got is,
DataObject has not been disposed. URI: , <Any file URL, followed by> From DataSource: null [../../Java]
1. The crawler follows the order returned by file.listFiles() method. I guess it's OS- and JVM-specific and doesn't follow any particular criteria.
2. The only method to dispose of a data object is object.dispose(). If you're sure that you always dispose every object you get then there are two options
- a bug in the crawler/accessor that creates a data object but does not return it to the CrawlerHandler
- a bug in your application - some loophole that prevents some objects from being disposed properly
- something really weird :) (which also happens)
We usually debug this kind of problems with a simple hack. Try removing aperture-2006.1-alpha-3.jar from your classpath and use this instead
With this version, whenever you get a warning about an undisposed dataobject, it will be accompanied by a stack trace where this object had been created. This is usually helpful, it might tell you where you've gone wrong. If it doesn't tell you anything, please send those stacktraces to me. I'll see what I can do.