Hi All,
I'm using JWNL 1.3 at http://www.online-utility.org/english/index.jsp
English language online tools.
But sometimes some of my widgets which use JWNL stop to work. It seems
like some kind of deadlock.
I'm using File mapped dictionary.
Usually each JSP (Servlet) use class WordNetProcessor which use JWNL in
static way as follows:
<%! static WordNetProcessor wordNetProcessor=new WordNetProcessor(); %>
Class WordNetProcessor initialize JWNL at the following way :
/** Creates a new instance of WordNetProcessor */
public WordNetProcessor() {
String propsFile =
common.CommonResource.getString("WordNetProperty");
try {
// initialize JWNL (this must be done before JWNL can be used)
if(!JWNL.isInitialized())
JWNL.initialize(new FileInputStream(propsFile));
dic=Dictionary.getInstance();
} catch (Exception ex) {
ex.printStackTrace();
}
}
I've tried also with the line if(!JWNL.isInitialized()) removed but it
seemed I had leak of file descriptors.
I would appreciate any idea or comment.
Thanks in advance.
|